Skip to content

Commit 3f4cbe8

Browse files
committed
Merge branch 'master' into arduino-1.0.1-merged
Included latest fixes
2 parents 33083d8 + aa7559f commit 3f4cbe8

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

app/src/processing/app/debug/Compiler.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ public boolean compile(Sketch _sketch, String _buildPath,
117117
private PreferencesMap createBuildPreferences(String _buildPath,
118118
String _primaryClassName)
119119
throws RunnerException {
120+
121+
if (Base.getBoardPreferences() == null) {
122+
RunnerException re = new RunnerException(
123+
_("No board selected; please choose a board from the Tools > Board menu."));
124+
re.hideStackTrace();
125+
throw re;
126+
}
127+
120128
TargetPlatform targetPlatform = Base.getTargetPlatform();
121129

122130
// Merge all the global preference configuration in order of priority
@@ -137,12 +145,6 @@ private PreferencesMap createBuildPreferences(String _buildPath,
137145

138146
// Core folder
139147
String core = p.get("build.core");
140-
if (core == null) {
141-
RunnerException re = new RunnerException(
142-
_("No board selected; please choose a board from the Tools > Board menu."));
143-
re.hideStackTrace();
144-
throw re;
145-
}
146148
TargetPlatform tp;
147149
if (!core.contains(":")) {
148150
tp = targetPlatform;

hardware/arduino/avr/platform.txt

+11-10
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ compiler.size.cmd=avr-size
2525
# --------------------
2626

2727
## Compile c files
28-
recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} {source_file} -o {object_file}
28+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
2929

3030
## Compile c++ files
31-
recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} {source_file} -o {object_file}
31+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
3232

3333
## Create archives
34-
recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file}
34+
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
3535

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

3939
## Create eeprom
40-
recipe.objcopy.eep.pattern={compiler.path}{compiler.objcopy.cmd} {compiler.objcopy.eep.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.eep
40+
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
4141

4242
## Create hex
43-
recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.hex
43+
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
4444

4545
## Compute size
46-
recipe.size.pattern={compiler.path}{compiler.size.cmd} -A {build.path}/{build.project_name}.hex
46+
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.hex"
4747
recipe.size.regex=Total\s+([0-9]+).*
4848

4949

@@ -56,12 +56,13 @@ tools.avrdude.config.path={path}/avrdude.conf
5656

5757
tools.avrdude.upload.params.verbose=-v -v -v -v
5858
tools.avrdude.upload.params.quiet=-q -q
59-
tools.avrdude.upload.pattern={path}/{cmd} -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
59+
tools.avrdude.upload.pattern="{path}/{cmd}" "-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"
6060

6161
tools.avrdude.program.params.verbose=-v -v -v -v
6262
tools.avrdude.program.params.quiet=-q -q
63-
tools.avrdude.program.pattern={path}/{cmd} -C{config.path} {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -Uflash:w:{build.path}/{build.project_name}.hex:i
63+
tools.avrdude.program.pattern="{path}/{cmd}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
6464

6565
tools.avrdude.bootloader.params.verbose=-v -v -v -v
6666
tools.avrdude.bootloader.params.quiet=-q -q
67-
tools.avrdude.bootloader.pattern={path}/{cmd} -C{config.path} {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} {bootloader.params}
67+
tools.avrdude.bootloader.pattern="{path}/{cmd}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} {bootloader.params}
68+

hardware/arduino/sam/platform.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ compiler.ldflags=
2222
compiler.size.cmd=arm-none-eabi-size
2323
compiler.define=-DARDUINO=
2424

25-
compiler.libsam.c.flags=-I{build.system.path}/libsam -I{build.system.path}/CMSIS/CMSIS/Include/ -I{build.system.path}/CMSIS/Device/ATMEL/
25+
compiler.libsam.c.flags="-I{build.system.path}/libsam" "-I{build.system.path}/CMSIS/CMSIS/Include/" "-I{build.system.path}/CMSIS/Device/ATMEL/"
2626

2727
# SAM3 compile patterns
2828
# ---------------------
2929

3030
## Compile c files
31-
recipe.c.o.pattern={compiler.path}{compiler.c.cmd} {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file}
31+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
3232

3333
## Compile c++ files
34-
recipe.cpp.o.pattern={compiler.path}{compiler.cpp.cmd} {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} {source_file} -o {object_file}
34+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} "{source_file}" -o "{object_file}"
3535

3636
## Create archives
37-
recipe.ar.pattern={compiler.path}{compiler.ar.cmd} {compiler.ar.flags} {build.path}/{archive_file} {object_file}
37+
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"
3838

3939
## Combine gc-sections, archives, and objects
40-
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 -o {build.path}/{build.project_name}.elf -L{build.path} -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 {object_files} {build.variant.path}/{build.variant_system_lib} {build.path}/{archive_file} -Wl,--end-group
40+
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" -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -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 {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group
4141

4242
## Create eeprom
4343
recipe.objcopy.eep.pattern=
4444

4545
## Create hex
46-
recipe.objcopy.hex.pattern={compiler.path}{compiler.elf2hex.cmd} {compiler.elf2hex.flags} {build.path}/{build.project_name}.elf {build.path}/{build.project_name}.bin
46+
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
4747

4848
## Compute size
49-
recipe.size.pattern={compiler.path}{compiler.size.cmd} -A {build.path}/{build.project_name}.elf
49+
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
5050
recipe.size.regex=\.text\s+([0-9]+).*
5151

5252

@@ -59,5 +59,5 @@ tools.bossac.path={runtime.ide.path}/hardware/tools
5959

6060
tools.bossac.upload.params.verbose=-i -d
6161
tools.bossac.upload.params.quiet=
62-
tools.bossac.upload.pattern={path}/{cmd} {upload.verbose} --port={serial.port.file} -e -w -v -b {build.path}/{build.project_name}.bin
62+
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -e -w -v -b "{build.path}/{build.project_name}.bin"
6363

0 commit comments

Comments
 (0)