From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Trenton D. Adams" To: "'eCos Discussion'" Subject: [ECOS] Confirmed error in eth_drv.c Date: Mon, 20 Aug 2001 09:47:00 -0000 Message-id: <002101c12997$d6f81e70$090110ac@TRENT> X-SW-Source: 2001-08/msg00663.html I get the following output from the config tool v2.04 /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c: In function `eth_drv_send': /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:617: parse error before `static' make[1]: Leaving directory `/c/MyDocuments/eCosBuilds/RAMSupport_build/io/eth/current' /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:629: `mbuf_key' undeclared (first use in this function) make: Leaving directory `/c/MyDocuments/eCosBuilds/RAMSupport_build' /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:629: (Each undeclared identifier is reported only once /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:629: for each function it appears in.) /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:504: warning: `m0' might be used uninitialized in this function /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c: At top level: /cygdrive/C/MyDocuments/eCosRepository/ecos/packages/io/eth/current/src/ net/eth_drv.c:284: warning: `eth_drv_tx_done' used but never defined make[1]: *** [src/net/eth_drv.o.d] Error 1 It would appear that the #ifdef _LOCK_WITH_ROM_MONITOR begins before the end of the while loop and ends after the while loop. So, this would naturally cause a parse error! It appears to have been done on 2001-08-14 which is probably why I never seen it before. So, just move the "#endif // _LOCK_WITH_ROM_MONITOR" and "#undef _LOCK_WITH_ROM_MONITOR" up above the end of the while loop. Works for me now! :) #ifdef _LOCK_WITH_ROM_MONITOR // Unlock the driver & hardware. It can once again be safely shared. if (need_lock) { cyg_drv_dsr_unlock(); #ifdef _LOCK_USING_INTERRUPTS HAL_RESTORE_INTERRUPTS(ints); #endif } } // this here appears to me to be the end of the while loop #endif // _LOCK_WITH_ROM_MONITOR #undef _LOCK_WITH_ROM_MONITOR Trenton D. Adams Extreme Engineering #17, 6025 - 12 St. SE Calgary, Alberta, Canada T2H 2K1 Phone: 403 640 9494 ext-208 Fax: 403 640 9599 http://www.extremeeng.com