I am having trouble getting FreeRTOS (5.4.2) to work on my AT91SAM7S256. Has anyone successfully run their AT91SAM7S256 with FreeRTOS (there is one project by “Spaude” online, but it is very old)? I would like to add this topic to my journal/tutorial I mentioned on another thread.
Details:
I am using lightly modified AT91SAM7X256 port files (the AT91SAM7S64 port uses co-routines). The program I am running in SRAM is a simple set of two tasks - one that turns the status LED on, one that turns it off. Ideally at a tick freq of 10Hz, I should see blinking. I have also tried a single task with a blink routine, which also freezes.
The thing that makes this difficult is that it frequently crashes my debugger, but I have noted the following:
-
The code is functional before the scheduler kicks in.
-
Once the scheduler kicks in, it correctly selects the highest priority task and executes it.
-
If I call any of the scheduling methods (like vTaskDelay or taskYield) the program will fail to “tick” even though the interrupt is enabled. If I do not, sometimes the vPreemptiveTick in portISR will fire a few times on schedule, then never fire again.
-
Context switching does not function, or only functions once.
As far as I can tell the tick interrupt is being properly cleared. My guess is that somewhere deep within the bowels of the context switcher there is a problem. I can’t actually get the debugger to go this deep into the execution.