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

NXP CortexM3 with Mentor/Codesoucery tools

Posted by G40 on May 24, 2012
Possibly slightly off the range, if so apologies. I am trying to build the FreeRTOS/lwip HTTP server demo for the NXP 1769 board using the Mentor arm-none-eabi tools (i.e. raw metal).

The problem is down to the choice of C runtimes. Do I use the Mentor thumb libraries? And how do I resolve references to perfectly standard functions like memcpy, strlen,strcmp and friends? A (verbose) example of the linker output is shown below.

Many thanks,

Jerry

arm-none-eabi-ld -nostdlib -Map="router_booter.map" -Trouter_booter_Debug.ld  -or:/data/anemos/main/router_booter/obj/router_booter.axf -L R:/apps/Mentor/lib/gcc/arm-none-eabi/4.6.1/thumb r:/data/anemos/main/router_booter/obj/core_cm3.o r:/data/anemos/main/router_booter/obj/system_lpc17xx.o r:/data/anemos/main/router_booter/obj/cr_startup_lpc176x.o r:/data/anemos/main/router_booter/obj/main.o r:/data/anemos/main/router_booter/obj/printf-stdarg.o r:/data/anemos/main/router_booter/obj/gpio-output-and-software-timers.o r:/data/anemos/main/router_booter/obj/spi-interface-to-sd-card.o r:/data/anemos/main/router_booter/obj/ff.o r:/data/anemos/main/router_booter/obj/mmc.o r:/data/anemos/main/router_booter/obj/syscall.o r:/data/anemos/main/router_booter/obj/croutine.o r:/data/anemos/main/router_booter/obj/list.o r:/data/anemos/main/router_booter/obj/queue.o r:/data/anemos/main/router_booter/obj/tasks.o r:/data/anemos/main/router_booter/obj/timers.o r:/data/anemos/main/router_booter/obj/freertos_cli.o r:/data/anemos/main/router_booter/obj/freertos_driverinterface.o r:/data/anemos/main/router_booter/obj/freertos_ioutils.o r:/data/anemos/main/router_booter/obj/ioutils_charqueuetxandrx.o r:/data/anemos/main/router_booter/obj/ioutils_circularbufferrx.o r:/data/anemos/main/router_booter/obj/ioutils_zerocopytx.o r:/data/anemos/main/router_booter/obj/freertos_lpc17xx_driverinterface.o r:/data/anemos/main/router_booter/obj/freertos_lpc17xx_i2c.o r:/data/anemos/main/router_booter/obj/freertos_lpc17xx_ssp.o r:/data/anemos/main/router_booter/obj/freertos_lpc17xx_uart.o r:/data/anemos/main/router_booter/obj/port.o r:/data/anemos/main/router_booter/obj/heap_2.o r:/data/anemos/main/router_booter/obj/api_lib.o r:/data/anemos/main/router_booter/obj/api_msg.o r:/data/anemos/main/router_booter/obj/err.o r:/data/anemos/main/router_booter/obj/netbuf.o r:/data/anemos/main/router_booter/obj/netdb.o r:/data/anemos/main/router_booter/obj/netifapi.o r:/data/anemos/main/router_booter/obj/sockets.o r:/data/anemos/main/router_booter/obj/tcpip.o r:/data/anemos/main/router_booter/obj/def.o r:/data/anemos/main/router_booter/obj/dhcp.o r:/data/anemos/main/router_booter/obj/dns.o r:/data/anemos/main/router_booter/obj/init.o r:/data/anemos/main/router_booter/obj/lwip_timers.o r:/data/anemos/main/router_booter/obj/mem.o r:/data/anemos/main/router_booter/obj/memp.o r:/data/anemos/main/router_booter/obj/netif.o r:/data/anemos/main/router_booter/obj/pbuf.o r:/data/anemos/main/router_booter/obj/raw.o r:/data/anemos/main/router_booter/obj/stats.o r:/data/anemos/main/router_booter/obj/sys.o r:/data/anemos/main/router_booter/obj/tcp.o r:/data/anemos/main/router_booter/obj/tcp_in.o r:/data/anemos/main/router_booter/obj/tcp_out.o r:/data/anemos/main/router_booter/obj/udp.o r:/data/anemos/main/router_booter/obj/autoip.o r:/data/anemos/main/router_booter/obj/icmp.o r:/data/anemos/main/router_booter/obj/igmp.o r:/data/anemos/main/router_booter/obj/inet.o r:/data/anemos/main/router_booter/obj/inet_chksum.o r:/data/anemos/main/router_booter/obj/ip.o r:/data/anemos/main/router_booter/obj/ip_addr.o r:/data/anemos/main/router_booter/obj/ip_frag.o r:/data/anemos/main/router_booter/obj/lwip_apps.o r:/data/anemos/main/router_booter/obj/basicsocketcommandserver.o r:/data/anemos/main/router_booter/obj/fsdata.o r:/data/anemos/main/router_booter/obj/httpd.o r:/data/anemos/main/router_booter/obj/etharp.o r:/data/anemos/main/router_booter/obj/ethernetif.o r:/data/anemos/main/router_booter/obj/sys_arch.o r:/data/anemos/main/router_booter/obj/debug_frmwrk.o r:/data/anemos/main/router_booter/obj/lpc17xx_adc.o r:/data/anemos/main/router_booter/obj/lpc17xx_can.o r:/data/anemos/main/router_booter/obj/lpc17xx_clkpwr.o r:/data/anemos/main/router_booter/obj/lpc17xx_dac.o r:/data/anemos/main/router_booter/obj/lpc17xx_emac.o r:/data/anemos/main/router_booter/obj/lpc17xx_exti.o r:/data/anemos/main/router_booter/obj/lpc17xx_gpdma.o r:/data/anemos/main/router_booter/obj/lpc17xx_gpio.o r:/data/anemos/main/router_booter/obj/lpc17xx_i2c.o r:/data/anemos/main/router_booter/obj/lpc17xx_i2s.o r:/data/anemos/main/router_booter/obj/lpc17xx_libcfg_default.o r:/data/anemos/main/router_booter/obj/lpc17xx_mcpwm.o r:/data/anemos/main/router_booter/obj/lpc17xx_nvic.o r:/data/anemos/main/router_booter/obj/lpc17xx_pinsel.o r:/data/anemos/main/router_booter/obj/lpc17xx_pwm.o r:/data/anemos/main/router_booter/obj/lpc17xx_qei.o r:/data/anemos/main/router_booter/obj/lpc17xx_rit.o r:/data/anemos/main/router_booter/obj/lpc17xx_rtc.o r:/data/anemos/main/router_booter/obj/lpc17xx_spi.o r:/data/anemos/main/router_booter/obj/lpc17xx_ssp.o r:/data/anemos/main/router_booter/obj/lpc17xx_systick.o r:/data/anemos/main/router_booter/obj/lpc17xx_timer.o r:/data/anemos/main/router_booter/obj/lpc17xx_uart.o r:/data/anemos/main/router_booter/obj/lpc17xx_wdt.o 
arm-none-eabi-ld: r:/data/anemos/main/router_booter/obj/router_booter.axf section `.bss' will not fit in region `RamLoc32'
arm-none-eabi-ld: region `RamLoc32' overflowed by 6312 bytes
r:/data/anemos/main/router_booter/obj/system_lpc17xx.o: In function `SystemCoreClockUpdate':
system_lpc17xx.c:(.text.SystemCoreClockUpdate+0xb4): undefined reference to `__aeabi_uldivmod'
system_lpc17xx.c:(.text.SystemCoreClockUpdate+0xd8): undefined reference to `__aeabi_uldivmod'
system_lpc17xx.c:(.text.SystemCoreClockUpdate+0x154): undefined reference to `__aeabi_uldivmod'
system_lpc17xx.c:(.text.SystemCoreClockUpdate+0x178): undefined reference to `__aeabi_uldivmod'
system_lpc17xx.c:(.text.SystemCoreClockUpdate+0x1ee): undefined reference to `__aeabi_uldivmod'
r:/data/anemos/main/router_booter/obj/system_lpc17xx.o:system_lpc17xx.c:(.text.SystemCoreClockUpdate+0x212): more undefined references to `__aeabi_uldivmod' follow
r:/data/anemos/main/router_booter/obj/main.o: In function `prvTaskStatsCommand':
main.c:(.text.prvTaskStatsCommand+0x1a): undefined reference to `strcpy'
main.c:(.text.prvTaskStatsCommand+0x20): undefined reference to `strlen'
r:/data/anemos/main/router_booter/obj/main.o: In function `prvRunTimeStatsCommand':
main.c:(.text.prvRunTimeStatsCommand+0x1a): undefined reference to `strcpy'
main.c:(.text.prvRunTimeStatsCommand+0x20): undefined reference to `strlen'
r:/data/anemos/main/router_booter/obj/main.o: In function `prvManuallyPlaceLargeDataInAHBRAM':
main.c:(.text.prvManuallyPlaceLargeDataInAHBRAM+0x7c): undefined reference to `memset'
r:/data/anemos/main/router_booter/obj/spi-interface-to-sd-card.o: In function `prvWriteFilesToDisk':
spi-interface-to-sd-card.c:(.text.prvWriteFilesToDisk+0x8c): undefined reference to `memset'
r:/data/anemos/main/router_booter/obj/spi-interface-to-sd-card.o: In function `prvReadBackCreatedFiles':
spi-interface-to-sd-card.c:(.text.prvReadBackCreatedFiles+0x94): undefined reference to `memset'
r:/data/anemos/main/router_booter/obj/queue.o: In function `prvCopyDataToQueue':
queue.c:(.text.prvCopyDataToQueue+0x44): undefined reference to `memcpy'
queue.c:(.text.prvCopyDataToQueue+0x7a): undefined reference to `memcpy'
r:/data/anemos/main/router_booter/obj/queue.o: In function `prvCopyDataFromQueue':
queue.c:(.text.prvCopyDataFromQueue+0x42): undefined reference to `memcpy'

RE: NXP CortexM3 with Mentor/Codesoucery tools

Posted by Dave on May 25, 2012
There should not be any differences to the standard library functions. The output in your post does not look like the wrong library is being used, but that no library is being used at all. Normally it would pick the right library automatically based on the other compiler options, so compare your command line with other examples that use the same compiler in the FreeRTOS demo directory. Unless code sourcery provide their own library for small devices, consider providing your own implementation of these functions anyway, as GCC libraries are not microcontroller friendly.

If you are using a Cortex-M3 then you will have to use the thumb libraries, as Cortex only has thumb2.

Have you looked at the demo provided for FreeRTOS+IO which builds an lwIP web server for an LPC1769 using GCC?

RE: NXP CortexM3 with Mentor/Codesoucery tools

Posted by G40 on May 25, 2012
Hello Dave and thanks. I'm looking at the demo now. Mentor/CS do provide a libgcc for the thumb

RE: NXP CortexM3 with Mentor/Codesoucery tools

Posted by G40 on May 26, 2012
Ah. I'm using g++, not gcc due to a licensing snafu. No g++ libraries installed! Thanks for the pointer Dave.


[ 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