Infineon XMC1xxx Cortex M0

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
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

Post by Giovanni »

See ho it is initialized the "stklim" field of the main thread structure, it is used for detecting overflows.

Giovanni
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: Infineon XMC1xxx Cortex M0

Post 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.
User avatar
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

Post by Giovanni »

Correct, it is the symptom of a missing systick or missing interrupts in general.

Giovanni
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: Infineon XMC1xxx Cortex M0

Post 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.
User avatar
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

Post by Giovanni »

Do they provide CMSIS files? there should be startup code to study there, scatter files should be especially interesting.

Giovanni
Tabulous
Posts: 518
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 18 times

Re: Infineon XMC1xxx Cortex M0

Post by Tabulous »

Hi Giovanni
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
User avatar
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

Post 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
Post Reply