While this might work when using bundled libraries, this breaks with
system libraries as they are all compiled for arm64. Also, why would you
need to compile an x86_64 version on arm64, and vise versa.
This new find module will replace the old logic used to locate a native
copy of libserialport. THe old code didn't work on macOS, and was pretty
messy.
* workflows/build.yml: update checkout to v4 since v3 is deprecated
* workflows/build.yml: update upload-artifact to v4 since v3 is deprecated
* workflows/build.yml: remove extra space in the end of the lines
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>
This adds a Nix flake, shims for 'legacy' Nix, and a `.envrc` for
`direnv`. blisp is now able to run directly via:
`nix run github:pine64/blisp`
and for Nix/NixOS users, this helps with a one-click developer
environment.
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 <>
CMAKE_INSTALL_LIBDIR should be popualted with either lib or lib64,
depending on the architecture. This change makes it so that this flag is
respected by blisp and the library, runtime, and archives are installed
to the location requested by the build.
* Adds support for compiling on Ubuntu 20.04 by lowering required cmake version to 3.16 (from 3.22) and removing the "set(CMAKE_C_STANDARD 20)" line which is not supported by cmake 3.16
* Adds back the CMAKE_C_STANDARD flag but now sets it to 11, the highest version supported by cmake 3.16
---------
Co-authored-by: Marek Kraus <gamelaster@users.noreply.github.com>
* 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>