Skip to content

Commit 47e8a81

Browse files
committed
Merge refinements
1 parent 1a92ce8 commit 47e8a81

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

hardware/arduino/sam/boards.txt

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

33
sam3s_ek.name=Atmel SAM3S-EK
4-
sam3s_ek.platform=sam
54
sam3s_ek.upload.protocol=sam-ba
65
sam3s_ek.upload.maximum_size=49152
76
sam3s_ek.upload.speed=115200
@@ -15,7 +14,6 @@ sam3s_ek.build.pins=sam3s_ek
1514
##############################################################
1615

1716
sam3u_ek.name=Atmel SAM3U-EK
18-
sam3u_ek.platform=sam
1917
sam3u_ek.upload.protocol=sam-ba
2018
sam3u_ek.upload.maximum_size=49152
2119
sam3u_ek.upload.speed=115200
@@ -29,7 +27,6 @@ sam3u_ek.build.pins=sam3u_ek
2927
##############################################################
3028

3129
arduino_due.name=Arduino Due
32-
arduino_due.platform=sam
3330
arduino_due.uploader=bossac
3431
arduino_due.upload.maximum_size=49152
3532
arduino_due.upload.speed=115200

hardware/arduino/sam/platform.txt

+52-49
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,72 @@
1+
2+
3+
name=Atmel SAM
4+
#compiler.path Official default is correct, only need to change this if you want to overide the initial default
5+
compiler.path={0}/hardware/tools/CodeSourcery_arm/bin/
6+
compiler.c.cmd=arm-none-eabi-gcc
7+
compiler.c.flags=-c -g -Os -w -mthumb -mlong-calls -ffunction-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf
8+
compiler.c.elf.flags=-Os -Wl,--gc-sections
9+
compiler.c.elf.cmd=arm-none-eabi-gcc
10+
compiler.S.flags=-c -g -assembler-with-cpp
11+
compiler.cpp.cmd=arm-none-eabi-g++
12+
compiler.cpp.flags=-c -g -Os -w -mthumb -mlong-calls -ffunction-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf
13+
compiler.ar.cmd=arm-none-eabi-ar
14+
compiler.ar.flags=rcs
15+
compiler.objcopy.cmd=arm-none-eabi-objcopy
16+
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
17+
compiler.elf2hex.flags=-O binary
18+
compiler.elf2hex.cmd=arm-none-eabi-objcopy
19+
compiler.ldflags=
20+
compiler.cpudef=-mcpu=
21+
compiler.size.cmd=arm-none-eabi-size
22+
compiler.upload.cmd=
23+
compiler.upload.flags=
24+
compiler.define=-DARDUINO=
25+
library.path=./hardware/sam/cores/sam
26+
library.core.path=./libraries;./hardware/sam/libraries
27+
28+
129
#########Compiler Recipe#################################
30+
231
##compile c object files
332
##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide.
433

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
34+
#default.recipe.c.o.pattern={0}{1} {2} {3}{4} -DF_CPU={5} -D{6}={7} {8} {9} -o {10}
35+
#default.recipe.cpp.o.pattern={0}{1} {2} {3}{4} -DF_CPU={5} -D{6}={7} {8} {9} -o {10}
36+
#default.recipe.ar.pattern={0}{1} {2} {3}{4} {5}
37+
#default.recipe.c.combine.pattern={0}{1} {2} {3}{4} -o {5}{6}.elf {7} {8} -L{9} -lm
38+
#default.recipe.objcopy.eep.pattern={0}{1} {2} {3}.elf {4}.eep
39+
#default.recipe.objcopy.hex.pattern={0}{1} {2} {3}.elf {4}.hex
1140

1241
########sam compile pattern ##########
13-
#sam.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}
42+
#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}
1443
#object name seems to have build path in it.
15-
sam.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{11}|{8}|{9}|-o|{10}
44+
recipe.c.o.pattern={0}{1} {2} {3}{4} -DF_CPU={5} -D{6}={7} {11} {8} {9} -o {10}
1645

1746

1847
##compile cc object files
19-
#sam.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-
sam.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{11}|{8}|{9}|-o|{10}
48+
#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}
49+
recipe.cpp.o.pattern={0}{1} {2} {3}{4} -DF_CPU={5} -D{6}={7} {11} {8} {9} -o {10}
2150
##create archives
22-
#sam.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-
sam.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5}
51+
#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}
52+
recipe.ar.pattern={0}{1} {2} {3}{4} {5}
2453

25-
##combine gc-sections| archives, and objects
26-
#sam.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-
#sam.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}{8}|{9}|-L{10}|-lm
28-
sam.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-T{11}|-Wl,-Map,{5}{6}.map|-o|{5}{6}.elf|-L{9}|-lm|-lgcc|-mthumb|-Wl,--cref|-Wl,--check-sections|-Wl,--gc-sections|-Wl,--entry=Reset_Handler|-Wl,--unresolved-symbols=report-all|-Wl,--warn-common|-Wl,--warn-section-align|-Wl,--warn-unresolved-symbols|-Wl,--start-group|{7}|{8}|-Wl,--end-group
54+
##combine gc-sections archives, and objects
55+
#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
56+
#recipe.c.combine.pattern={0}{1} {2} {3}{4} -o {5}{6}.elf {7}{8} {9} -L{10} -lm
57+
recipe.c.combine.pattern={0}{1} {2} {3}{4} -T{11} -Wl,-Map,{5}{6}.map -o {5}{6}.elf -L{9} -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {7} {8} -Wl,--end-group
2958

3059
##create eeprom
31-
#sam.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-
#sam.recipe.objcopy.eep.pattern={0}{1}|{2}|{3}.elf|{4}.eep
33-
sam.recipe.objcopy.eep.pattern=
60+
#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
61+
#recipe.objcopy.eep.pattern={0}{1} {2} {3}.elf {4}.eep
62+
recipe.objcopy.eep.pattern=
3463

3564
##create hex
36-
#sam.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
37-
sam.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.bin
65+
#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
66+
recipe.objcopy.hex.pattern={0}{1} {2} {3}.elf {4}.bin
3867

3968

4069
##compute size
41-
sam.recipe.size.pattern={0}{1}|{2}.elf
42-
43-
44-
########################################################
45-
sam.name=Atmel SAM
46-
#sam.compiler.path Official default is correct, only need to change this if you want to overide the initial default
47-
sam.compiler.path={0}/hardware/tools/CodeSourcery_arm/bin/
48-
sam.compiler.c.cmd=arm-none-eabi-gcc
49-
sam.compiler.c.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections|-nostdlib|--param|max-inline-insns-single=500|-Dprintf=iprintf
50-
sam.compiler.c.elf.flags=|-Os|-Wl,--gc-sections
51-
sam.compiler.c.elf.cmd=arm-none-eabi-gcc
52-
sam.compiler.S.flags=|-c|-g|-assembler-with-cpp
53-
sam.compiler.cpp.cmd=arm-none-eabi-g++
54-
sam.compiler.cpp.flags=|-c|-g|-Os|-w|-mthumb|-mlong-calls|-ffunction-sections|-nostdlib|--param|max-inline-insns-single=500|-fno-rtti|-fno-exceptions|-Dprintf=iprintf
55-
sam.compiler.ar.cmd=arm-none-eabi-ar
56-
sam.compiler.ar.flags=rcs
57-
sam.compiler.objcopy.cmd=arm-none-eabi-objcopy
58-
sam.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc,load|--no-change-warnings|--change-section-lma|.eeprom=0
59-
sam.compiler.elf2hex.flags=|-O|binary
60-
sam.compiler.elf2hex.cmd=arm-none-eabi-objcopy
61-
sam.compiler.ldflags=
62-
sam.compiler.cpudef=-mcpu=
63-
sam.compiler.size.cmd=arm-none-eabi-size
64-
sam.compiler.upload.cmd=
65-
sam.compiler.upload.flags=
66-
sam.compiler.define=-DARDUINO=
67-
sam.library.path=./hardware/sam/cores/sam
68-
sam.library.core.path=./libraries;./hardware/sam/libraries
70+
recipe.size.pattern={0}{1} {2}.elf
71+
6972

0 commit comments

Comments
 (0)