Hi again
Yesterday I got the FreeRTOS kernel compiled for the first time after some problems
Unfortunately my problems werent over
I included a small test application to see if the kernel was running correctly, a small LED flasher
The LED flasher task is added by using xTaskCreate and the kernel was started. Nothing happened the LED wasnt flashing. Ive tested the LED flasher program without the kernel and it works fine.
I dont know where the problem lays, if its a stack problem, a setup problem or.
Are you able to step through the code? If so then I can tell you things to look for.
Otherwise, can you see what the return value of xTaskCreate() is, also does the call to start the scheduler return? If the scheduler starts the call should not return.
If you send me your project (source files, makefiles, etc.) then I can take a look. Zip up the files and send them to the email address listed on the contact page of the FreeRTOS web site (r dot barry at free … ).
The problem seems to relate to the startup code and linker script.
The startup code you have does not call main() in the correct mode. It must be in Supervisor mode when main() is called.
Correcting this causes an abort before the kernel even gets started due to a return address on the stack getting overwritten. I suspect this is also a startup file issue.
Also the compiler options are suspect - especially the structure packing.
Can you use the startup files, makefile and linker script as per the download for the LPC2106 demo? This way everything will be setup correctly. You will have to alter the linker script slightly for the different size of ROM and RAM.