Hello
Not sure I understand the issue here.
Are you looking for a way to make sure that the PC points directly in main function after you started the debugger?
Then add following command to your postload.cmd file:
bs main T
go
This way after loading code the startup code will be automatically executed (initializing stack pointer, variables, ...) and the application will stop at main.
I hope that helps.
CrasyCat
Dear Pgo,
Good you fancy teaching some Codewarrior
If you want, you can remove the Start file from the project, remove its inclusions and also change the reset vector to point to main() instead of startup.
However, this file does the initialisation of variables and other things of the MCU (Stack initialization...).
Therefore it means that if you don't use the startup sequence you have to do everything manually in the main()...
In a course, you could still include the start file and not go into details about it explaining it initializes the variable to zéro for ANSI compatibility and also stack pointer. Which level you want to explain ? (debugging, C coding, linking, compiling.. ?)
Alban.