Quality RTOS & Embedded Software

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


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 ]    [ 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