[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 16:26:44 +0200

Success!  

Now, next I'll need a clean pull request...

--P

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

> hahhaa, the problem was aktually in sketch.cpp... when I changed it to:
> 
> #include <Arduino.h>
> 
> void setup() {}
> void loop() {}
> 
> So it didn't like those \n:s after all.... Now when running sketch I get the 
> output as:
> 
> RCC:CR:200ff83|=1
> RCC:CFGR:8&=f8ffb80c
> RCC:CR:200ff83&=fef6ffff
> RCC:CR:200ff83&=fffbffff
> RCC:CFGR:8&=ffc0ffff
> RCC:CFGR2:0&=fffffff0
> RCC:CFGR3:0&=fffffeac
> RCC:CR2:ff80&=fffffffe
> RCC:CIR:=0
> FLASH:ACR:=11
> RCC:CFGR:8|=0
> RCC:CFGR:8|=0
> RCC:CFGR:8&=ffc0ffff
> RCC:CFGR:8|=280000
> RCC:CR:200ff83|=1000000
> RCC:CR:300ff83&2000000
> RCC:CFGR:280008&=fffffffc
> RCC:CFGR:280008|=2
> RCC:CFGR:28000a&c
> InitRecord: 804a888 type: 0 count: 1
> RCC:AHBENR:14=400014
> InitRecord: 804a89c type: 0 count: 1
> RCC:AHBENR:400014=500014
> ...
> 
> 
> 
> -eero-
> 
> 
> On Mon, Mar 3, 2014 at 2:58 PM, Pekka Nikander <pekka.nikander@xxxxxx> wrote:
> 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: