Quality RTOS & Embedded Software

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




Loading

compiler error with lwIP gcc sam7x demo

Posted by bejkarna on February 25, 2010
when I try to compile the demo using yagarto gcc 4.4.2 under eclipse (same results under command line)

I get this:

...-I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X -I./lwip-1.1.0/src/include/ipv4 -D SAM7_GCC -D THUMB_INTERWORK -mcpu=arm7tdmi -D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -fomit-frame-pointer -mthumb-interwork -fno-strict-aliasing -fno-dwarf2-cfi-asm EMAC/SAM7_EMAC_ISR.c -o EMAC/SAM7_EMAC_ISR.o
EMAC/SAM7_EMAC_ISR.c: In function 'vEMACISR_Wrapper':
EMAC/SAM7_EMAC_ISR.c:92: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6835
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
make: *** [EMAC/SAM7_EMAC_ISR.o] Error 1

this is with optimisation level O3, with lower level eg O2 I get:

...-Map=rtosdemo.map
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld.exe: RTOSDemo.elf section `.bss' will not fit in region `ram'
c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/bin/ld.exe: region `ram' overflowed by 27568 bytes
collect2: ld returned 1 exit status
make: *** [RTOSDemo.elf] Error 1

I also tried older version of gcc with the same result. Version of FreeRTOS V6.0.1
Any ideas what can be wrong, I am really stuck here with no idea, where to search for problem.
thanks for anything.


RE: compiler error with lwIP gcc sam7x demo

Posted by Richard on February 25, 2010
I just tried the same, and found it compiled with no problem but generated the following error while linking:

"no memory region specified for loadable section `.eh_frame"

I have read stuff about this error before and from memory (so might be wrong) there are two things that can cause this. The first is an error in the linker script - but the linker script worked fine with previous versions of Yagarto. The second is simply that the section ".eh_frame" should be stripped out using some command line option or other that I can't remember. I think this will require a bit of Googling.

Regards.

RE: compiler error with lwIP gcc sam7x demo

Posted by bejkarna on February 25, 2010
Thanks a lot for your answer, it now works, I dont know how :( i will try to explain

I found on yagarto.de that if the message you mentioned about ".eh_frame" appears one should add the following to the linker script:

. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram

Now I was actually working with two demos: SAM7X WEB Server & USB Mouse Demo
Using Eclipse where I removed the uIP stack and added lwIP from the lwIP demo
and I also tried lwIP demo as I said earlier.

with the uIP demo the linker script contained the above part but the lwIP did not, so I added it there, this removed the .eh_frame error but new one appeard:

c:/program files/yagarto/bin/../lib/gcc/arm-elf/4.4.2/../../../../arm-elf/lib/interwork\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
C:\msys\1.0\home\yagarto\newlib-build\arm-elf\interwork\newlib\libc\reent/../../../../../../newlib-1.18.0/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
collect2: ld returned 1 exit status

but I found that the linker script works with memory I increased it as I have at91sam7x512 which has larger memory. this caused that the uip demo (with lwIP implemented) started working. Sadly the lwIP demo does not work as it throws the error mentioned above.

I am not really sure what I exactly did as I am just begginer, but now it works. Amazing.

RE: compiler error with lwIP gcc sam7x demo

Posted by bejkarna on February 25, 2010
I changed the following in atmel-rom.ld

MEMORY
{
flash: ORIGIN = 0x00100000, LENGTH = 256K
ram: ORIGIN = 0x00200000, LENGTH = 64K
}

__stack_end__ = 0x00200000 + 64K - 4;

to

MEMORY
{
flash: ORIGIN = 0x00100000, LENGTH = 512K
ram: ORIGIN = 0x00200000, LENGTH = 128K
}

__stack_end__ = 0x00200000 + 128K - 4;

I found also that lowering configTOTAL_HEAP_SIZE in FreeRTOSConfig.h to 20 * 1024 also works. It is about the same as set up in the lwIP demo.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists