Page 2 of 2

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Mar 30, 2015 12:27 pm
by Giovanni
See ho it is initialized the "stklim" field of the main thread structure, it is used for detecting overflows.

Giovanni

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Mar 30, 2015 5:05 pm
by Tabulous
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.

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Mar 30, 2015 6:08 pm
by Giovanni
Correct, it is the symptom of a missing systick or missing interrupts in general.

Giovanni

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Apr 06, 2015 1:33 pm
by Tabulous
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.

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Apr 06, 2015 1:59 pm
by Giovanni
Do they provide CMSIS files? there should be startup code to study there, scatter files should be especially interesting.

Giovanni

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Apr 06, 2015 2:12 pm
by Tabulous
Hi Giovanni
i've attached the generic XMC startup assembler and linker file, these are from atollic IDE.

Re: Infineon XMC1xxx Cortex M0

Posted: Mon Apr 06, 2015 2:18 pm
by Giovanni
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