See ho it is initialized the "stklim" field of the main thread structure, it is used for detecting overflows.
Giovanni
Infineon XMC1xxx Cortex M0
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Infineon XMC1xxx Cortex M0
the call to macro chSysSwitch(ntp, otp); is where is panics, well port_switch.
p_stklimit is @ 0x20001400
So i have reduced back down to 0x400
__main_stack_size__ = 0x400;
__process_stack_size__ = 0x400;
i dont get debug panic anymore but id dont get any context switching either, looks like it is just running in idle loop.
So this points me to the system tick timer not working, and thus not switching.
p_stklimit is @ 0x20001400
So i have reduced back down to 0x400
__main_stack_size__ = 0x400;
__process_stack_size__ = 0x400;
i dont get debug panic anymore but id dont get any context switching either, looks like it is just running in idle loop.
So this points me to the system tick timer not working, and thus not switching.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Infineon XMC1xxx Cortex M0
Correct, it is the symptom of a missing systick or missing interrupts in general.
Giovanni
Giovanni
Re: Infineon XMC1xxx Cortex M0
Feel like i'm going around in circles here lol.
Is there anyone that can help with the linker / crt0.c for this device ?
My assumptions that "It's a M0, so startup code should be the simliar to others" is not running true. At the moment i'm using the same files as ST's M0, but changed the memory to suit the Infineon part.
The Infinoen part looks to have some veneered sections and this is abit alien to me.
Is there anyone that can help with the linker / crt0.c for this device ?
My assumptions that "It's a M0, so startup code should be the simliar to others" is not running true. At the moment i'm using the same files as ST's M0, but changed the memory to suit the Infineon part.
The Infinoen part looks to have some veneered sections and this is abit alien to me.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Infineon XMC1xxx Cortex M0
Do they provide CMSIS files? there should be startup code to study there, scatter files should be especially interesting.
Giovanni
Giovanni
Re: Infineon XMC1xxx Cortex M0
Hi Giovanni
i've attached the generic XMC startup assembler and linker file, these are from atollic IDE.
i've attached the generic XMC startup assembler and linker file, these are from atollic IDE.
- Attachments
-
- startup_linker files.zip
- (5.11 KiB) Downloaded 316 times
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Infineon XMC1xxx Cortex M0
It does several non-standard things, like those clock-related words in the vectors table, are those a boot requirement or what? I also don't see that veneer code, what is it supposed to do?
I think you need to go through manuals about those points.
Giovanni
I think you need to go through manuals about those points.
Giovanni