lwIP - MCUXpresso SDK v2.7.0, IDE v11.1

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

lwIP - MCUXpresso SDK v2.7.0, IDE v11.1

813 Views
sigmundshvimer
Contributor I

Hi everyone,

I am using MCUXpresso IDE v11.1 with SDK v2.7.0 lwIP examples.

Few corrections needed in order to compile and debug with Hyper Terminal:

opt.h: #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 (0 leads to error:

"Bare metal requires LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT=1 because

pbuf_free() is being called from an ISR")

board.h:

replace #define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_Flexcomm0)

with #define BOARD_DEBUG_UART_CLK_FREQ

CLOCK_GetFreq((clock_name_t)kCLOCK_FlexComm0)

board.c:

replace result = DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR,

BOARD_DEBUG_UART_BAUDRATE, DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM,

BOARD_DEBUG_UART_CLK_FREQ);

with result = DbgConsole_Init(0, BOARD_DEBUG_UART_BAUDRATE,

kSerialPort_Uart, BOARD_DEBUG_UART_CLK_FREQ);

replace dynTiming.tWr_Ns = (1000000000 / CLOCK_GetFreq(kCLOCK_EMC) +

SDRAM_TWRDELT_NS); /* one clk + 6ns */

with dynTiming.tWr_Ns = (1000000000 /

CLOCK_GetFreq((clock_name_t)kCLOCK_Emc) + SDRAM_TWRDELT_NS); /* one clk +

6ns */

In Project properties change SDK_DEBUGCONSOLE=0 with SDK_DEBUGCONSOLE=1

When running debug I get "ethernetifConfig->non_dma_memory == NULL" for all

project examples except lpcxpresso54618_hwip_ping_bm.

In lwipopts.h the NO_SYS is 1, which what I need:

#define NO_SYS 1

Am I supposed to write my own memory allocation (free) functions with

NO_SYS=1?

Please help,

Thank you,

Sigmund

1 Reply

671 Views
sigmundshvimer
Contributor I

I resolved the issues by commenting out LWIP_ASSERT in enet_ethernetif_lpc.c file:

LWIP_ASSERT("ethernetifConfig->non_dma_memory == NULL", (ethernetifConfig->non_dma_memory != NULL));
ethernetif->non_dma_memory = ethernetifConfig->non_dma_memory;

Hope someone else will find it useful.