Quality RTOS & Embedded Software

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


Loading

lwip Demo compile fails both gcc and Rowley

Posted by kmceng on August 13, 2009
I'm trying to compile the lwIP_Demo_Rowley_ARM7 and am
encountering issues compiling with both gcc command-line
and the demo version of the Rowley compiler.

I have an Atmel ATSAM7X-EK with ATSAM7X256 processor, and
am beginning a project on a Linux host (x86_64). I may
use the CodeSourcery Sourcery_G++_Lite and the
'make' command line, or possibly Rowley CrossStudio.

Initial Command Line issues so far:
1) Renamed 'makefile' to 'Makefile'

2) ARM.exidx is not declared in the linker script as
in generic-hosted.ld of CodeSourcery's compiler.
Repair: I added the following to fix the atmel-rom.ld file:
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} >ram
__exidx_end = .;

3) _sbrk not defined
Still need a solution to this one...

Initial Rowley issues:
1) FreeRTOS.h, task.h, StackMacros.h not found:
Repair: added 'FreeRTOS/Source/include' to User Include Directories

2) 'asm' not defined
Still need a solution to this one...

Note that I have sucessfully compiled and downloaded
the basic-emac-project from Atmel using CodeSourcery
so my environment is up and working.

Keith

RE: lwip Demo compile fails both gcc and Rowl

Posted by Richard on August 13, 2009

These issues are tool inconpatibility issues. I am interested in receiving reports such as this so I know what is going on and issues people are having, so thanks for taking the time to write.

These particular issues (other than the case issue) are because you are using different tools to those used to create the port, rather than a problem with the port itself. Partially, I suppose, because this is actually quite an old demo.

> Initial CL issues so far are:
> makefile should be Makefile

I will correct this. I presume this is just an issue for Linux hosts?


> ARM.exidx is not declared in the linker script as in
> generic-hosted.ld of
> compiler

I think the demo was originally written with either GNUARM or YAGARTO, neither of which require these (that might not be true for the latest YAGARTO release).


> _sbrk not defined

Try Googleing _sbrk, I think you will find some solutions that just require a dummy to be added to the code for linking only.


> Initial Rowley issues:
> FreeRTOS/Source/include not part of dependency tree


Weird. I just tried it and didn't have that issue.



> 'asm' not defined


This is because the latest CrossWorks versions have the "enforce ANSI" compiler option on by default (the demo is actually several years old and written using an old compiler version). You can either simply turn off the "enforce ANSI setting" or change all occurrances of asm to __asm instead.

Note also that there was for a while an issue with the GCC that came with Rowley whereby Thumb/ARM interworking did not always glue together correctly when a Thumb function was called from a naked ARM function (as in the interrupt service routines). If this is a problem to you then either compile all the ISR to ARM mode (wrapper and implementing function) or have the wrapper in an asm file rather than in a C file.

Regards.

RE: lwip Demo compile fails both gcc and Rowley

Posted by kmceng on August 14, 2009
SOLUTION:
Here are all the issues I found to finally get a debug session going.

Issues in in the project .hzp file

Case differences for include dependencies:
$(ProjectDir)/../../source/portable/GCC/ARM7_AT91SAM7S;
instead of 'Source/portable'
and same with 'common' instead of 'Common'

Double backslashes '\\' used instead of '/' for delimiters.
e.g. "$(ProjectDir)/lwip-1.1.0\\src\\include\\ipv4"

Likewise for the location of debug loader via the parallel port:
ATMEL_ATSAM7X instead of Atmel_ATSAM7X.
There could be more, these are what cleared MY errors.

I also needed to free up my Linux parallel port:
>sudo rmmod lp
then the debugger could access /dev/parport0.

Now CrossStudio is happy and so am I!

Keith


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner