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

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Apr 3, 2017

The Java IDE applies specific transformations to the input "recipes" based on locale and OS. On Windows, if a path contains a space, the quotation marks get ignored and the whole commandline gets passed to the underlying GO program as a single string, leading to a failure when calling flag.Parse . Enclosing the whole flag+path instead than the path alone fixes the issue.

yashaswini-hanji and others added 2 commits March 31, 2017 13:06
-increase SRAM to 40K
-change SRAM start address
-increase heap size to 16K
-this change is needed for BLE scan for SensorTag
@SidLeung
Copy link
Contributor

SidLeung commented Apr 3, 2017

Will not use this PR in its entirety. However, will cherry-pick your change for the compile rules into the main trunk code and the Deneb.RC2 tag manually.

@@ -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 🙂

@SidLeung
Copy link
Contributor

SidLeung commented Apr 4, 2017

Changes were cherry-picked and merged to main trunk (#522). Thus, closing this PR.

@SidLeung SidLeung closed this Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants