User`s manual

Copyright © Quantum Leaps, LLC. All Rights Reserved.
QDK™
Renesas RX with HEW
state-machine.com/rx
Listing 10: Startup code in resetprg.c
#pragma section ResetPRG
#pragma entry PowerON_Reset_PC
void PowerON_Reset_PC(void) {
set_intb((unsigned long)__sectop("C$VECT"));
set_fpsw(0x00000100);
_INITSCT();
// _INIT_IOLIB(); // Remove the comment to use SIM I/O
// errno=0; // Remove the comment when you use errno
// srand(123); // Remove the comment when you use rand()
// _s1ptr=NULL; // Remove the comment when you use strtok()
_CALL_INIT(); // Remove the comment when you use global class objects
main();
// _CLOSEALL(); // Remove the comment to use SIM I/O
// _CALL_END(); // Remove the comment when you finalize class objects
brk();
}
22 of 32