Libraries, utilities, bootloaders...
by zarathoustroy » Sun Sep 04, 2016 4:27 pm
here is the compilation line:
/Users/francoisjacob/Dropbox/maker/arduino/2boots/arduino-1.0.5-macosx/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DMMC_CS=PORTB2' '-DMMC_PORT=PORTB' '-DMMC_DDR=DDRB' -I/Users/francoisjacob/Dropbox/maker/arduino/2boots/arduino-1.0.5-macosx/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard -I/Users/francoisjacob/Dropbox/maker/arduino/2boots/arduino-1.0.5-macosx/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard -I./ -MMD prog_flash.c -o obj/./prog_flash.c.o
and the flags from the makefile (unchanged from git):
# compiler flags for c files
CFLAGS = -c -g -Os -Wall -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' \
'-DMMC_CS=PORTB2' '-DMMC_PORT=PORTB' '-DMMC_DDR=DDRB'
# '-DMMC_CS=PORTD4' '-DMMC_PORT=PORTD' '-DMMC_DDR=DDRD'
# linker flags
LINK_FLAGS = -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -Wl,--relax -Wl,--gc-sections -nostartfiles -nostdlib \
-Wl,--section-start=.text=0x7800 \
-Wl,--section-start=.jumps=0x7ffa \
-Wl,--section-start=.version=0x7ffe \
-Wl,--undefined=optiboot_version \
-Wl,--undefined=_jumptable
-
zarathoustroy
-
- Posts: 7
- Joined: Sat Sep 03, 2016 3:59 pm
by Sorunome » Sun Sep 04, 2016 7:01 pm
-
![User avatar](./download/file.php?avatar=1544_1461863552.png)
Sorunome
-
- Posts: 629
- Joined: Sun Mar 01, 2015 1:58 pm
-
by zarathoustroy » Mon Sep 05, 2016 10:05 am
I was unsuccessfully trying the modifications of inajob, then having a lot of compilation errors...
This morning I tried on another machine with windows seven instead of Macosx and still got the same error !
Compiling gamebuino_boot.c
C:/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DMMC_CS=PORTB2' '-DMMC_PORT=PORTB' '-DM
MC_DDR=DDRB' -IC:/arduino-1.0.5/hardware/arduino/variants/standard -IC:/arduino-1.0.5/hardware/arduino/variants/standard -I./ -MMD gamebuino_boot.c -o obj/./gamebuino_boot.c.o
Compiling mmc_fat.c
C:/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DMMC_CS=PORTB2' '-DMMC_PORT=PORTB' '-DM
MC_DDR=DDRB' -IC:/arduino-1.0.5/hardware/arduino/variants/standard -IC:/arduino-1.0.5/hardware/arduino/variants/standard -I./ -MMD mmc_fat.c -o obj/./mmc_fat.c.o
Compiling prog_flash.c
C:/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DMMC_CS=PORTB2' '-DMMC_PORT=PORTB' '-DM
MC_DDR=DDRB' -IC:/arduino-1.0.5/hardware/arduino/variants/standard -IC:/arduino-1.0.5/hardware/arduino/variants/standard -I./ -MMD prog_flash.c -o obj/./prog_flash.c.o
Linking obj/gamebuino_boot.elf
c:/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: section .jumps [00007ffa -> 00007ffd] overlaps section .text [00007800 -> 00008055]
make: *** [obj/gamebuino_boot.elf] Error 1
I'm still searching...
-
zarathoustroy
-
- Posts: 7
- Joined: Sat Sep 03, 2016 3:59 pm
by zarathoustroy » Mon Sep 05, 2016 12:53 pm
I have some doubts about my avr-gcc and ld versions, here is what I have about my avr_gcc version and avr_ld versions, could you please tell me what are yours? Where did you download the Arduino1.0.5 IDE? (It seems there are many locations for it...)
C:/arduino-1.0.5/hardware/tools/avr/avr/bin/ld.exe -v
GNU ld (WinAVR 20081205) 2.19
C:/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.2/configure --enable-win32-registry=WinAVR-20081205 --with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable-libada --
disable-libssp --disable-nls --with-pkgversion='WinAVR 20081205' --with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.2 (WinAVR 20081205)
-
zarathoustroy
-
- Posts: 7
- Joined: Sat Sep 03, 2016 3:59 pm
by Sorunome » Mon Sep 05, 2016 3:20 pm
zarathoustroy wrote:I have some doubts about my avr-gcc and ld versions, here is what I have about my avr_gcc version and avr_ld versions, could you please tell me what are yours? Where did you download the Arduino1.0.5 IDE? (It seems there are many locations for it...)
C:/arduino-1.0.5/hardware/tools/avr/avr/bin/ld.exe -v
GNU ld (WinAVR 20081205) 2.19
C:/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.2/configure --enable-win32-registry=WinAVR-20081205 --with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable-libada --
disable-libssp --disable-nls --with-pkgversion='WinAVR 20081205' --with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.2 (WinAVR 20081205)
I'm sorry, I don't have any more information anymore than provided in the github thread. I did compile it successful with a new gcc version at some point but i lost the makefile for that....
The key is to play around with the arguments the in the makefile
EDIT: the bootloader was originally compiled with arduino IDE 1.0.5 which uses avr-gcc 4.3.2
EDIT2: to get it to compile i did a lot of reseach (google!) on how to make code smaller with command line options for gcc and tried around quite some
-
![User avatar](./download/file.php?avatar=1544_1461863552.png)
Sorunome
-
- Posts: 629
- Joined: Sun Mar 01, 2015 1:58 pm
-
by zarathoustroy » Tue Sep 06, 2016 5:20 am
Thank you for the time and information. I will still try to compile it. Maybe I'll change some functionalities of the bootloader that I don't need so it will fit in 2K even with my bad environment.
-
zarathoustroy
-
- Posts: 7
- Joined: Sat Sep 03, 2016 3:59 pm
by spinal » Tue Nov 22, 2016 5:39 pm
I don't suppose anyone would be willing to create an Atmega23u4 version of this boot loader? I'm currently using a Pro Micro (I killed my nano).
-
![User avatar](./download/file.php?avatar=1897_1477125116.gif)
spinal
-
- Posts: 22
- Joined: Thu Oct 20, 2016 7:39 pm
Return to Software Development
Who is online
Users browsing this forum: No registered users and 11 guests