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

Demo 2106 link problems (ARM7)

Posted by M Beronius on September 8, 2008

Hi,

This is my first project using ARM devices, and also FreeRtos, therefore I suppose my issues below are common knowledge here.. ;-)

I am targetting a LPC2387 or similar device for my project. In order to get going rapidly, and to familirise myself with the environment I decided to compile the 2106 GCC demo.

Compilation went ok, but not the linking, and I think that it is basically a thumbmode issue, since the arm mode compiles+links OK.

{would you agree?}

Thing is, my understanding is that thumbmode is a good thing, and I'd like to use it. So fixing this issue is top on my todo list..

The toolchain where built using crossdev on gentoo linux, and I guess this is where I need to have libgcc support INTERWORKING somehow?


Thanks,

Micael



micke@atle ~/projects/FreeRTOS/Demo/ARM7_LPC2106_GCC $ make
arm-elf-gcc -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused -D RUN_FROM_RAM -D GCC_ARM7 -I. -I../../Source/include -I../Common/include -g -mcpu=arm7tdmi -Tlpc2106-ram.ld -O0 -fomit-frame-pointer -fno-strict-aliasing -mthumb-interwork -D THUMB_INTERWORK ../../Source/portable/GCC/ARM7_LPC2000/portISR.o serial/serialISR.o main.o serial/serial.o ParTest/ParTest.o ../Common/Minimal/integer.o ../Common/Minimal/flash.o ../Common/Minimal/PollQ.o ../Common/Minimal/comtest.o ../Common/Minimal/flop.o ../Common/Minimal/semtest.o ../Common/Minimal/dynamic.o ../Common/Minimal/BlockQ.o ../../Source/tasks.o ../../Source/queue.o ../../Source/list.o ../../Source/portable/MemMang/heap_2.o ../../Source/portable/GCC/ARM7_LPC2000/port.o -nostartfiles boot.s -Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_udivsi3.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_divsi3.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_umodsi3.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_dvmd_tls.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_addsubdf3.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_muldivdf3.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/libgcc.a(_cmpdf2.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/../../../../arm-elf/lib/libg.a(lib_a-memcpy.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/../../../../arm-elf/lib/libg.a(lib_a-memset.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: Warning: /usr/lib/gcc/arm-elf/4.2.4/../../../../arm-elf/lib/libg.a(lib_a-strncpy.o) does not support interworking, whereas rtosdemo.elf does
/usr/libexec/gcc/arm-elf/ld: /usr/lib/gcc/arm-elf/4.2.4/../../../../arm-elf/lib/libg.a(lib_a-memset.o)(memset): warning: interworking not enabled.
first occurrence: main.o: thumb call to arm
/usr/libexec/gcc/arm-elf/ld: BFD (GNU Binutils) 2.18 assertion fail /var/tmp/cross/arm-elf/portage/cross-arm-elf/binutils-2.18-r3/work/binutils-2.18/bfd/elf32-arm.c:6532
main.o: In function `vMemCheckTask':
/home/micke/projects/FreeRTOS/Demo/ARM7_LPC2106_GCC/main.c:451: dangerous relocation: make: *** [rtosdemo.elf] Error 1


RE: Demo 2106 link problems (ARM7)

Posted by Dave on September 9, 2008
Don't know about Linux, but on Win32 I only ever use pre built GCC versions and have never come across this problem. Are there pre built GCC versions that can be tried on Linux?

From the error I would guess that you need to build libgcc with the -thumb-interwork compile time option.

RE: Demo 2106 link problems (ARM7)

Posted by M Beronius on September 9, 2008

Thanks,

the libs are built with crossdev, which generates the full toolchain from sources automagically.

I have learned since about an hour, that crossdev actually are building both a arm and thumb variant of libgcc. So all I need to do is to find out where that default lib path is set. Which at this point is not obvious to me. :)

But at least, I

RE: Demo 2106 link problems (ARM7)

Posted by Çağlar Akyüz on September 9, 2008
FYI, there are also pre-built toolchains at:

http://www.codesourcery.com/gnu_toolchains/arm/portal/subscription3053
http://www.gnuarm.com/

Regards,
Caglar



[ 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