Keil and FreeRtos problem...

penauser wrote on Sunday, November 21, 2010:

Hi all,
I have tried to create project for LPC1768 with Keil uVision4 and now I have some problems with it.
All seems to be ok(build is ok) but when I try to start the software it is stuck in startup code:
Reset_Handler   PROC
                EXPORT  Reset_Handler            
                IMPORT  __main
                LDR     R0, =__main
                BX      R0     // It stuck here…

I have import next functions:

IMPORT xPortPendSVHandler
IMPORT xPortSysTickHandler
IMPORT vPortSVCHandler
and added those in __Vectors table.
But what I have forgotten?  What else should I do?
Please, tell me…


edwards3 wrote on Tuesday, November 23, 2010:

I think __main is where the Keil libraries initialize the C run time system, copy variable initialization values from flash to ram, zero out variables, etc. This is probably not a FreeRTOS problem but a linker script problem. When you created the project did you specify LPC1768 in the target options? If you did then it should have given you the correct start up .s file which you can then edit as you mention, and the correct linker parameters.

penauser wrote on Wednesday, November 24, 2010:

Hi edwards3 and thanks.
I have tested this first by creating an empty projetc with startup and main functions and all is ok.  Then I added the Led blinking function and all is ok.
After that I added a FreeRTOS porting in project and now it doesn’t work.
But I solved this problem by creating the second project and it is works.  I dont know why because I haven’t found differences between these two projects.
But second projects seems to work very well.