I’m trying to make my first very simple FreeRTOS Application for my STR912FA with IAR Embedded Workbench 5, just two threads to read switches and write led’s to have a base. I can’t compile the st912x-Demo because there are errors at the startup-files (i think there are created with an older version) and i used the 91x_vect.s and 91x_init.s of the installation. Now i create successfuly two tasks and also vTaskStartScheduler never return after call, but the task-code is never executed. I think there are some changes concerning the exception handler and so on necessary but i have no idea what to do with the assembler code… Or is there something else?! HELP!!!
search through this forum for topics of IAR 5. Basically all the FreeRTOS projects use the new v4 that was released at the same time as V5. This is as V5 does not yet support cortex mcu. You can download the latest v4 from IAR. If you have change the startup code to enable V5 use then make sure that you set the code such that supervisor mode is used to call main. This might fix your problem.
Thanks for the tip. I continued trying it with IAR 5 and i allready found the first problem. vTaskStartScheduler was not called in supervisor-mode but uncommenting a line at the startup-file solved this. Now the higherprior task is executed, but there is no scheduling and switching to other tasks. I also changed the SWI_Addr to vPortYieldProcessor, but i think theres the problem… Can anybody tell me what to do at the startup to configure everything right?!
There are two methods of installing interrupts that can cause a context switch that are used by FreeRTOS.org for ARM7/9 devices. The first is to have a common entry point that saves the task context then calls a standard c function to perform the processing, before restoring the context of the next task to run. The second is to vector directly to the handler for the interrupting peripheral, then have this handler save and restore the context if necessary. The STR9 demo uses the first method.
If you look in 91x_vect_IAR.s you will see the function IRQHandler. Have you moved this across to your IAR version 5 project? I have not used version 5 yet because I can’t have two versions on my computer at the same time, and need IAR to also compile for Cortex-M3. The version 5 is only a half way house thus far.
Thanks, but i think i have to capitulate! If i copy the IRQHandler of 91x_vect_IAR.s i get a linker-error "partial region overlap not supportetd in this version…" at file str91x_flash.icf. Now i playing around with EMWB 4 and the str91x-demo. There are also some problems but more realistic to solve them in finite time. Im not lucky with this solution but i have to advance my project…