Hi, Could any one help me.
I got a lot of Errors L6216E (listed at the end of this post).
I am using Sample code LEDSwitch from keil TCP/IP, and compile with RTX Kernel. What I did as follow:
In the Project Workspace: - Main C Program - LPC2300.s (added IMPORT SWI_Handler and remove SWI_Handler B SWI_Handler for RTX) - RTX_Config.c - Retarget.c - TCP_ARM.lib - LPC23_EMAC.c
I try to give you as much information that could help you to solve my problem. But if you need more information, please let me know.
thanks in advance for any help. Rudy
Include Path : C:\Keil\ARM\RL\TCPnet\SRC;C:\Keil\ARM\RL\RTX\SRC\ARM
The following is the main code:
#include <RTL.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <LPC23xx.H> .... OS_TID t_Ethernet; // Define Stacks static U64 stk_SPI_Master[400/8]; static U64 stk_Ethernet[400/8]; ...... void init (void) __task { .... t_Clock = os_tsk_create (clock, 3); /* start Clock */ t_SPI_Master = os_tsk_create_user (SPI_Master, 3, &stk_SPI_Master, sizeof(stk_SPI_Master)); t_tickTimer = os_tsk_create (tick_timer, 2); t_Ethernet = os_tsk_create_user (Ethernet, 0, &stk_Ethernet, sizeof(stk_Ethernet)); os_tsk_delete_self (); /* stop init task (no longer needed)*/ } void SPI_Master (void) __task { .... } void clock (void) __task { ... } void tick_timer (void) __task { .... } void Ethernet (void) __task { .... } /*---------------------------------------------------------------------------- * Main: Initialize and start RTX Kernel *---------------------------------------------------------------------------*/ int main (void) { os_sys_init (init); } U16 udp_callback (U8 soc, U8 *rip, U16 rport, U8 *buf, U16 len) { ...... } U16 tcp_callback (U8 soc, U8 evt, U8 *ptr, U16 par) { ..... } void send_data (U8 p2val) { U8 *sendbuf; U8 p2; /* UDP */ if (socket_udp != 0) { ..... } /* TCP */ if (socket_tcp != 0) { .... } }
The following is the Compiler Control String: --thumb -c --device DARMP -D__RTX -D__MICROLIB -g -O0 --apcs=interwork -IC:\Keil\ARM\RL\TCPnet\SRC -IC:\Keil\ARM\RL\RTX\SRC\ARM -I "C:\Keil\ARM\INC\Philips" -o ".\OutputFiles\*.o" --omf_browse ".\OutputFiles\*.crf" --depend ".\OutputFiles\*.d"
The following is the Assembler Control String: --device DARMP --pd "__RTX SETA 1" -g --apcs=interwork --pd "__MICROLIB SETA 1" -I "C:\Keil\ARM\INC\Philips" --list ".\ListingFiles\*.lst" --xref -o "*.o"
The following is the Linker Control String: *.o "C:\Keil\ARM\RV31\LIB\RTX_ARM_L.LIB" --library_type=microlib --device DARMP --strict --scatter ".\OutputFiles\MCU_Ver_3.sct" --autoat --summary_stderr --info summarysizes --map --xref --callgraph --symbols --info sizes --info totals --info unused --info veneers --list ".\ListingFiles\MCU_Ver_3.map" -o ".\OutputFiles\MCU_Ver_3.axf"
The following are the errors: .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol __fclose (referred from retarget.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol __getfsize (referred from retarget.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol MAC_Broadcast (referred from at_ethernet.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol MPool_Size (referred from at_mem.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol Mem_Pool (referred from at_mem.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol init_system (referred from at_system.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol nlocalm (referred from at_system.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol run_system (referred from at_system.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol tick_rate (referred from at_system.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol arp_MaxRetry (referred from at_arp.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol arp_Resend (referred from at_arp.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol arp_TabSize (referred from at_arp.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol arp_TimeOut (referred from at_arp.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol arp_table (referred from at_arp.o). .\OutputFiles\MCU_Ver_3.axf: Error: L6218E: Undefined symbol dispatch_frame (referred from at_ip.o). .... More error all about Error L6218E
The FlashFS does not work with microlib.
http://www.keil.com/support/man/docs/rlarm/rlarm_fs_flashfs.htm
Sorry, I was too fast. Most likely you are having a wrong retarget.c in your project. It refers to the file IO functions __fclose, __getfsize, etc. Those functions are a part of the FlashFS.
In fact you do not need a retarget.c for a microlib, because the microlib does not support semihosting.
Hi Franc,
I removed all functions and just only TCP/IP (Copy keil's sample of SwitchLED project, then convert it to RTX OS), then I compile, still have the same complain error.
At last I know in which part of code that generate this error, but I don't know why and how to fixed it.
The problem is in LPC2300.s
I comment out
;SWI_Handler B SWI_Handler
and added:
IMPORT SWI_Handler
As suggested in www.keil.com/.../rlarm_ar_create_newapp.htm
If I remove Import SWI_Handler and put back SWI_Handler B SWI_Handler, Keil will compiled with no complain.
Any idea? please let me know.
best regards, Rudy
Take a HTTP_Demo example as a reference. It has a several targets, one is configured to be used with RTX. Check if you can compile RTX HTTP_Demo.
Thank you for your help. Now it works. I copied from HTTP_Demo all the configuration files (RTX_Config.c, LPC2300_RTX.s, LPC23_EMAC.c, Net_Config.c).
Also I upgrade from MDK and RL Library from 3.11 into 3.40, and In my program, I do small changes in all task caller from
void taskName (void) __task { ... }
To
__task void taskName (void) { ... }
Once I compile, have no complain at all, download to target device and It works.
I don't know what was the problem. Is it configuration files? Previously in version 3.11, I did the same thing, copy from LEDSwitch, but so many problems. Unfortunately, I can't try previous version, because I upgraded to version 3.40.
I will do some test by using configuration files from LEDSwitch, and let you know the result.
Thank you very much for your help.