Any idea about this error?
gcc -oxtmpmain.exe xtmpmain.o fiber_driver.o xtmp_options.o getopt.o D:\usr\xtensa\XtDevToolsDE\in stall\tools\RB-2008.4-win32\XtensaTools\lib\iss\xtmp.lib xtmpmain.o(.text+0x213):xtmpmain.c: undefined reference to `_uart_setup' xtmpmain.o(.text+0x2da):xtmpmain.c: undefined reference to `_uart_cleanup' collect2: ld returned 1 exit status make: *** [xtmpmain.exe] Error 1
It means that xtmpmain.c called functions named
uart_setup()anduart_cleanup(), but they weren’t found by the linker. You probably need to include a library, or to implement those functions for Windows in terms of the Win32 API.Some “is it plugged in questions” are:
__cdecland__stdcallare very different animals. They usually produce mismatched exported symbol names for safety, and this error can be a symptom of that.If this is a porting project, then it is likely that the original implementation of a UART-related function is written in a platform-dependent way. In that case, they often would be guarded by a
#ifdefof some form that depends on the compile-time platform.To resolve that, you would need to implement them for this platform, in a style consistent with their usage in the rest of the application, and similarly guarded.