[ell-i-developers] Re: Ellduino Emulator: Fixing issues for Linux (Ubuntu 12.04 LTS)

  • From: Eero Hakala <eero.k.hakala@xxxxxxxxx>
  • To: ell-i-developers <ell-i-developers@xxxxxxxxxxxxx>
  • Date: Tue, 4 Mar 2014 21:48:14 +0200

Didn't compile, this is when not commenting it away:
g++ -c -std=c++11 -g -Os -Wall -ffunction-sections -fdata-sections
-fno-common -nostdlib -m32 -march=i386 -DF_CPU=48000000L -DARDUINO=1.5.4
-DELLI_STM32F051_ELLDUINO -DARDUINO_ARCH_STM32 -fno-rtti -fno-exceptions
-fno-threadsafe-statics -DEMULATOR -D__STM32F051__ -Dmain=emulated_main
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../emulator/inc
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../cores/arduelli
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../system/stm32/inc
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../system/stm32/CMSIS/Include
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../variants/ellduino
-I/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../libraries/SPI/.
-c -o test_pinMode.o test_pinMode.cpp
test_pinMode.cpp: In function 'void loop()':
test_pinMode.cpp:32:12: error: '_exit' was not declared in this scope
     _exit(0);
            ^
make[1]: *** [test_pinMode.o] Error 1
make[1]: Leaving directory
`/home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/test_pinMode'
make: *** [test_pinMode] Error 2


-eero-



On Tue, Mar 4, 2014 at 9:39 PM, Pekka Nikander <pekka.nikander@xxxxxx>wrote:

> > Hi all, when running make in tests directory, the linker got lost again
> because the path was at a deeper level... Now it is corrected (after Pekka
> accepts my pull request)!
>
> Thanks, merged.
>
> > All in all tests went well, system didn't like _exit(0) so I just
> commented it away...
>
> What do you mean it "didn't like"?  Didn't compile?  Crashed?  If crashed,
> what does gdb say?
>
>   $ gdb binary
>   run
>   where
>
> > ./test_SPI_begin: NOK, got errors
> > test_SPI_begin.o: In function `SPIClass::begin(unsigned char) const':
> >
> /home/eero/sw-engineering/sulautetut/eeronomarepo/Runtime/stm32/tests/../libraries/SPI/./SPIClass.h:83:
> undefined reference to `spi_master_begin'
> > test_SPI_begin.o:(.rodata._ZL5SPI_2+0x4): undefined reference to
> `spimap2'
> > test_SPI_begin.o:(.rodata._ZL3SPI+0x4): undefined reference to `spimap1'
> > collect2: error: ld returned 1 exit status
> > make[1]: *** [test_SPI_begin] Error 1
> > make: *** [test_SPI_begin] Error 2
>
> I think Ivan saw this also when compile for the real board.  I think he
> has fixed it in his copy, but just haven't been able to produce a pull
> request yet.
>
> --Pekka
>
>
>

Other related posts: