Trouble compiling ER9X for MEGA128 on Linux

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
MGeo
Posts: 21
Joined: Fri Feb 03, 2012 4:43 pm
Country: -

Trouble compiling ER9X for MEGA128 on Linux

Post by MGeo »

Hi,

I'm seeing an issue compiling -r816 and -r817 of er9x on an Ubuntu 14.04 machine with fresh svn load.

Code: Select all

geo@geo-Latitude-D630:~/er9x/src$ svn checkout http://er9x.googlecode.com/svn/trunk/ er9x
Checked out revision 817.
geo@geo-Latitude-D630:~$ cd er9x
geo@geo-Latitude-D630:~/er9x$ cd src
geo@geo-Latitude-D630:~/er9x/src$ make CPU=128 EXT=FRSKY PHASES=YES

-------- begin --------
avr-gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cat: .svn/entries: No such file or directory

Generate Version-stamp:
make: *** No rule to make target `er9x.elf', needed by `elf'.  Stop.
geo@geo-Latitude-D630:~/er9x/src$ 
-r815 and earlier appear to compile ok, although cat throws an error. I'm wondering if others are seeing the same thing. I must admit the makefile is a bit beyond my debug skills.

Code: Select all

Checked out revision 815.
geo@geo-Latitude-D630:~$ cd er9x
geo@geo-Latitude-D630:~/er9x$ cd src
geo@geo-Latitude-D630:~/er9x/src$ make CPU=128 EXT=FRSKY PHASES=YES

-------- begin --------
avr-gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cat: .svn/entries: No such file or directory

Generate Version-stamp:

Compiling C++: er9x.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/er9x.o.d er9x.cpp -o obj/er9x.o

Compiling C++: stamp.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/stamp.o.d stamp.cpp -o obj/stamp.o

Compiling C++: menus.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/menus.o.d menus.cpp -o obj/menus.o

Compiling C++: pers.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/pers.o.d pers.cpp -o obj/pers.o

Compiling C++: file.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/file.o.d file.cpp -o obj/file.o

Compiling C++: lcd.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/lcd.o.d lcd.cpp -o obj/lcd.o

Compiling C++: drivers.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/drivers.o.d drivers.cpp -o obj/drivers.o

Compiling C++: templates.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/templates.o.d templates.cpp -o obj/templates.o

Compiling C++: pulses.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/pulses.o.d pulses.cpp -o obj/pulses.o

Compiling C++: audio.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/audio.o.d audio.cpp -o obj/audio.o

Compiling C++: frsky.cpp
avr-gcc -c -mmcu=atmega128 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -DFRSKY -DPHASES -DCPUM128 -DPHASES -Os -mrelax -mstrict-X -fshort-enums -Wall  -MD -MP -MF .dep/frsky.o.d frsky.cpp -o obj/frsky.o

Linking: er9x.elf
avr-gcc -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=obj/er9x.o  -std=gnu99 -fwhole-program -MD -MP -MF .dep/er9x.elf.d obj/er9x.o obj/stamp.o obj/menus.o obj/pers.o obj/file.o obj/lcd.o obj/drivers.o obj/templates.o obj/pulses.o obj/audio.o obj/frsky.o --output er9x.elf -Wl,-Map=er9x.map,--cref    -lm

Creating load file for Flash: er9x.hex
avr-objcopy -O ihex -R .eeprom er9x.elf er9x.hex

Creating load file for EEPROM: er9x.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex er9x.elf er9x.eep
avr-objcopy: --change-section-lma .eeprom=0x00000000 never used

Creating Extended Listing: er9x.lss
avr-objdump -h -S er9x.elf > er9x.lss

Creating Symbol Table: er9x.sym
avr-nm -n er9x.elf > er9x.sym

Size after:
AVR Memory Usage
----------------
Device: atmega128

Program:   71438 bytes (54.5% Full)
(.text + .data + .bootloader)

Data:       3751 bytes (91.6% Full)
(.data + .bss + .noinit)

-------- end --------

geo@geo-Latitude-D630:~/er9x/src$
Thanks,
George

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trouble compiling ER9X for MEGA128 on Linux

Post by MikeB »

That looks like me forgetting to add files to the repository (again!).
Try putting the 4 files in this .zip in your source directory and then compiling:
optiboot.zip
27-Apr-2015 09:22
Additional files for er9x for bootloader
(16.61 KiB) Downloaded 286 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
MGeo
Posts: 21
Joined: Fri Feb 03, 2012 4:43 pm
Country: -

Re: Trouble compiling ER9X for MEGA128 on Linux

Post by MGeo »

Yep, that fixed it. Thanks Mike.
willhac
Posts: 89
Joined: Tue Feb 19, 2013 11:25 am
Country: France

Re: Trouble compiling ER9X for MEGA128 on Linux

Post by willhac »

Hi Mike, I have the same error for 2561 (there is a arduinoDue.cpp in the makefile, is it missing ?)

Thanks,
Will
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trouble compiling ER9X for MEGA128 on Linux

Post by MikeB »

The missing file:
arduinoDue.zip
(2.49 KiB) Downloaded 204 times
This is something I'm using to test the er9x main board being use as an, I/O processor to an external ARM processor based board.

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

Post Reply

Return to “er9x”