mbed IP library over Ethernet

Dependencies:   lwip-eth Socket lwip lwip-sys

Dependents:   denki-yohou_b Network-RTOS NTPClient_HelloWorld temp_FIAP ... more

Issue: sys_arch.c error

How can I start a error issue for lwip-sys? There is an error in the message fetching procedures that prevents STM devices from working.The current version does not cover the osOK event status. A corrected version for sys_arch_mbox_fetch is this:

u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void msg, u32_t timeout) { u32_t start = us_ticker_read();

osEvent event = osMessageGet(mbox->id, (timeout != 0)?(timeout):(osWaitForever));

  1. ifdef LWIP_DEBUG if (event.status!=1) { LWIP_DEBUGF(SYSARCH_DEBUG, ("mbox 0x%x %d\r\n",mbox,event.status)); }
  2. endif if (event.status == osOK) {
  • msg = (void*)event.def.message_id; LWIP_DEBUGF(SYSARCH_DEBUG, ("sys_arch message 0x%x id %d \n",msg)); return (us_ticker_read() - start) / 1000; }

if (event.status == osEventMessage) { LWIP_DEBUGF(SYSARCH_DEBUG, ("sys_arch mbox fetch mbox 0x%x id %d \n",mbox,mbox->id));

  • msg = (void *)event.value.v; return (us_ticker_read() - start) / 1000; } else { return SYS_ARCH_TIMEOUT; }

}

I dont have a URL to testcase program since the STM32F746 Discovery EMAC driver requires also changes in the linkerscript (only have gcc) to make use of SRAM2 ("The AHB masters support concurrent SRAM accesses (from the Ethernet or the USB OTG HS): for instance, the Ethernet MAC can read/write from/to SRAM2 while the CPU is reading/writing from/to SRAM1."-from the manual)

1 comment:

12 Apr 2016

Hi,

please report it to https://github.com/mbedmicro/mbed