This commit adds a simple check to both blisp commands that checks the
passed firmware .bin file exists, and is readable.
Justification: I flashed my Pinecil V2 that arrived today, and
misspelled the filename. blisp erased flash, and then exited - it did
not check the firmware .bin was readable/accessible, which meant my
Pinecil was soft-bricked.
I have tested the change, and it works for both commands when the input
file isn't readable.
I had to declare the `cmd_{iot,write}_args_print_glossary` function as
static before the call, so that we don't use undeclared functions before
we call them.
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
Otherwise, depending on BUILD_SHARED_LIBS default, it may be
compiled dynamically. However, the resulting DSO currently would
not be installed, resulting in unusable installed blisp binary.
Co-authored-by: Schdro <>
* DFU file work
Just grabbing first one for now
Expose crc
Update CMakeLists.txt
Test DFU file
Split crc function
Fixup
Zero init struct
Dont null the pointer 🤦
correct fread
Adding tests
Create dfu_file.h
Format
Scratching out more parsing
Basic port parser
Scratching fread wrapper
* Relocate dfu parsing and link in
* Scratching out parsers
* Generic bin parser
* Pull out get file util
Update CMakeLists.txt
* Pull in the generic parser
Fixup
.
* Print flash address
* Rebase address
* stdlib
Update dfu_file.c
* FIXUP! flash offset
* Update dfu_file.c
* Improve logging
* Drop extra erase
* Adjust DFU to avoid goto
* Pragma -> ifndef
* Include Windows headers for missing data types
---------
Co-authored-by: Marek Kraus <gamelaster@outlook.com>