Skip to content

Commit

Permalink
Convert device elf binary to hex binary
Browse files Browse the repository at this point in the history
Missed a step in generating the binaries for the teensy - gcc just makes an elf file, but we need to run one final command to convert it into the .hex format that can be loaded onto a teensy
  • Loading branch information
DanForever committed Feb 7, 2022
1 parent e7812fa commit 4e6df78
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build-device/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
outputs:
binary-path:
description: Path to the compiled binary
value: ${{ steps.retrieve-binary-path.outputs.binary-path }}
value: ${{ steps.convert-elf-to-hex.outputs.hex-path }}

runs:
using: "composite"
Expand All @@ -43,14 +43,22 @@ runs:

- id: retrieve-binary-path
shell: bash
name: Retrieve Binary Path
name: Retrieve binary Path
run: |
PATH=$(cat $HOME/binaries.txt)
echo "Path is $PATH"
echo "BINPATH=$PATH" >> $GITHUB_ENV
echo "::set-output name=binary-path::$(echo $PATH)"
- id: convert-elf-to-hex
shell: bash
name: Convert Elf binary to Hex
run: |
$HOME/arduino_ide/arduino-${{ inputs.arduino_ide_version }}/hardware/tools/arm/bin/arm-none-eabi-objcopy -O ihex -R .eeprom ${{ steps.retrieve-binary-path.outputs.binary-path }} $HOME/device.hex
echo "::set-output name=hex-path::$(echo $HOME/device.hex)"
- shell: bash
name: Display binary path to user
run: |
echo "From Steps: ${{ steps.retrieve-binary-path.outputs.binary-path }}"
echo "Elf: ${{ steps.retrieve-binary-path.outputs.binary-path }}"
echo "Hex: ${{ steps.convert-elf-to-hex.outputs.hex-path }}"

0 comments on commit 4e6df78

Please sign in to comment.