Skip to content

Fix compile rules for paths with spaces #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compil
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-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}" "-L{build.variant.path}" -Wl,--whole-archive "-l{build.variant_system_lib}" -Wl,--no-whole-archive -Wl,--start-group "-l{build.variant_system_lib}" -lnsim -lc -lm -lgcc {object_files} "{build.path}/{archive_file}"

## Save output with debug symbols (.debug.elf file). Uncomment if you wish to use OpenOCD to debug.
recipe.hooks.objcopy.preobjcopy.1.pattern={runtime.tools.arduino101load.path}/arduino101load -c -from="{build.path}/{build.project_name}.elf" -to="{build.path}/../arduino101_sketch.debug.elf"
recipe.hooks.objcopy.preobjcopy.1.pattern="{runtime.tools.arduino101load.path}/arduino101load" -c -from="{build.path}/{build.project_name}.elf" -to="{build.path}/../arduino101_sketch.debug.elf"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@facchinm ,
Would like to know if the, ", for the, -from=, flag should be moved to the front of the flag like the ones that are done in line 110 and 118? I don't think it is going to make a different. Thus, we are going with this PR for the Deneb release. Just being curious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sid, the quotation here are "correct" (in the sense you can execute them in a shell and they get expanded correctly) because the recipe.* rules get "spawned" inside the (golang) builder, which doesn't do any strange mangling (as opposed to the upload.* rules which are executed by the Java IDE and exposed the bug). In fact, one of the next step we wanted to take is also rewriting the uploader in GO to get rid of this totally inexplicable difference 🙂

## Create output (.bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
Expand Down Expand Up @@ -107,12 +107,12 @@ tools.arduino101load.cmd.path={runtime.tools.arduino101load.path}/arduino101load
tools.arduino101load.upload.params.verbose=-v
tools.arduino101load.upload.params.quiet=-q

tools.arduino101load.upload.pattern="{cmd.path}" -dfu="{runtime.tools.dfu-util.path}" -bin="{build.path}/{build.project_name}.bin" -port={serial.port} "{upload.verbose}" -ble_fw_str={ble.fw.string} -ble_fw_pos={ble.fw.position} -rtos_fw_str={rtos.fw.string} -rtos_fw_pos={rtos.fw.position} -core={version}
tools.arduino101load.upload.pattern="{cmd.path}" "-dfu={runtime.tools.dfu-util.path}" "-bin={build.path}/{build.project_name}.bin" -port={serial.port} "{upload.verbose}" -ble_fw_str={ble.fw.string} -ble_fw_pos={ble.fw.position} -rtos_fw_str={rtos.fw.string} -rtos_fw_pos={rtos.fw.position} -core={version}

# This is needed to avoid an error on unexistent fields
tools.arduino101load.erase.params.verbose=
tools.arduino101load.erase.params.quiet=
tools.arduino101load.erase.pattern=
tools.arduino101load.bootloader.params.verbose=-v
tools.arduino101load.bootloader.params.quiet=-q
tools.arduino101load.bootloader.pattern="{cmd.path}" -dfu="{runtime.tools.dfu-util.path}" -port={serial.port} "{bootloader.verbose}" -f -core={version}
tools.arduino101load.bootloader.pattern="{cmd.path}" "-dfu={runtime.tools.dfu-util.path}" -port={serial.port} "{bootloader.verbose}" -f -core={version}
4 changes: 2 additions & 2 deletions variants/arduino_101/linker_scripts/flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
MEMORY
{
FLASH (rx) : ORIGIN = 0x40034000, LENGTH = 152K
SRAM (wx) : ORIGIN = 0xa800e000, LENGTH = 24K
SRAM (wx) : ORIGIN = 0xa800a000, LENGTH = 40K
DCCM (wx) : ORIGIN = 0x80000000, LENGTH = 8K
}

Expand All @@ -52,7 +52,7 @@ __firq_stack_size = 1024;

/* Minimum heap size to allocate
* Actual heap size might be bigger due to page size alignment */
__HEAP_SIZE_MIN = 8192;
__HEAP_SIZE_MIN = 16384;
/* This should be set to the page size used by the malloc implementation */
__PAGE_SIZE = 4096;

Expand Down