Skip to content

Commit e2f6252

Browse files
committed
Moved build artifacts into root build folder
The intermediate files used for build (.o, .a ...) are still in subfolders to avoid conflicts. Fix #3807
1 parent 949ef09 commit e2f6252

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

hardware/arduino/avr/platform.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={b
6565
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
6666

6767
## Combine gc-sections, archives, and objects
68-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/sketch/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
68+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
6969

7070
## Create output files (.eep and .hex)
71-
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/sketch/{build.project_name}.elf" "{build.path}/sketch/{build.project_name}.eep"
72-
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/sketch/{build.project_name}.elf" "{build.path}/sketch/{build.project_name}.hex"
71+
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
72+
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
7373

7474
## Save hex
7575
recipe.output.tmp_file={build.project_name}.hex
7676
recipe.output.save_file={build.project_name}.{build.variant}.hex
7777

7878
## Compute size
79-
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/sketch/{build.project_name}.elf"
79+
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
8080
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
8181
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
8282
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
@@ -97,11 +97,11 @@ tools.avrdude.config.path={path}/etc/avrdude.conf
9797

9898
tools.avrdude.upload.params.verbose=-v
9999
tools.avrdude.upload.params.quiet=-q -q
100-
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/sketch/{build.project_name}.hex:i"
100+
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
101101

102102
tools.avrdude.program.params.verbose=-v
103103
tools.avrdude.program.params.quiet=-q -q
104-
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/sketch/{build.project_name}.hex:i"
104+
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
105105

106106
tools.avrdude.erase.params.verbose=-v
107107
tools.avrdude.erase.params.quiet=-q -q

hardware/arduino/sam/platform.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -mcpu={b
7575
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
7676

7777
## Combine gc-sections, archives, and objects
78-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/sketch/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/sketch/{build.project_name}.elf" "-L{build.path}" -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 "{build.path}/core/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc
78+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -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 "{build.path}/core/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc
7979

8080
## Create output (.bin file)
81-
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/sketch/{build.project_name}.elf" "{build.path}/sketch/{build.project_name}.bin"
81+
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
8282

8383
## Save hex
8484
recipe.output.tmp_file={build.project_name}.bin
8585
recipe.output.save_file={build.project_name}.{build.variant}.bin
8686

8787
## Compute size
88-
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/sketch/{build.project_name}.elf"
88+
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
8989
recipe.size.regex=\.text\s+([0-9]+).*
9090

9191

@@ -98,5 +98,5 @@ tools.bossac.cmd.windows=bossac.exe
9898

9999
tools.bossac.upload.params.verbose=-i -d
100100
tools.bossac.upload.params.quiet=
101-
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -v -b "{build.path}/sketch/{build.project_name}.bin" -R
101+
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -v -b "{build.path}/{build.project_name}.bin" -R
102102

0 commit comments

Comments
 (0)