Skip to content
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

Add build hook to copy .s files #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

per1234
Copy link

@per1234 per1234 commented Nov 16, 2022

Previously, the project relied on undefined behavior of older versions of the Arduino build system, where correct file extension case was not enforced when copying files from the sketch folder to the build folder, in order to .

This stopped working at Arduino IDE 1.8.14, meaning that users were forced to use a significantly outdated version of the IDE; a requirement which was undocumented.

This is fixed by adding an additional build hook to platform.local.txt that copies the .s files from the sketch folder to the build folder.

Due to limitations of the Arduino platform framework, it was necessary to jump through some hoops to get working patterns for these commands:

  • Windows command pattern must use cmd /C because copy is not directly usable via the os/exec Go package that executes the generated commands.
  • Linux/macOS command patterns must use cd because otherwise the *.s glob was broken by being automatically quoted as part of the sketch path.
  • Linux/macOS command patters must use sh -c because cd is not directly usable via the os/exec Go package that executes the generated commands.

Fixes #74

Previously, the project relied on undefined behavior of older versions of the Arduino build system, where correct file
extension case was not enforced when copying files from the sketch folder to the build folder, in order to .

This stopped working at Arduino IDE 1.8.14, meaning that users were forced to use a significantly outdated version of
the IDE; a requirement which was undocumented.

This is fixed by adding an additional build hook to platform.local.txt that copies the `.s` files from the sketch folder
to the build folder.

Due to limitations of the Arduino platform framework, it was necessary to jump through some hoops to get working
patterns for these commands:

- Windows command pattern must use `cmd /C` because `copy` is not directly usable via the os/exec Go package that
  executes the generated commands.
- Linux/macOS command patterns must use `cd` because otherwise the `*.s` glob was broken by being automatically quoted
  as part of the sketch path.
- Linux/macOS command patters must use `sh -c` because `cd` is not directly usable via the os/exec Go package that
  executes the generated commands.
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.

Cannot compile README example: undefined reference
1 participant