Quality RTOS & Embedded Software

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


Loading

FreeRTOS error on uIP_Process() function

Posted by murnesty on March 27, 2013
I'm using:
- FreeRTOS v7.4.0
- NXP LPC2368 MCU
- Red Suite 4
- Demo files : ARM7_LPC2368_Eclipse

I failed to open and build the demo project directly so I built a new project and copy all the files needed. The project I created is able to run 3-4 tasks(LED blink & uart) and I'm trying to do uIP now. So I copy all the files needed according to the makefile in demo project. I'm able to build the project after copy all the needed file over.

Here is the problem. When I try to add a new task for uIP. It states show error:
"make: *** [] Error1"
From the console:

Building target: RTOS Sample3.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="RTOS Sample3.map" -Xlinker --gc-sections -mcpu=arm7tdmi -T "RTOS_Sample3_Debug.ld" -o"RTOS Sample3.axf" ./src/webserver/EMAC_ISR.o ./src/webserver/emac.o ./src/webserver/http-strings.o ./src/webserver/httpd-cgi.o ./src/webserver/httpd-fs.o ./src/webserver/httpd.o ./src/webserver/uIP_Task.o ./src/cr_startup_lpc23.o ./src/croutine.o ./src/heap_2.o ./src/list.o ./src/main.o ./src/queue.o ./src/tasks.o ./src/timers.o ./src/portable/port.o ./src/portable/portISR.o ./src/peripherals/buzzer.o ./src/peripherals/ledBlink.o ./src/peripherals/pll.o ./src/peripherals/taskList.o ./src/peripherals/uart.o ./src/Common/psock.o ./src/Common/timer.o ./src/Common/uip.o ./src/Common/uip_arp.o
c:/code_red/redsuitenxp_4.0.6_249/redsuite/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libcr_c.a(_deferredlazyseek.o): In function `__flsbuf':
_deferredlazyseek.c:(.text.(float, long, short, bool, float __restrict)+0xcc): undefined reference to `__sys_istty'
c:/code_red/redsuitenxp_4.0.6_249/redsuite/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libcr_c.a(_writebuf.o): In function `_Cwritebuf':
_writebuf.c:(.text._Cwritebuf+0x24): undefined reference to `__sys_flen'
_writebuf.c:(.text._Cwritebuf+0x48): undefined reference to `__sys_seek'
_writebuf.c:(.text._Cwritebuf+0x6c): undefined reference to `__sys_write'
c:/code_red/redsuitenxp_4.0.6_249/redsuite/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libcr_c.a(alloc.o): In function `malloc':
alloc.c:(.text.malloc+0xbc): undefined reference to `_sbrk'
alloc.c:(.text.malloc+0xec): undefined reference to `_sbrk'
c:/code_red/redsuitenxp_4.0.6_249/redsuite/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libcr_c.a(alloc.o): In function `_Csys_alloc':
alloc.c:(.text._Csys_alloc+0x18): undefined reference to `__sys_write'
alloc.c:(.text._Csys_alloc+0x1c): undefined reference to `__sys_appexit'
c:/code_red/redsuitenxp_4.0.6_249/redsuite/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libcr_c.a(fseek.o): In function `fseek':
fseek.c:(.text.fseek+0x2c): undefined reference to `__sys_istty'
fseek.c:(.text.fseek+0x68): undefined reference to `__sys_flen'
collect2: ld returned 1 exit status
make: *** [RTOS Sample3.axf] Error 1”


I know the error lie on uip_process(u8_t flag) because it is able to compile if I comment out the whole content in this function. But this function has around 1200 lines. I don't know how to verify what problem it is.

RE: FreeRTOS error on uIP_Process() function

Posted by Dave on March 27, 2013
This looks like something in the uIP code is calling a C library function, and the C library function has dependencies that are not provided by your C libraries.

If you are using Newlib then there are several functions that need porting to your environment, but they can be just stubbed out if they are not actually used.

Have you tried building without the -nostdlib option you currently have on the command line?


RE: FreeRTOS error on uIP_Process() function

Posted by murnesty on March 28, 2013
I'm using Redlib and I tried Newlib but have the same error. I tried also without -nostdlib for both Redlib and Newlib but still error.

RE: FreeRTOS error on uIP_Process() function

Posted by Richard on March 28, 2013
From the errors it looks like you have also included file that are not provided in the FreeRTOS download, probably file system related judging by their names (fseek, etc.), and that the files have system dependencies that your build is not providing so it will not link.

I don't think this is FreeRTOS related, just build related.

Regards.

RE: FreeRTOS error on uIP_Process() function

Posted by murnesty on March 29, 2013
Found the problem, http://support.code-red-tech.com/CodeRedWiki/UndefinedReference. It is linker C library selection problem. The default is Redlib (none) but have to select Redlib (nohost) or Redlib (semihost). It compiles and link successfully with Redlib (nohost).


[ 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