|
| 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 | + |
1 | 29 | #########Compiler Recipe#################################
|
| 30 | + |
2 | 31 | ##compile c object files
|
3 | 32 | ##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide.
|
4 | 33 |
|
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 |
11 | 40 |
|
12 | 41 | ########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} |
14 | 43 | #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} |
16 | 45 |
|
17 | 46 |
|
18 | 47 | ##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} |
21 | 50 | ##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} |
24 | 53 |
|
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 |
29 | 58 |
|
30 | 59 | ##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= |
34 | 63 |
|
35 | 64 | ##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 |
38 | 67 |
|
39 | 68 |
|
40 | 69 | ##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 | + |
69 | 72 |
|
0 commit comments