Skip to content

Commit 58de95a

Browse files
committed
Added platforms.txt, and update boards.txt with platform=avr
1 parent 8e8102d commit 58de95a

File tree

2 files changed

+80
-16
lines changed

2 files changed

+80
-16
lines changed

hardware/arduino/boards.txt

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
##############################################################
22

33
uno.name=Arduino Uno
4+
uno.platform=avr
45
uno.upload.protocol=stk500
56
uno.upload.maximum_size=32256
67
uno.upload.speed=115200
@@ -19,7 +20,7 @@ uno.build.pins=standard
1920
##############################################################
2021

2122
atmega328.name=Arduino Duemilanove or Nano w/ ATmega328
22-
23+
atmega328.platform=avr
2324
atmega328.upload.protocol=stk500
2425
atmega328.upload.maximum_size=30720
2526
atmega328.upload.speed=57600
@@ -40,7 +41,7 @@ atmega328.build.pins=standard
4041
##############################################################
4142

4243
diecimila.name=Arduino Diecimila, Duemilanove, or Nano w/ ATmega168
43-
44+
diecimila.platform=avr
4445
diecimila.upload.protocol=stk500
4546
diecimila.upload.maximum_size=14336
4647
diecimila.upload.speed=19200
@@ -61,7 +62,7 @@ diecimila.build.pins=standard
6162
##############################################################
6263

6364
mega2560.name=Arduino Mega 2560
64-
65+
mega2560.platform=avr
6566
mega2560.upload.protocol=stk500v2
6667
mega2560.upload.maximum_size=258048
6768
mega2560.upload.speed=115200
@@ -82,7 +83,7 @@ mega2560.build.pins=mega
8283
##############################################################
8384

8485
mega.name=Arduino Mega (ATmega1280)
85-
86+
mega.platform=avr
8687
mega.upload.protocol=stk500
8788
mega.upload.maximum_size=126976
8889
mega.upload.speed=57600
@@ -103,7 +104,7 @@ mega.build.pins=mega
103104
##############################################################
104105

105106
mini.name=Arduino Mini
106-
107+
mini.platform=avr
107108
mini.upload.protocol=stk500
108109
mini.upload.maximum_size=14336
109110
mini.upload.speed=19200
@@ -124,7 +125,7 @@ mini.build.pins=standard
124125
##############################################################
125126

126127
fio.name=Arduino Fio
127-
128+
fio.platform=avr
128129
fio.upload.protocol=stk500
129130
fio.upload.maximum_size=30720
130131
fio.upload.speed=57600
@@ -145,7 +146,7 @@ fio.build.pins=standard
145146
##############################################################
146147

147148
bt328.name=Arduino BT w/ ATmega328
148-
149+
bt328.platform=avr
149150
bt328.upload.protocol=stk500
150151
bt328.upload.maximum_size=28672
151152
bt328.upload.speed=19200
@@ -167,7 +168,7 @@ bt328.build.pins=standard
167168
##############################################################
168169

169170
bt.name=Arduino BT w/ ATmega168
170-
171+
bt.platform=avr
171172
bt.upload.protocol=stk500
172173
bt.upload.maximum_size=14336
173174
bt.upload.speed=19200
@@ -189,7 +190,7 @@ bt.build.pins=standard
189190
##############################################################
190191

191192
lilypad328.name=LilyPad Arduino w/ ATmega328
192-
193+
lilypad328.platform=avr
193194
lilypad328.upload.protocol=stk500
194195
lilypad328.upload.maximum_size=30720
195196
lilypad328.upload.speed=57600
@@ -210,7 +211,7 @@ lilypad328.build.pins=standard
210211
##############################################################
211212

212213
lilypad.name=LilyPad Arduino w/ ATmega168
213-
214+
lilypad.platform=avr
214215
lilypad.upload.protocol=stk500
215216
lilypad.upload.maximum_size=14336
216217
lilypad.upload.speed=19200
@@ -231,7 +232,7 @@ lilypad.build.pins=standard
231232
##############################################################
232233

233234
pro5v328.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328
234-
235+
pro5v328.platform=avr
235236
pro5v328.upload.protocol=stk500
236237
pro5v328.upload.maximum_size=30720
237238
pro5v328.upload.speed=57600
@@ -252,7 +253,7 @@ pro5v328.build.pins=standard
252253
##############################################################
253254

254255
pro5v.name=Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168
255-
256+
pro5v.platform=avr
256257
pro5v.upload.protocol=stk500
257258
pro5v.upload.maximum_size=14336
258259
pro5v.upload.speed=19200
@@ -273,7 +274,7 @@ pro5v.build.pins=standard
273274
##############################################################
274275

275276
pro328.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
276-
277+
pro328.platform=avr
277278
pro328.upload.protocol=stk500
278279
pro328.upload.maximum_size=30720
279280
pro328.upload.speed=57600
@@ -294,7 +295,7 @@ pro328.build.pins=standard
294295
##############################################################
295296

296297
pro.name=Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168
297-
298+
pro.platform=avr
298299
pro.upload.protocol=stk500
299300
pro.upload.maximum_size=14336
300301
pro.upload.speed=19200
@@ -315,7 +316,7 @@ pro.build.pins=standard
315316
##############################################################
316317

317318
atmega168.name=Arduino NG or older w/ ATmega168
318-
319+
atmega168.platform=avr
319320
atmega168.upload.protocol=stk500
320321
atmega168.upload.maximum_size=14336
321322
atmega168.upload.speed=19200
@@ -336,7 +337,7 @@ atmega168.build.pins=standard
336337
##############################################################
337338

338339
atmega8.name=Arduino NG or older w/ ATmega8
339-
340+
atmega8.platform=avr
340341
atmega8.upload.protocol=stk500
341342
atmega8.upload.maximum_size=7168
342343
atmega8.upload.speed=19200

hardware/arduino/platforms.txt

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#########Compiler Recipe#################################
2+
##compile c object files
3+
##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide.
4+
5+
#default.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10}
6+
#default.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10}
7+
#default.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5}
8+
#default.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm
9+
#default.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep
10+
#default.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex
11+
12+
########avr compile pattern ##########
13+
#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}
14+
#object name seems to have build path in it.
15+
avr.recipe.c.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10}
16+
17+
18+
##compile cc object files
19+
#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}
20+
avr.recipe.cpp.o.pattern={0}{1}::{2}::{3}{4}::-DF_CPU={5}::-D{6}={7}::{8}::{9}::-o::{10}
21+
##create archives
22+
#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}
23+
avr.recipe.ar.pattern={0}{1}::{2}::{3}{4}::{5}
24+
25+
##combine gc-sections, archives, and objects
26+
#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
27+
#avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}{8}::{9}::-L{10}::-lm
28+
avr.recipe.c.combine.pattern={0}{1}::{2}::{3}{4}::-o::{5}{6}.elf::{7}::{8}::-L{9}::-lm
29+
30+
##create eeprom
31+
#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
32+
avr.recipe.objcopy.eep.pattern={0}{1}::{2}::{3}.elf::{4}.eep
33+
34+
##create hex
35+
#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
36+
avr.recipe.objcopy.hex.pattern={0}{1}::{2}::{3}.elf::{4}.hex
37+
38+
39+
40+
########################################################
41+
avr.name=Arduino
42+
#avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default
43+
#avr.compiler.path={0}/hardware/tools/avr/bin/
44+
avr.compiler.c.cmd=avr-gcc
45+
avr.compiler.c.flags=::-c::-g::-Os::-w::-ffunction-sections::-fdata-sections
46+
avr.compiler.c.elf.flags=::-Os::-Wl,--gc-sections
47+
avr.compiler.c.elf.cmd=avr-gcc
48+
avr.compiler.S.flags=::-c::-g::-assembler-with-cpp
49+
avr.compiler.cpp.cmd=avr-g++
50+
avr.compiler.cpp.flags=::-c::-g::-Os::-w::-fno-exceptions::-ffunction-sections::-fdata-sections
51+
avr.compiler.ar.cmd=avr-ar
52+
avr.compiler.ar.flags=rcs
53+
avr.compiler.objcopy.cmd=avr-objcopy
54+
avr.compiler.objcopy.eep.flags=::-O::ihex::-j::.eeprom::--set-section-flags=.eeprom=alloc,load::--no-change-warnings::--change-section-lma::.eeprom=0
55+
avr.compiler.elf2hex.flags=::-O::ihex::-R::.eeprom
56+
avr.compiler.elf2hex.cmd=avr-objcopy
57+
avr.compiler.ldflags=
58+
avr.compiler.cpudef=-mmcu=
59+
avr.compiler.upload.cmd=
60+
avr.compiler.upload.flags=
61+
avr.library.path=./hardware/arduino/cores/arduino
62+
avr.library.core.path=./libraries
63+

0 commit comments

Comments
 (0)