How to build the code?

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
Post Reply
neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

How to build the code?

Post by neolu »

How to compiler the code(ERSKY9x)?
yagarto-bu-2.22_gcc-4.7.1-c-c++_nl-1.20.0_gdb-7.4.1_eabi_20120616 + Cygwin ?

Thanks

bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: How to build the code?

Post by bertrand35 »

Right. Where is the problem?
Bertrand.
neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

Re: How to build the code?

Post by neolu »

C:\ersky9x\trunk\src
>make
.dep/core_cm3.o.d:1: *** multiple target patterns. Stop.

C:\ersky9x\trunk\src
>
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: How to build the code?

Post by Rob Thomson »

Best check with Mike on that one....

Under open9x we add loads or compile time options. There may be some you need on ersky9x.

Rob
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: How to build the code?

Post by MikeB »

May be a different make program. I don't use cygwin. I already had WINAVR installed, so I used all the utilities, including make I believe, from there.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

Re: How to build the code?

Post by neolu »

Hi Mike

I used Winavr but still can not compile.


Thanks,

D:\ersky9x\trunk\src>make

arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer
-Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=core_cm3.lst -Dat91sam3s4 -D
RUN_FROM_FLASH=1 -MD -MP -MF .dep/core_cm3.o.d -I . -I./inc core_cm3.c -o core_c
m3.o
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s: Assembler messages:
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s:533: Error: registers may not be th
e same -- `strexb r0,r0,[r1]'
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s:557: Error: registers may not be th
e same -- `strexh r0,r0,[r1]'
make: *** [core_cm3.o] Error 1

D:\ersky9x\trunk\src>
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: How to build the code?

Post by bertrand35 »

I use the 4.6.2 version of arm-gcc.
Bertrand.

Side note: Mike on open9x I only use -Os on the stock board. For the other boards I use -O2
neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

Re: How to build the code?

Post by neolu »

bertrand35:
where to download 4.6.2 version of arm-gcc? windows linux?
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: How to build the code?

Post by gohsthb »

4.6.2 is on the yagarto sourceforge page
http://sourceforge.net/projects/yagarto ... /20111119/
-Gohst
neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

Re: How to build the code?

Post by neolu »

thanks Gohst.

I used Winavr + 4.6.2 arm-gcc.


New error info:


-Wall -fverbose-asm -Wa,-ahlms=ersky9x.lst -Dat91sam3s4 -DRUN_FROM_FLASH=1 -DFR
SKY -MD -MP -MF .dep/ersky9x.o.d -fno-exceptions -I . -I./inc ersky9x.cpp -o ers
ky9x.o
ersky9x.cpp: In function 'void mainSequence(uint32_t)':
ersky9x.cpp:962:58: warning: array subscript is above array bounds [-Warray-boun
ds]
ersky9x.cpp: At global scope:
ersky9x.cpp:3203:13: warning: 'void init_soft_power()' defined but not used [-Wu
nused-function]
arm-none-eabi-gcc core_cm3.o board_lowlevel.o crt.o vectors_sam3s.o coos.o stam
p.o drivers.o diskio.o sdcard_driver.o ff.o gtime.o sound.o lcd.o debug.o file.o
templates.o pers.o menus.o frsky.o audio.o ersky9x.o -mcpu=cortex-m3 -mthumb -n
ostartfiles -Tsam3s4c_flash.ld -Wl,-Map=ersky9x_rom.map,--cref,--no-warn-mismatc
h -o ersky9x_rom.elf
menus.o:(.rodata+0x134): multiple definition of `stamp5'
stamp.o:(.rodata+0x0): first defined here
menus.o:(.rodata+0xf6): multiple definition of `stamp4'
stamp.o:(.rodata+0xb): first defined here
c:/program files (x86)/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../ar
m-none-eabi/bin/ld.exe: Warning: size of symbol `stamp4' changed from 18 in stam
p.o to 16 in menus.o
menus.o:(.rodata+0x125): multiple definition of `stamp3'
stamp.o:(.rodata+0x1d): first defined here
menus.o:(.rodata+0x114): multiple definition of `stamp2'
stamp.o:(.rodata+0x2c): first defined here
menus.o:(.rodata+0x106): multiple definition of `stamp1'
stamp.o:(.rodata+0x3d): first defined here
c:/program files (x86)/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../ar
m-none-eabi/bin/ld.exe: Warning: size of symbol `stamp1' changed from 17 in stam
p.o to 14 in menus.o
collect2: ld returned 1 exit status
make: *** [ersky9x_rom.elf] Error 1

D:\ersky9x\trunk\src>
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: How to build the code?

Post by MikeB »

You need some options after the MAKE command.
First - specify the REVB board (REVB=1).
Second - specify use the generated stamp info (STAMP=1)
I also use include debugging code (DEBUG=1)
I also have an early version of the board I use for testing that only has a 3S2 (not 3S4) version of the processor (SAM3S2=1)

So you want:
make REVB=1 STAMP=1
or:
make REVB=1 STAMP=1 DEBUG=1

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: How to build the code?

Post by Romolo »

neolu wrote:Hi Mike

I used Winavr but still can not compile.


Thanks,

D:\ersky9x\trunk\src>make

arm-none-eabi-gcc -c -mcpu=cortex-m3 -Os -gdwarf-2 -mthumb -fomit-frame-pointer
-Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=core_cm3.lst -Dat91sam3s4 -D
RUN_FROM_FLASH=1 -MD -MP -MF .dep/core_cm3.o.d -I . -I./inc core_cm3.c -o core_c
m3.o
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s: Assembler messages:
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s:533: Error: registers may not be th
e same -- `strexb r0,r0,[r1]'
C:\Users\neolu\AppData\Local\Temp\cc4a7VWX.s:557: Error: registers may not be th
e same -- `strexh r0,r0,[r1]'
make: *** [core_cm3.o] Error 1

D:\ersky9x\trunk\src>
Mike there is an issue in the code with latest 4.7.1 and latest binutils.
have a look here:
http://old.nabble.com/-Bug-gas-13215--N ... 16436.html
and here:
http://code.google.com/p/open9x/source/detail?r=1153

As you can see in open9x we patched it.
Now it compiles without troubles even with 4.7.1
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: How to build the code?

Post by MikeB »

Thanks, I'm still using the 4.6.0 I downloaded at the start of the ersky9x project.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: How to build the code?

Post by Romolo »

Yes we still use 4.6.2 on server, but yesterday I upgraded compiler chain on my desktop and I discovered this error too, the bad thing is that is assembled the same way on 4.6.2 only the warning is missing.
The bad news is that, accordingly to atmel datasheet, it brings to unpredictable result, the good one is: that code doesn't seem used.
But as the fix is very simple it seems worth to be patched.

BTW we have no flash usage issue on arm but 4.7.1 spares 350 bytes
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: How to build the code?

Post by MikeB »

I might upgrade when I have some time then. I have put the fix in ersky9x anyway.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
neolu
Posts: 6
Joined: Wed Jul 18, 2012 4:03 pm
Country: -

Re: How to build the code?

Post by neolu »

The code is compiled ok.

Start study the code.

Thanks

Post Reply

Return to “erskyTx (was ersky9x)”