Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

LPC2214 Porting Problem: The sequel

Posted by Nobody/Anonymous on July 14, 2005
Hi again
Yesterday I got the FreeRTOS kernel compiled for the first time after some problems…
Unfortunately my problems weren’t 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 wasn’t flashing. I’ve tested the LED flasher program without the kernel and it works fine.
I don’t know where the problem lays, if it’s a stack problem, a setup problem or….

Regards Jens Alsig

RE: LPC2214 Porting Problem: The sequel

Posted by Nobody/Anonymous on July 14, 2005
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.

RE: LPC2214 Porting Problem: The sequel

Posted by Nobody/Anonymous on July 14, 2005
I can't step through the code :(
I've just tested your proposal and the return code from xTaskCreate() is pdPASS.
Also the scheduler doesn’t return.

RE: LPC2214 Porting Problem: The sequel

Posted by Richard on July 14, 2005
which compiler are you using?

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 ... ).

Regards.

RE: LPC2214 Porting Problem: The sequel

Posted by Nobody/Anonymous on July 14, 2005
I'm using gcc - winarm.
2 sec and I will send a mail to you, Richard

RE: LPC2214 Porting Problem: The sequel

Posted by Richard on July 14, 2005
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.

Regards.

RE: LPC2214 Porting Problem: The sequel

Posted by Richard on July 14, 2005
I just tried this:

+ Copy the command line options from the LPC2106 demo makefile into your makefile.

+ Copy the linker script from the LPC2106 demo into your directory and rename it appropriately.

+ Change just two lines of the linker script where the start and size of the flash and ram is defined to be correct for your CPU.

+ Copy the boot.s file into your directory and rename it crt0.S.

+ make clean

+ make rtosdemo.elf

Works! (at least in the GCC simulator).

:-)

I will email the files I have changed.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS