Hello there,
I'm trying to implement a lwIP stack to my project using KSDK2.2.
When testing the TCPECHO example it works just fine, but when I copy the lwIP folder to my project, and add the paths to "MCU C Compiler -> Includes" and to "MCU Assembler -> General", the build fails with the following console error:
Building target: MK64FN1M0xxx12_Project.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="MK64FN1M0xxx12_Project.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -T MK64FN1M0xxx12_Project_Debug.ld -o "MK64FN1M0xxx12_Project.axf" ./utilities/fsl_debug_console.o ./utilities/fsl_notifier.o ./utilities/fsl_shell.o ./twrk64f120m/board.o ./twrk64f120m/clock_config.o ./twrk64f120m/pin_mux.o ./startup/startup_mk64f12.o ./source/MK64FN1M0xxx12_Project.o ./freertos/croutine.o ./freertos/event_groups.o ./freertos/fsl_tickless_lptmr.o ./freertos/fsl_tickless_systick.o ./freertos/heap_4.o ./freertos/list.o ./freertos/port.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_cmp.o ./drivers/fsl_common.o ./drivers/fsl_dspi.o ./drivers/fsl_dspi_freertos.o ./drivers/fsl_enet.o ./drivers/fsl_flash.o ./drivers/fsl_gpio.o ./drivers/fsl_pit.o ./drivers/fsl_smc.o ./drivers/fsl_sysmpu.o ./drivers/fsl_uart.o ./drivers/fsl_uart_freertos.o ./drivers/fsl_wdog.o ./CMSIS/system_MK64F12.o
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 32108 B 1 MB 3.06%
SRAM_UPPER: 40228 B 192 KB 20.46%
./source/MK64FN1M0xxx12_Project.o: In function `Init_task':
SRAM_LOWER: 0 GB 64 KB 0.00%
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:485: undefined reference to `tcpip_init'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:492: undefined reference to `netif_remove'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:488: undefined reference to `netif_add'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:499: undefined reference to `dhcp_start'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:504: undefined reference to `lwip_strerr'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:515: undefined reference to `ip4addr_ntoa'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:516: undefined reference to `ip4addr_ntoa'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:517: undefined reference to `ip4addr_ntoa'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:519: undefined reference to `netif_set_default'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:526: undefined reference to `ethernet_input'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:526: undefined reference to `ethernetif_init'
./source/MK64FN1M0xxx12_Project.o: In function `UDP1_Task':
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:691: undefined reference to `netif_set_up'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:694: undefined reference to `netconn_new_with_proto_and_callback'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:695: undefined reference to `sys_assert'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:698: undefined reference to `netconn_bind'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:711: undefined reference to `netconn_recv'
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:713: undefined reference to `netbuf_data'
FLEX_RAM: 0 GB 4 KB 0.00%
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:722: undefined reference to `netbuf_delete'
./source/MK64FN1M0xxx12_Project.o: In function `main':
C:\workspace.MCUXpresso\MK64FN1M0xxx12_Project\Debug/../source/MK64FN1M0xxx12_Project.c:886: undefined reference to `sys_thread_new'
collect2.exe: error: ld returned 1 exit status
make: *** [MK64FN1M0xxx12_Project.axf] Error 1
I already checked the paths and don't know what to do anymore.
Any idea would be of plenty help.
Thank you.
Best Regards,
Gustavo Cossta
R&D Engineer
解決済! 解決策の投稿を見る。
Hi Gustavo,
I don't know why it can't add new folder under the project , while I find a workaround ,
move the lwip folder under a existing folder, for example "source", then also change the path on
"MCU C Compiler -> Includes"
I also attached your project after moving.
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
Please share your project.
BR
Alice
Hi Alice,
thank you for the reply.
I just created a project from MCUXpresso Quickstart page choose the board as a TWR-K64 with KSDK2.2 and add otherthings as FreeRTOS, some drivers and utilities (without semihosting). Then, when I copy the lwIP folder from a example project and added the include paths as was in the project I get this error. Anyway, my project is attached.
I was able to work arround this problem by importing an example and turning it into my project, but I could really use a step by step guide on how to add stacks to a project.
Thank you very much.
Best regards,
Gustavo Costa
R&D Engineer
Hi Gustavo,
I don't know why it can't add new folder under the project , while I find a workaround ,
move the lwip folder under a existing folder, for example "source", then also change the path on
"MCU C Compiler -> Includes"
I also attached your project after moving.
Hope it helps
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you very much Alice_Yang,
I'll try doing this from now on.
Best Regards,
Gustavo Costa
R&D Engineer
Helllo Gustavo,
Welcome !
BR
Alice
Hello Alice_Yang,
sorry to bother you again.
Now I am trying to include the USB Stack from the example "USB Host MSD FATFS" provided by the MCUXpresso SDK, and I get the same problem.
Even after placing the code into my "source" directory I could not make it work. I must be doing something wrong. Bellow there is some pictures of what I am trying to do:
And this is the error I get:
20:26:57 **** Incremental Build of configuration Debug for project MK64F120M_RUA02 ****
make -r -j4 all
utilities/subdir.mk:24: *** unterminated variable reference. Stop.
But now I can't make the workaround I did last time because I've already have the lwIP included.
Hope you can help me.
Thank you again for your collaboration.
Best regards,
Gustavo Costa
R&D Engineer
Hi Gustavo,
Please share the message in "Problems" view :
also send your project to me .
Sorry for the bad internet somedays ago , I just checked this message haven't been send.
BR
Alice