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

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Mon, 3 Mar 2014 14:58:38 +0200

Great!

cd build
rm sketch.cpp
make sketch.cpp
make PLATFORM=emulator

Results?

--Pekka

On 2014–03–03, at 14:44 , Eero Hakala <eero.k.hakala@xxxxxxxxx> wrote:

> Hi, I took the 32bit linker script, added same stuff as Asif and saved it 
> into scripts-directory.
> 
> Then I changed the flags in emulator.mk like Pekka instructed:
> 
> # LDFLAGS  := -m32 -demangle
> LDFLAGS  := -m32 -demangle -march=i386 -Xlinker -T -Xlinker 
> ../scripts/elf_i386.xc
> 
> And got rid of previous errors, but it hang up in main:
> g++ -m32 -march=i386 -m32 -demangle -march=i386 -Xlinker -T -Xlinker 
> ../scripts/elf_i386.xc  -o sketch  main.o sketch.o ellduino.o "-L." 
> "-L../variants/ellduino" "-lstm32f0" -lstdc++  
> main.o: In function `emulated_main':
> /home/eero/sw-engineering/sulautetut/ng-ell-i/Runtime/stm32/build/../cores/arduelli/main.cpp:36:
>  undefined reference to `setup()'
> /home/eero/sw-engineering/sulautetut/ng-ell-i/Runtime/stm32/build/../cores/arduelli/main.cpp:38:
>  undefined reference to `loop()'
> collect2: error: ld returned 1 exit status
> 
> -eero-
> 
> 
> 
> On Sun, Mar 2, 2014 at 9:56 PM, Pekka Nikander <pekka.nikander@xxxxxx> wrote:
> > You were right... the default linker script that GNU 'ld' uses resides 
> > inside /usr/lib/ldscripts named as elf_x86_64.xc. It is also attached to 
> > this email with lines 61-64 added about start and end peripherals ...
> 
> I think that is the 64-bit linker script.  I *guess* the 32-bit one might be 
> elf_i386.xc
> 
> > Please see the changed elf_x86_64.xc file attached to this e-mail.
> 
> That looks perfectly good to me.
> 
> My guess is that once you find the right i386 linker script, and get it 
> working from the command line with the -m32 -march=i386 -Xlinker -T -Xlinker 
> <your-file> arguments, you'll be done with this.
> 
> --Pekka
> 
> 
> 


Other related posts: