Skip to content

How to get the compiled HEX? #25

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
TomasHubelbauer opened this issue Apr 29, 2021 · 2 comments
Closed

How to get the compiled HEX? #25

TomasHubelbauer opened this issue Apr 29, 2021 · 2 comments
Assignees
Labels
type: support OT: Request for help using the project

Comments

@TomasHubelbauer
Copy link

Hello, is it possible to get the compiled HEX from the sketch?

@per1234 per1234 added the type: support OT: Request for help using the project label Apr 29, 2021
@per1234
Copy link
Collaborator

per1234 commented Apr 29, 2021

Hi @TomasHubelbauer. Yes, you can do this.

The action's cli-compile-flags input allows you to pass arbitrary flags that will be used in the arduino-cli compile command that compiles the sketches. You can learn about all the available flags here:
https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_compile/#options

There is an example of a configuration that uses arduino-cli compile's --export-binaries flag here: #18 (comment)

@per1234 per1234 closed this as completed Apr 29, 2021
@TomasHubelbauer
Copy link
Author

I tried this:

    - name: Compile the sketch
      uses: arduino/compile-sketches@v1 # https://github.com/arduino/compile-sketches
      with:
        sketch-paths: |
          - .
        cli-compile-flags: |
          - --output-dir="$PWD"

But it did not work. I am not sure if I need to use --build-path maybe or instead of $PWD use ., in any case, I found this worked:

cp /tmp/arduino-sketch-*/sketch-name.ino.hex sketch-name.hex

I added it to a script step and it works well enough for now until I figure out cli-compile-flags.

@per1234 per1234 self-assigned this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: support OT: Request for help using the project
Projects
None yet
Development

No branches or pull requests

2 participants