Skip to content

Commit

Permalink
build to BIN
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Nov 11, 2024
1 parent 98eed26 commit 062fa0f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
13 changes: 13 additions & 0 deletions firmware/extra_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from os.path import join
Import("env", "projenv")

# Custom BIN from ELF
env.AddPostAction(
"$BUILD_DIR/${PROGNAME}.elf",
env.VerboseAction(" ".join([
"$OBJCOPY",
"-O",
"binary",
"$TARGET",
"$BUILD_DIR/${PROGNAME}.bin"
]), "Building $TARGET"))
16 changes: 15 additions & 1 deletion firmware/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
[env:attiny85]
[env]
platform = atmelavr
board = attiny85
framework = arduino
board_build.f_cpu = 8000000L
extra_scripts = post:extra_script.py

; [env:program_via_ArduinoISP]
; upload_protocol = custom
; upload_port = /dev/ttyACM0
; upload_speed = 19200
; upload_flags =
; -C ${platformio.packages_dir}/tool-avrdude/avrdude.conf
; -p $BOARD_MCU
; -P $UPLOAD_PORT
; -b $UPLOAD_SPEED
; -c stk500v1
; upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

0 comments on commit 062fa0f

Please sign in to comment.