I've got a K60 Tower board with a MQX application loaded.
All of my experience is with Star12 micro's --- first time with ARM.
I'm trying to walk the execution from reset to the start of the application to see how MQX loads, etc.
I'm hitting a brick wall and would like some clarification ....
The P&E Jtag debugger breaks at main() in mqx_main.c. I'm trying to see if THAT is really the first instruction from the reset vector.
Looking in Vector.c I get .....
#define BOOT_START __boot
extern void __boot(void);
And then the vectors .....
(vector_entry)__BOOT_STACK_ADDRESS,
BOOT_START,
/* 0x01 0x00000004 - ivINT_Initial_Program_Counter */ DEFAULT_VECTOR,
/* 0x02 0x00000008 - ivINT_NMI */ DEFAULT_VECTOR,
/* 0x03 0x0000000C - ivINT_Hard_Fault */ DEFAULT_VECTOR,
/* 0x04 0x00000010 - ivINT_Mem_Manage_Fault */ DEFAULT_VECTOR,
/* 0x05 0x00000014 - ivINT_Bus_Fault */ DEFAULT_VECTOR,
/* 0x06 0x00000018 - ivINT_Usage_Fault */
BOOT_START is defined above as __boot
I've done searches in all of the files in the MQX folder and can't find __boot or _boot
I can't find any association of main to __boot.
The value of the reset vector is 0x81110000 which makes no sense to me (maybe has something to do with thumb mode) --- I'm use to that address being the first executable address.
I you can tell me if main() is indeed the first instruction from the reset vector --- I would appreciate it.
Please tell me how you walk from the reset vector (0x81110000) to code.
Why can't I associate __boot or _boot with any code lable?
Thanks in advance for your insight.
Joe
Hi Joe,
By default, the MQX project files have a debug option checked where it runs to main() before halting the debugger when you connect, versus halting the debugger on the very first instruction. If you select "Program entry point" in the debugger settings, then you can step through from the very first instructions.
The __boot function for the K60 is in \mqx\source\psp\cortex_m\core\M4\boot.S
Not a solution --- maybe a lesson learned.
I built the App using the Freescale toolchain instead of the GNU compiler etc.
Lot of things are hidden.
Switched over to the GNU toolchain --- and everything is now visible.
I was hoping that Freescale had a better ARM toolchain ---- but looks like I will be using the GNU.
Joe
Hello Joe,
has Anthony's suggestion helped you?
Please let us know :smileywink:
Best regards,
Monica.