Other Parts Discussed in Thread: SYSCONFIG
Hello,
In our application, we have two separate codes, a bootloader that is located at the flash entry point and application code which resides in bank1. We have encoutered a strange behavior when we try to upload the application by means of the debugger instead of the bootloader. After debugging and power cycling, the application seems to not match with the expected one, for example, leds are not working as expected, motor is not moving as expected, etc.
I am troubleshooting this issue and I would like to ask some questions regarding the bootloading flow and debugging.
- How does affect uploading a code through debugger instead of uploading through bootloader, the procedure should be as simple as uploading the .txt file like in bootloader?
- I have different .cmd and .asm between projects. For example, I have a .asm file for the DCSM module to modify the default boot modes in the bootloader project. The files are converted in .obj by the compiler and always executed after power cycling even though I uploaded an application with the debugger?
- In the .asm file of bootloader for example, before branching to application, the bootloader supposedly resets the cpu registers and flushes the stack. THis should always be executed no when the mcu is power cycled right? It should no matter if I uploaded application code through debugger or am I missing something here too?
I followed pretty much the example of the bootloader foun in the sci examples.
Thank and regards,
David