Skip to content

Commit 28447b5

Browse files
committed
Fix 'bin_to_board.py' for bin2blob and blob2wired intermediate file generation
1 parent d135dd9 commit 28447b5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: platform.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ recipe.size.regex=\.text\s+([0-9]+).*
124124
preproc.macros.flags=-w -x c++ -E -CC
125125
recipe.preproc.macros="{compiler.path}/{compiler.cmd.cpp}" {compiler.flags.cpp} {preproc.macros.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.extra_flags.cpp} {build.extra_flags} {includes.all} "{source_file}" -o "{preprocessed_file_path}"
126126

127-
tools.ap3Loader.pgm=python
128-
tools.ap3Loader.scr={runtime.platform.path}/tools/apollo3_scripts/sparkfun/artemis/
129-
tools.ap3Loader.args=--bin "{build.path}/{build.project_name}.bin" --load-address-blob 0x20000 --magic-num 0xCB -o {build.project_name} --version 0x0 --load-address-wired 0xC000 -i 6 --options 0x1 -b 921600 -port COM4 -r 1 -v
127+
# temporary: for now specify the path to your installation of Python3 here
128+
tools.ap3Loader.pgm=/usr/local/bin/python3
129+
tools.ap3Loader.scr={runtime.platform.path}/tools/apollo3_scripts/sparkfun/artemis/artemis_bin_to_board.py
130+
tools.ap3Loader.args=--bin "{build.path}/{build.project_name}.bin" --load-address-blob 0x20000 --magic-num 0xCB -o {build.path}/{build.project_name} --version 0x0 --load-address-wired 0xC000 -i 6 --options 0x1 -b 921600 -port "{serial.port}" -r 1 -v
130131

131132
tools.ap3Loader.pgm.windows=
132133
tools.ap3Loader.scr.windows={runtime.platform.path}/tools/apollo3_scripts/sparkfun/artemis/windows/artemis_uart_loader_combined.exe

Diff for: tools/apollo3_scripts/sparkfun/artemis/artemis_bin_to_board.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def bin2blob_process(loadaddress, appFile, magicNum, crcI, crcB, authI, authB, p
205205
fill_word(hdr_binarray, AM_IMAGEHDR_OFFSET_CRC, w1)
206206

207207
# now output all three binary arrays in the proper order
208-
output = 'bin/' + output + '_OTA_blob.bin'
208+
output = output + '_OTA_blob.bin'
209209
blob2wiredfile = output # save the output of bin2blob for use by blob2wired
210210
am_print("Writing to file ", output)
211211
with open(output, mode = 'wb') as out:
@@ -269,7 +269,7 @@ def blob2wired_process(appFile, imagetype, loadaddress, authalgo, encalgo, authK
269269

270270
start = 0
271271
# now output all three binary arrays in the proper order
272-
output = 'bin/' + output + '_Wired_OTA_blob.bin'
272+
output = output + '_Wired_OTA_blob.bin'
273273
uploadbinfile = output; # save the name of the output from blob2wired
274274
out = open(output, mode = 'wb')
275275

0 commit comments

Comments
 (0)