///////////////////////////////////////////////////////////////////////////////// // MAIN PROGRAM: // Sets a new location for the stack and then calls the application code. // Setting a new stack location must be done first, and the function doing it // must not use the stack (so, better not to use any local variable). Then, // it is preferable to just set it and call the application code. // void main(void) { // Move program's stack from 0xC000 to 0x8000. System return addresses are // already stored at 0xBFFA - 0xBFFF, but we don't care about them as our // program will never return to the system. cpct_setStackLocation((void*)0x8000); // Start the application application(); }
// Main // IMPORTANTE: No anadir mas lineas de codigo a esta funcion. // Cuando movemos la pila no se debe hacer uso de ella dentro // de la misma funcion, asi que simplemente llamamos a application() void main(void) { cpct_setStackLocation((void*)0xC000); application(); }