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

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