Hi,
I have been trying for the last two days to integrate LwIP with KDSK 2.0. Unfortunately, with doubtful success. I just want to initialise the stack properly and retrieve an IP address via DHCP.
Whenever a packet is received (e.g. DHCP response from the router), the program gets stuck in one of the configAsserts(), either in xQueueGenericReceive or vPortEnterCritical().
The example project work perfectly and I can upload and debug them with the Segger OpenSDA v2 firmware. I tried to compare the files from the example projects with my own, but I couldn't find the mistake! I KDSK2 documentation is also pretty vage on how to integrate the lwip stack.
Here is the code: GitHub - dh1tw/BasicEthernet-K64F
After downloading the KSDK2.0 for my K64F I created a new (minimal + FreeRTOS) Project in KDS 3.1 using the Kinetis SDK 2.x Project Wizard.
I copied the lwip stack manually into the project and included the paths:
../lwip_1.4.1
../lwip_1.4.1/port
../lwip_1.4.1/src
../lwip_1.4.1/src/include
../lwip_1.4.1/src/include/ipv4
../lwip_1.4.1/src/include/ipv4/lwip
../lwip_1.4.1/src/include/lwip
../lwip_1.4.1/src/include/netif
../lwip_1.4.1/src/include/posix
My Preprocessor symbols are:
DEBUG
CPU_MK64FN1M0VMD12
USE_RTOS=1
FRDM_K64F
FREEDOM
FSL_RTOS_FREE_RTOS
and I use the following compiler flags:
-fno-common -ffreestanding -fno-builtin -mapcs
I would very much appreciate any help / feedback.
Thanks,
Tobias