Commit Graph

153 Commits

Author SHA1 Message Date
Terence Noone
cb32800728 Do not build for both arm64 and x86_84 on macOS.
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.
2024-12-11 20:54:11 -05:00
Terence Noone
da463d79fd Use new find module for libserialport
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.
2024-12-11 20:54:11 -05:00
Ben V. Brown
1fb33da291
Merge pull request #60 from barracuda156/darwin
parse_file.h: include sys/types.h
2024-12-11 14:33:11 +11:00
Ben V. Brown
17f6234a4a
Merge pull request #62 from barracuda156/static_assert
blisp_struct.h: use _Static_assert for pre-C23 compatibility
2024-12-11 14:32:28 +11:00
Ben V. Brown
108c387d31
Merge pull request #71 from ia/checkout-v4
* 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
2024-12-11 14:25:01 +11:00
Ivan Zorin
ebae66c392 workflows/build.yml: remove extra space in the end of the lines 2024-12-03 02:32:38 +03:00
Ivan Zorin
c2fc20452c workflows/build.yml: update upload-artifact to v4 since v3 is deprecated 2024-12-03 02:31:26 +03:00
Ivan Zorin
39388c6b2c workflows/build.yml: update checkout to v4 since v3 is deprecated 2024-12-03 02:10:27 +03:00
Dom Rodriguez
d51e7bcc1e fix: Fix mismatching format strings when writing
We were using the incorrect format string - this commit fixes that.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2024-12-02 09:27:13 +01:00
Dom Rodriguez
d63612c256 fix: Make blisp check for existing file before flashing
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>
2024-12-01 16:44:17 +01:00
Dom Rodriguez
98784b1776 feat: Add Nix CI workflow
Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2024-12-01 16:43:49 +01:00
Dom Rodriguez
3490c37581 feat: Add Nix flake & derivation
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>
2024-12-01 16:43:49 +01:00
Sergey Fedorov
be86373d37 blisp_struct.h: define static_assert when undefined to _Static_assert 2024-01-06 16:03:05 +08:00
Sergey Fedorov
81faf3f213 parse_file.h: include sys/types.h
Fixes: https://github.com/pine64/blisp/issues/59
2024-01-05 22:23:53 +08:00
Andre Fonseca
7a85414ece
Enable macOS universal builds (#52)
* enable universal builds (x86_64/arm64) on macOS

* rename macOS build artifact filename

* update README.md
2023-08-28 11:25:41 +02:00
schrob
c41d128e73
Compile internal file_parsers lib always statically (#51)
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 <>
2023-08-10 14:23:12 +10:00
Robert Lipe
d2fef0af22
Merge pull request #49 from neil-forks/master
Add DESTINATION for PUBLIC_HEADERS targets
2023-08-07 22:21:47 -05:00
Neil Hanlon
2203a250e3
Add DESTINATION for PUBLIC_HEADERS targets 2023-08-07 22:49:15 -04:00
Robert Lipe
713e444656
Merge pull request #48 from neil-forks/master
WIP: Use CMAKE_INSTALL_LIBDIR for install destination to respect build forges
2023-08-07 21:24:22 -05:00
Neil Hanlon
3b47993de7
Use CMAKE_INSTALL_LIBDIR for install destination to respect build forges
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.
2023-08-07 21:18:43 -04:00
Marek Kraus
f601b6b965
Release v0.0.4 2023-08-03 08:21:21 +02:00
Marc Juul
48af2aded0
Adds support for compiling on Ubuntu 20.04 by lowering required cmake… (#44)
* 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>
2023-08-01 14:50:32 +02:00
Ben V. Brown
f1b93a1881
DFU file support (#45)
* 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>
2023-08-01 22:43:56 +10:00
Ben V. Brown
048a724082
Merge pull request #43 from schdro/feature-allow-syslibs3
Optional syslibs build support
2023-06-04 12:17:17 +10:00
Ben V. Brown
37571bc5f1
Merge pull request #41 from pine64/error_codes
Proper error codes (and return failure code)
2023-06-04 12:16:36 +10:00
Schdro
8914260b60 Optional syslibs support
Add optional support for building against system libraries of
libserialport and Argtable3
2023-05-14 18:07:55 +02:00
Marek Kraus
2e931f80db
Merge pull request #42 from pine64/multi-build
Build linux executables for multiple architectures, closes #32
2023-05-09 11:10:54 +02:00
Ben V. Brown
ec078224bd Unify uploaded artefact names 2023-05-09 14:38:58 +10:00
Ben V. Brown
33c3f36b98 update upload artifact 2023-05-09 14:31:37 +10:00
Ben V. Brown
f6f2013c8e Upload with specific names 2023-05-09 14:29:51 +10:00
Ben V. Brown
729609f2c0 Use Actions to recursively checkout 2023-05-09 14:29:51 +10:00
Ben V. Brown
89488b3bb5
Merge pull request #39 from bdd/cmake-install
Add CMake installation support
2023-05-09 08:41:50 +10:00
Ben V. Brown
491dd4f8c0 Draft test multi builder 2023-05-09 08:30:09 +10:00
Ben V. Brown
5306720e5d More annotations on errors 2023-05-09 08:05:38 +10:00
Ben V. Brown
bac4f4b49f Cleanup blisp tool to use error codes 2023-05-09 07:58:18 +10:00
Ben V. Brown
6ec0e9e862 Expand blisp_easy to use error codes 2023-05-09 07:58:06 +10:00
Ben V. Brown
6e2d40b9c4 Stitch more error codes through tool 2023-05-09 07:46:45 +10:00
Ben V. Brown
fced48570a Start migration to error codes enum 2023-05-09 07:39:34 +10:00
Ben V. Brown
179a4ea267 Extract error codes 2023-05-09 07:39:25 +10:00
Berk D. Demir
2ad3ae7b50 Add CMake installation support
Allows installation with:
  `cmake --install . [--prefix /dir]`
2023-04-22 18:08:39 -07:00
river-mochi
de4a9cd5e6
update install instructions 2023-04-10 18:26:06 -07:00
River M
0b363c620a
Merge pull request #31 from River-Mochi/master
changed icon colors
2023-04-01 21:28:57 -07:00
River M
e7eeef5f85
changed icon colors
Icons in black can not be seen well in dark screen. 
changed to color that matches badges and can be seen in dark mode.
2023-04-01 21:28:08 -07:00
Robert Lipe
aaf07b7724
Update README.md
Updated from https://github.com/pine64/blisp/pull/1/files
2023-03-30 13:51:18 -05:00
Marek Kraus
8c3b93cbec
Merge pull request #28 from River-Mochi/master
defind ISP
2023-03-30 20:04:35 +02:00
River M
cc9ef81934
Update README.md 2023-03-30 10:57:23 -07:00
River M
9cb381d03e
Update README.md 2023-03-19 15:49:38 -07:00
Robert Lipe
f47bc9f948
Merge pull request #26 from River-Mochi/master
add table, icons, edit doc
2023-03-18 18:08:11 -05:00
River M
4b8713ecd4
Update README.md 2023-03-18 15:01:40 -07:00
River M
935ee4a12c
Delete test 2023-03-18 14:55:03 -07:00