Closed gdamjan closed 2 years ago
some test builds here: https://github.com/gdamjan/Bus_Pirate/releases/tag/v.test and the output can be seen here: https://github.com/gdamjan/Bus_Pirate/runs/1157434979?check_suite_focus=true
maybe I should also compile the bootloaders too?
@gdamjan
Thank you Sir for the excellent idea and the terrific implementation! I think it might be useful to use the same scheme to compile bootloaders as well, thank you Sir.
One thing I wanted to point out is that the ready to use hexadecimal files that kindly you provide are in lowercase format and so they do not work with some Bus Pirate firmware update tools, it is need to convert them to UPPERCASE before thy can be used with that kind of tools. I am aware that the thing is marginal when speaking of skilled users, but since not all Bus Pirate users may be skilled enough, I think it might be useful to introduce a warning, if not to provide the hexadecimals already in uppercase format. What I have written is not meant to be a criticism, but rather a simple suggestion from a neophyte. Thanks!
One thing I wanted to point out is that the ready to use hexadecimal files that kindly you provide are in lowercase format and so they do not work with some Bus Pirate firmware update tools, it is need to convert them to UPPERCASE before thy can be used with that kind of tools.
sure thing, I'll take a look. Do you know which tool is used to convert to uppercase format?
I think it might be useful to use the same scheme to compile bootloaders as well
this is technically easy to do. my only concern is about versioning. there are a couple of options:
v*
tags. that can get confusing with the current bootloader versionsv*
tags, build bootloaders on b*
tagswhat do you think?
@gdamjan
Thank you Sir.
By using Windows it is possible to convert a text string from lowercase to UPPERCASE and the other way around with a Windows batch file that convert files from lower to upper case (http://dangerousprototypes.com/forum/index.php?topic=6097.msg56817#msg56817):
@echo off
setlocal EnableDelayedExpansion
for /F "delims=" %%a in (%1) do (
set "line=%%a"
for %%b in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
set "line=!line:%%b=%%b!"
)
echo !line!
)
To use it, run the batch file and pipe output to a temp file, for example, to_upper.bat BPvX-firmware.hex > temp.hex
Again with Windows it is possible to use third party programs, for example Notepad++ (https://notepad-plus-plus.org/downloads/) is able to do that.
Instead by using Linux it seems to me that it is possible to convert a text string from lowercase to UPPERCASE and the other way around by using the built-in bash commands 'echo' and 'tr'. Examples
$ echo convert this to uppercase | **tr** [a-z] [A-Z]
CONVERT THIS TO UPPERCASE
$
$ echo convert this to lowercase | **tr** [A-Z] [a-z]
CONVERT THIS TO UPPERCASE
$
While in order to convert a complete file from bash it is possible to use '<' redirect:
$ tr [a-z] [A-Z] **<** convert_to_uppercase.txt
CONVERT THIS TO UPPERCASE
$
$ tr [A-Z] [a-z] **<** convert_to_lowercase.txt
CONVERT THIS TO LOWERCASE
$
I have no idea how this can be achieved using operating system from Apple, but I guess it should not be much different than with Linux and Windows.
Regarding concern about versioning, please take a look at this:
https://github.com/BusPirate/Bus_Pirate/issues/115
About a possible solution to the above in relation to the proposed options, I am the least suitable person to give an opinion on that, however I believe that
* separate tag namespaces: build firmware on `v*` tags, build bootloaders on `b*` tags
would be the best solution. Thanks.
Yes, I can use tr
in the action. Let me double check the results.
@gdamjan
Thank you Sir, really good!
here are test bootloaders https://github.com/gdamjan/Bus_Pirate/releases/tag/b.test
I'm gonna close this PR. It just annoys me in the open PRs list
This github action triggers on tags beginning with
v
(for ex: v1.0), and builds the firmware using the fstlx/xc16 docker image that contains XC16 and MPLAB X.Then publishes the built .hex files on github releases, under the same tag
https://hub.docker.com/r/fstlx/xc16