Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Bootloader doesn't build for 328p [imported]

Open cmaglie opened this issue 14 years ago • 1 comments

This is Issue 1095 moved from a Google Code project. Added by 2012-11-02T22:07:16.000Z by [email protected]. Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. cd hardware/arduino/bootloaders/atmega
  2. make clean
  3. make atmega328

What is the expected output? What do you see instead? expected successful compile... received :- avr-gcc -g -Wall -O2 -mmcu=atmega328p -DF_CPU=16000000L '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -c -o ATmegaBOOT_168.o ATmegaBOOT_168.c ATmegaBOOT_168.c: In function ‘main’: ATmegaBOOT_168.c:586:11: error: ‘EEWE’ undeclared (first use in this function) ATmegaBOOT_168.c:586:11: note: each undeclared identifier is reported only once for each function it appears in make: *** [ATmegaBOOT_168.o] Error 1

What version of the Arduino software are you using? On what operating system? Which Arduino board are you using? HEAD from github or 1.0.1

Please provide any additional information below.

pull requests made as iMartyn on github that fix this

cmaglie avatar Nov 15 '12 19:11 cmaglie

With the avr-gcc contained inside the IDE it will compile perfectly. Looks like that in the newer avr-libc toolchains the EEPROM write bit is changed from EEWE to EEPE as described above and in this forum topic: http://arduino.cc/forum/index.php/topic,37338.0.html

If you want to compile with the your system avr-gcc, you should modify the ATmegaBOOT_168.c file in line 586 to use the EEPE bit instead the EEWE.

Otherwhise in the makefile in the environment variable called "CC" add the path to the avr-gcc contained inside the IDE: CC = PATH_TO_ARDUINO_IDE/hardware/tools/avr/bin/avr-gcc

Fede85 avatar Apr 17 '13 16:04 Fede85