I am working on FreeRTOS port for the Infineon AURIX TC222 TriCore microcontroller.
Tools: Infineon board TriBoard TC222 (V1.0) with tricore compiler.
Aurix Development studio (1.10.36)
GitHub repository:
I am trying to achieve reliable multitasking and understand the kernel porting requirements for the TriCore architecture. My current implementation has issues with task execution and context switching, and I need help identifying and correcting the underlying problems.
Note: When on debug mode LED toggled but at free run LED did not toggled, I debug but don’t got any lead.
I would appreciate a technical review of the port, particularly:
Initial task stack and task context initialization.
Context save and restore during task switches.
Scheduler behaviour with equal and different task priorities.
Tick interrupt and yield handling.
TriCore-specific context management and interrupt integration.
Any incorrect assumptions in my current port implementation.
My goal is to get a reproducible, working implementation and understand the correct FreeRTOS porting methodology.
If you have experience porting FreeRTOS to Infineon AURIX or other TriCore microcontrollers, I would appreciate any feedback, corrections, or relevant reference implementations.
I can share build logs, debugger traces, compiler details, and a minimal reproduction of the issue.
when you write “when on debug mode,” what exactly do you mean? Do you mean that a debug build runs as expected but a release build doesn’t, or do you mean that the same build runs as expected under debugger control but not when no debugger is attached?
One thought, if the change is with a debugger attached, I know that for some processors (I am not familiar with this one) disable the watchdog when a debugger is attached, and that could explain your symptom, that the system traps on a watchdog timeout and just hangs.
A related possible explanarion in that case is that a debugger very likely does some behind-the-curtain mcu initialization when the target is reset, and some of that initialization is missing in your startup init code.
ok, but if you observe the issue with a debugger attached but no breakpoint set, you should be able to analyze the processor state with your debugger. For example, does your Sys tick handler still get called when your target is in non working state? Or is your target perhaps in a fault?