FreeRTOS uIP for LPC2368

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS uIP for LPC2368

407 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by murnesty on Wed Mar 27 02:09:48 MST 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:

Quote:

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.
Labels (1)
0 Kudos
1 Reply

277 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by murnesty on Wed Mar 27 22:23:50 MST 2013
I saw this FAQ at code red
http://support.code-red-tech.com/CodeRedWiki/UndefinedReference
under "Undefined References with Redlib (v2)"

I get the same issue there.
1) startup code : I'm able to compile and run the project before adding the new code so I don't think this is the problem.

2) semihosting interface layer : I can't find the keyword for __write and __readc so I don't think this is the problem.

3) printf variants : I tried directly adding a define in stdio.h (#define CR_INTEGER_PRINTF, #define CR_PRINTF_CHAR) but the error still the same.

4) heap allocation/checking : I don't know much of this and I just know freeRTOS has also a heap file. I have check my *.map and i get this : Is it my global variable used too much?

COMMON         0x400076e4        0x8 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(__init_alloc.o)
                0x400076e4                __heaps
                0x400076e8                __end_of_heap
                0x400076ec                . = ALIGN (0x4)
                0x400076ec                _ebss = .
                0x400076ec                PROVIDE (end, .)
                0x400076ec                PROVIDE (_pvHeapStart, .)
                0x40008000                PROVIDE (_vStackTop, (__top_Ram32 - 0x0))

5) linker script : i'm using auto manage linker script mechanism and no issue again.

6) assert : I'm using Redlib(none)so no issue.

7) number of open files : Don't understand "open file".

8) errno : no "unresolved refence to errno" message shown.

Any suggestion?
0 Kudos