From 664e9af2cd359b6e301c43cbfd21a80f390df5f4 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 14 May 2011 12:25:39 -0400 Subject: [PATCH 1/6] Fixing 300 baud communication for serial. Because UBBR is only 12 bits, we were overflowing it at 300 baud because of the use of the U2X bit. Now we turn off U2X if it would yield a UBBR value that would overflow. Note that this breaks 300 baud communication with the computer on the Uno and Mega 2560 because the 8U2 USB-serial firmware has this same bug (and previously they cancelled each other out). Since, however, it seems more likely that people will need to use 300 baud to communicate with other (legacy) hardware than with the computer, I'm making this change. Issue for 8U2 firmware bug: http://code.google.com/p/arduino/issues/detail?id=542 http://code.google.com/p/arduino/issues/detail?id=522 --- cores/arduino/HardwareSerial.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index d6d7b60..db6b149 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -278,6 +278,8 @@ void HardwareSerial::begin(unsigned long baud) use_u2x = false; } #endif + +try_again: if (use_u2x) { *_ucsra = 1 << _u2x; @@ -286,6 +288,12 @@ void HardwareSerial::begin(unsigned long baud) *_ucsra = 0; baud_setting = (F_CPU / 8 / baud - 1) / 2; } + + if ((baud_setting > 4095) && use_u2x) + { + use_u2x = false; + goto try_again; + } // assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register) *_ubrrh = baud_setting >> 8; From 83af7e14546daeb0d2d468a6a653afe7400b90a8 Mon Sep 17 00:00:00 2001 From: ricklon Date: Mon, 6 Jun 2011 21:57:11 -0400 Subject: [PATCH 2/6] Added platforms.txt, and update boards.txt with platform=avr --- boards.txt | 33 ++++++++++++++------------- platforms.txt | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 16 deletions(-) create mode 100755 platforms.txt diff --git a/boards.txt b/boards.txt index 88a7143..e65953c 100644 --- a/boards.txt +++ b/boards.txt @@ -1,6 +1,7 @@ ############################################################## uno.name=Arduino Uno +uno.platform=avr uno.upload.protocol=stk500 uno.upload.maximum_size=32256 uno.upload.speed=115200 @@ -19,7 +20,7 @@ uno.build.pins=standard ############################################################## atmega328.name=Arduino Duemilanove or Nano w/ ATmega328 - +atmega328.platform=avr atmega328.upload.protocol=stk500 atmega328.upload.maximum_size=30720 atmega328.upload.speed=57600 @@ -40,7 +41,7 @@ atmega328.build.pins=standard ############################################################## diecimila.name=Arduino Diecimila, Duemilanove, or Nano w/ ATmega168 - +diecimila.platform=avr diecimila.upload.protocol=stk500 diecimila.upload.maximum_size=14336 diecimila.upload.speed=19200 @@ -61,7 +62,7 @@ diecimila.build.pins=standard ############################################################## mega2560.name=Arduino Mega 2560 - +mega2560.platform=avr mega2560.upload.protocol=stk500v2 mega2560.upload.maximum_size=258048 mega2560.upload.speed=115200 @@ -82,7 +83,7 @@ mega2560.build.pins=mega ############################################################## mega.name=Arduino Mega (ATmega1280) - +mega.platform=avr mega.upload.protocol=stk500 mega.upload.maximum_size=126976 mega.upload.speed=57600 @@ -103,7 +104,7 @@ mega.build.pins=mega ############################################################## mini.name=Arduino Mini - +mini.platform=avr mini.upload.protocol=stk500 mini.upload.maximum_size=14336 mini.upload.speed=19200 @@ -124,7 +125,7 @@ mini.build.pins=standard ############################################################## fio.name=Arduino Fio - +fio.platform=avr fio.upload.protocol=stk500 fio.upload.maximum_size=30720 fio.upload.speed=57600 @@ -145,7 +146,7 @@ fio.build.pins=standard ############################################################## bt328.name=Arduino BT w/ ATmega328 - +bt328.platform=avr bt328.upload.protocol=stk500 bt328.upload.maximum_size=28672 bt328.upload.speed=19200 @@ -167,7 +168,7 @@ bt328.build.pins=standard ############################################################## bt.name=Arduino BT w/ ATmega168 - +bt.platform=avr bt.upload.protocol=stk500 bt.upload.maximum_size=14336 bt.upload.speed=19200 @@ -189,7 +190,7 @@ bt.build.pins=standard ############################################################## lilypad328.name=LilyPad Arduino w/ ATmega328 - +lilypad328.platform=avr lilypad328.upload.protocol=stk500 lilypad328.upload.maximum_size=30720 lilypad328.upload.speed=57600 @@ -210,7 +211,7 @@ lilypad328.build.pins=standard ############################################################## lilypad.name=LilyPad Arduino w/ ATmega168 - +lilypad.platform=avr lilypad.upload.protocol=stk500 lilypad.upload.maximum_size=14336 lilypad.upload.speed=19200 @@ -231,7 +232,7 @@ lilypad.build.pins=standard ############################################################## pro5v328.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328 - +pro5v328.platform=avr pro5v328.upload.protocol=stk500 pro5v328.upload.maximum_size=30720 pro5v328.upload.speed=57600 @@ -252,7 +253,7 @@ pro5v328.build.pins=standard ############################################################## pro5v.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168 - +pro5v.platform=avr pro5v.upload.protocol=stk500 pro5v.upload.maximum_size=14336 pro5v.upload.speed=19200 @@ -273,7 +274,7 @@ pro5v.build.pins=standard ############################################################## pro328.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328 - +pro328.platform=avr pro328.upload.protocol=stk500 pro328.upload.maximum_size=30720 pro328.upload.speed=57600 @@ -294,7 +295,7 @@ pro328.build.pins=standard ############################################################## pro.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168 - +pro.platform=avr pro.upload.protocol=stk500 pro.upload.maximum_size=14336 pro.upload.speed=19200 @@ -315,7 +316,7 @@ pro.build.pins=standard ############################################################## atmega168.name=Arduino NG or older w/ ATmega168 - +atmega168.platform=avr atmega168.upload.protocol=stk500 atmega168.upload.maximum_size=14336 atmega168.upload.speed=19200 @@ -336,7 +337,7 @@ atmega168.build.pins=standard ############################################################## atmega8.name=Arduino NG or older w/ ATmega8 - +atmega8.platform=avr atmega8.upload.protocol=stk500 atmega8.upload.maximum_size=7168 atmega8.upload.speed=19200 diff --git a/platforms.txt b/platforms.txt new file mode 100755 index 0000000..ce35a3b --- /dev/null +++ b/platforms.txt @@ -0,0 +1,63 @@ +#########Compiler Recipe################################# +##compile c object files +##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide. + +#default.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} +#default.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} +#default.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5} +#default.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm +#default.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep +#default.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex + +########avr compile pattern ########## +#avr.recipe.c.o.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-D{7=ARDUINO}={6=Base.REVISION}{7=-I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=OBJECT_NAME} +#object name seems to have build path in it. +avr.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} + + +##compile cc object files +#avr.recipe.cc.o.pattern={0=compiler.path}{1=compiler.cc.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-DARDUINO={6=Base.REVISION}{-7=I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=BUILD_PATH}{10=OBJECT_NAME} +avr.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} +##create archives +#avr.recipe.ar.pattern={0=compiler.path}{1=compiler.ar.cmd}{2=compiler.ar.flags}{3=BUILD_PATH}{4=CORE_NAME=core.a}{5=BUILD_PATH}{6=OBJECT_NAME} +avr.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5} + +##combine gc-sections, archives, and objects +#avr.recipe.c.combine.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.combine.flags}{3=compiler.cpudef}{4=build.mcu} -o {5=BUILD_PATH}{6=SOURCE_NAME}.elf {7=BUILD_PATH}{8=SOURCE_NAME}.o {9=BUILD_PATH}{10=CORE_NAME=core.a} -L{11=BUILD_PATH} -lm +#avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}{8}::{9}::-L{10}::-lm +avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm + +##create eeprom +#avr.recipe.objcopy.eep.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.eep.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.eep +avr.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep + +##create hex +#avr.recipe.objcopy.hex.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.elf.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.hex +avr.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex + + + +######################################################## +avr.name=Arduino +#avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default +#avr.compiler.path={0}/hardware/tools/avr/bin/ +avr.compiler.c.cmd=avr-gcc +avr.compiler.c.flags=::-c::-g::-Os::-w::-ffunction-sections::-fdata-sections +avr.compiler.c.elf.flags=::-Os::-Wl,--gc-sections +avr.compiler.c.elf.cmd=avr-gcc +avr.compiler.S.flags=::-c::-g::-assembler-with-cpp +avr.compiler.cpp.cmd=avr-g++ +avr.compiler.cpp.flags=::-c::-g::-Os::-w::-fno-exceptions::-ffunction-sections::-fdata-sections +avr.compiler.ar.cmd=avr-ar +avr.compiler.ar.flags=rcs +avr.compiler.objcopy.cmd=avr-objcopy +avr.compiler.objcopy.eep.flags=::-O::ihex::-j::.eeprom::--set-section-flags=.eeprom=alloc,load::--no-change-warnings::--change-section-lma::.eeprom=0 +avr.compiler.elf2hex.flags=::-O::ihex::-R::.eeprom +avr.compiler.elf2hex.cmd=avr-objcopy +avr.compiler.ldflags= +avr.compiler.cpudef=-mmcu= +avr.compiler.upload.cmd= +avr.compiler.upload.flags= +avr.library.path=./hardware/arduino/cores/arduino +avr.library.core.path=./libraries + From d5bb81cac03cb7461025b5dab07a5d6207307dd5 Mon Sep 17 00:00:00 2001 From: ricklon Date: Wed, 15 Jun 2011 23:04:38 -0400 Subject: [PATCH 3/6] Changed :: to , for platforms.txt. Also, changes to compile process to support execAsynchronously changed to Stringp[] --- platforms.txt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/platforms.txt b/platforms.txt index ce35a3b..d3a4c1b 100755 --- a/platforms.txt +++ b/platforms.txt @@ -2,38 +2,38 @@ ##compile c object files ##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide. -#default.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} -#default.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} -#default.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5} -#default.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm -#default.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep -#default.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex +#default.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} +#default.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} +#default.recipe.ar.pattern={0}{1},{2},{3}{4},{5} +#default.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm +#default.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep +#default.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex ########avr compile pattern ########## #avr.recipe.c.o.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-D{7=ARDUINO}={6=Base.REVISION}{7=-I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=OBJECT_NAME} #object name seems to have build path in it. -avr.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} +avr.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} ##compile cc object files #avr.recipe.cc.o.pattern={0=compiler.path}{1=compiler.cc.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-DARDUINO={6=Base.REVISION}{-7=I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=BUILD_PATH}{10=OBJECT_NAME} -avr.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10} +avr.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} ##create archives #avr.recipe.ar.pattern={0=compiler.path}{1=compiler.ar.cmd}{2=compiler.ar.flags}{3=BUILD_PATH}{4=CORE_NAME=core.a}{5=BUILD_PATH}{6=OBJECT_NAME} -avr.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5} +avr.recipe.ar.pattern={0}{1},{2},{3}{4},{5} ##combine gc-sections, archives, and objects #avr.recipe.c.combine.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.combine.flags}{3=compiler.cpudef}{4=build.mcu} -o {5=BUILD_PATH}{6=SOURCE_NAME}.elf {7=BUILD_PATH}{8=SOURCE_NAME}.o {9=BUILD_PATH}{10=CORE_NAME=core.a} -L{11=BUILD_PATH} -lm -#avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}{8}::{9}::-L{10}::-lm -avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm +#avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7}{8},{9},-L{10},-lm +avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm ##create eeprom #avr.recipe.objcopy.eep.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.eep.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.eep -avr.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep +avr.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep ##create hex #avr.recipe.objcopy.hex.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.elf.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.hex -avr.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex +avr.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex @@ -42,17 +42,17 @@ avr.name=Arduino #avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default #avr.compiler.path={0}/hardware/tools/avr/bin/ avr.compiler.c.cmd=avr-gcc -avr.compiler.c.flags=::-c::-g::-Os::-w::-ffunction-sections::-fdata-sections -avr.compiler.c.elf.flags=::-Os::-Wl,--gc-sections +avr.compiler.c.flags=,-c,-g,-Os,-w,-ffunction-sections,-fdata-sections +avr.compiler.c.elf.flags=,-Os,-Wl,--gc-sections avr.compiler.c.elf.cmd=avr-gcc -avr.compiler.S.flags=::-c::-g::-assembler-with-cpp +avr.compiler.S.flags=,-c,-g,-assembler-with-cpp avr.compiler.cpp.cmd=avr-g++ -avr.compiler.cpp.flags=::-c::-g::-Os::-w::-fno-exceptions::-ffunction-sections::-fdata-sections +avr.compiler.cpp.flags=,-c,-g,-Os,-w,-fno-exceptions,-ffunction-sections,-fdata-sections avr.compiler.ar.cmd=avr-ar avr.compiler.ar.flags=rcs avr.compiler.objcopy.cmd=avr-objcopy -avr.compiler.objcopy.eep.flags=::-O::ihex::-j::.eeprom::--set-section-flags=.eeprom=alloc,load::--no-change-warnings::--change-section-lma::.eeprom=0 -avr.compiler.elf2hex.flags=::-O::ihex::-R::.eeprom +avr.compiler.objcopy.eep.flags=,-O,ihex,-j,.eeprom,--set-section-flags=.eeprom=alloc,load,--no-change-warnings,--change-section-lma,.eeprom=0 +avr.compiler.elf2hex.flags=,-O,ihex,-R,.eeprom avr.compiler.elf2hex.cmd=avr-objcopy avr.compiler.ldflags= avr.compiler.cpudef=-mmcu= From 8f9296c43e1983a5c515bced07ed177f8be6978e Mon Sep 17 00:00:00 2001 From: ricklon Date: Fri, 17 Jun 2011 00:54:58 -0400 Subject: [PATCH 4/6] A bit of cleanup. Delimeter not figured out yet. --- platforms.txt | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/platforms.txt b/platforms.txt index d3a4c1b..3f1d2eb 100755 --- a/platforms.txt +++ b/platforms.txt @@ -2,38 +2,38 @@ ##compile c object files ##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide. -#default.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} -#default.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} -#default.recipe.ar.pattern={0}{1},{2},{3}{4},{5} -#default.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm -#default.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep -#default.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex +#default.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10} +#default.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10} +#default.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5} +#default.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}|{8}|-L{9}|-lm +#default.recipe.objcopy.eep.pattern={0}{1}|{2}|{3}.elf|{4}.eep +#default.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.hex ########avr compile pattern ########## #avr.recipe.c.o.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-D{7=ARDUINO}={6=Base.REVISION}{7=-I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=OBJECT_NAME} #object name seems to have build path in it. -avr.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} +avr.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10} ##compile cc object files #avr.recipe.cc.o.pattern={0=compiler.path}{1=compiler.cc.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-DARDUINO={6=Base.REVISION}{-7=I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=BUILD_PATH}{10=OBJECT_NAME} -avr.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10} +avr.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10} ##create archives #avr.recipe.ar.pattern={0=compiler.path}{1=compiler.ar.cmd}{2=compiler.ar.flags}{3=BUILD_PATH}{4=CORE_NAME=core.a}{5=BUILD_PATH}{6=OBJECT_NAME} -avr.recipe.ar.pattern={0}{1},{2},{3}{4},{5} +avr.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5} -##combine gc-sections, archives, and objects +##combine gc-sections| archives, and objects #avr.recipe.c.combine.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.combine.flags}{3=compiler.cpudef}{4=build.mcu} -o {5=BUILD_PATH}{6=SOURCE_NAME}.elf {7=BUILD_PATH}{8=SOURCE_NAME}.o {9=BUILD_PATH}{10=CORE_NAME=core.a} -L{11=BUILD_PATH} -lm -#avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7}{8},{9},-L{10},-lm -avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm +#avr.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}{8}|{9}|-L{10}|-lm +avr.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}|{8}|-L{9}|-lm ##create eeprom #avr.recipe.objcopy.eep.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.eep.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.eep -avr.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep +avr.recipe.objcopy.eep.pattern={0}{1}|{2}|{3}.elf|{4}.eep ##create hex #avr.recipe.objcopy.hex.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.elf.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.hex -avr.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex +avr.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.hex @@ -42,17 +42,17 @@ avr.name=Arduino #avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default #avr.compiler.path={0}/hardware/tools/avr/bin/ avr.compiler.c.cmd=avr-gcc -avr.compiler.c.flags=,-c,-g,-Os,-w,-ffunction-sections,-fdata-sections -avr.compiler.c.elf.flags=,-Os,-Wl,--gc-sections +avr.compiler.c.flags=|-c|-g|-Os|-w|-ffunction-sections|-fdata-sections +avr.compiler.c.elf.flags=|-Os|-Wl|--gc-sections avr.compiler.c.elf.cmd=avr-gcc -avr.compiler.S.flags=,-c,-g,-assembler-with-cpp +avr.compiler.S.flags=|-c|-g|-assembler-with-cpp avr.compiler.cpp.cmd=avr-g++ -avr.compiler.cpp.flags=,-c,-g,-Os,-w,-fno-exceptions,-ffunction-sections,-fdata-sections +avr.compiler.cpp.flags=|-c|-g|-Os|-w|-fno-exceptions|-ffunction-sections|-fdata-sections avr.compiler.ar.cmd=avr-ar avr.compiler.ar.flags=rcs avr.compiler.objcopy.cmd=avr-objcopy -avr.compiler.objcopy.eep.flags=,-O,ihex,-j,.eeprom,--set-section-flags=.eeprom=alloc,load,--no-change-warnings,--change-section-lma,.eeprom=0 -avr.compiler.elf2hex.flags=,-O,ihex,-R,.eeprom +avr.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc|load|--no-change-warnings|--change-section-lma|.eeprom=0 +avr.compiler.elf2hex.flags=|-O|ihex|-R|.eeprom avr.compiler.elf2hex.cmd=avr-objcopy avr.compiler.ldflags= avr.compiler.cpudef=-mmcu= From 9936efbaa2615ca65125de1e314075cfd6d8ca6f Mon Sep 17 00:00:00 2001 From: ricklon Date: Fri, 17 Jun 2011 22:12:21 -0400 Subject: [PATCH 5/6] Switched to a nonconflicting delimeter |. Compile process is working. Need to make sure that it matches 1.0 process exactly. --- platforms.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms.txt b/platforms.txt index 3f1d2eb..dbb3a40 100755 --- a/platforms.txt +++ b/platforms.txt @@ -51,7 +51,7 @@ avr.compiler.cpp.flags=|-c|-g|-Os|-w|-fno-exceptions|-ffunction-sections|-fdata- avr.compiler.ar.cmd=avr-ar avr.compiler.ar.flags=rcs avr.compiler.objcopy.cmd=avr-objcopy -avr.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc|load|--no-change-warnings|--change-section-lma|.eeprom=0 +avr.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc,load|--no-change-warnings|--change-section-lma|.eeprom=0 avr.compiler.elf2hex.flags=|-O|ihex|-R|.eeprom avr.compiler.elf2hex.cmd=avr-objcopy avr.compiler.ldflags= From fad37544d39aa0f14828cf1f5acd3168218b7f58 Mon Sep 17 00:00:00 2001 From: ricklon Date: Wed, 22 Jun 2011 21:20:45 -0600 Subject: [PATCH 6/6] Addtional debuggin. Trying to find the pins compile issue. --- platforms.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms.txt b/platforms.txt index dbb3a40..d946b82 100755 --- a/platforms.txt +++ b/platforms.txt @@ -58,6 +58,7 @@ avr.compiler.ldflags= avr.compiler.cpudef=-mmcu= avr.compiler.upload.cmd= avr.compiler.upload.flags= +avr.compiler.define=-DARDUINO= avr.library.path=./hardware/arduino/cores/arduino avr.library.core.path=./libraries