Conversation
|
Copying from a previous draft of this PR: Posted by @mi-hol
|
|
@brentfpage I triggered re-run of all workflows after merging #404 but they still fail |
|
|
As an aside, the firmware that's currently configured to be packaged is that from the most recent "continuous release" in my fork. This practice will be necessary unless/until this PR is fully merged into the genuine repo and a continuous release is run that generates firmware files. |
Well I re-ran and it still failed :(
Please add these changes, test, change status to "ready for review" and we'll review again after that has happened. |
|
The PR is still a draft (only one workflow has been implemented), so I'll hold off on indicating that it's "Ready for review". |
|
Just to add some hairiness, the Windows installer currently needs to be manually updated whenever we bump the firmware version. This is one of the reasons we were sticking with pre-built binaries for everything. I think it makes sense to have a job for automatically building the firmware, but unless we find a clean solution to the Windows Installer problem I don't think we want to be auto-pulling new builds in. |
|
@EspoTek Is it possibly the case that the manually updated installer is downloaded in windows.yml with this line? If so, could you please elaborate on what steps are necessary for generating that |
That like there is installed a (proprietary) program called "Advanced Installer", that's converts the .aip (Advanced Installer Project) file to the .msi package. If we ever increment the firmware version, we'll need to either manually add them to the Advanced Installer project or possibly take advantage of some Advanced Installer feature that automatically adds them for us? |
Updated
Reasoning is:
The open questions in this regard are for me:
Does my reasoning make sense? |
To reduce dependency on the specific server http://espotek.com via insecure http protocol I'm in favour of converting this piece of code to a GH action from marketplace. I'd be happy to own that task. |
It might be possible to switch between the two modes (1x 1023 byte endpoint vs 6x 128 byte) dynamically, this but we'd need to have a whole lot of dynamic code running on the MCU.
This is probably more doable - we'd need to build dfu-programmer as a DLL. But honestly, I don't really see a major advantage from this, since the system we have in place already works well. |
Why the Labrador project?
My experience tells me that at some point in time any code dependency will stop working and suddenly a nightmare surfaces because the skills to maintain it are not there. From an external view many dependencies have been copied into the project to make it work but that is not a sustainable setup for the long-term unfortunately. Reducing the amount of code required would be a strategy to survive. |
74cf134 to
c4eae9f
Compare
|
I looked into utilizing the Advanced Installer Github Action for the windows workflow, but unfortunately the Action requires an enterprise license. So, it looks like sticking with the current approach is the way forward. As for
@EspoTek could this be as straightforward as manually updating the firmware file paths in Labrador.aip ? Currently in this PR, the paths in Labrador.aip have been changed to easily identifiable dummy paths that are replaced with real file paths by windows.yml. This is specifically done using a shell command, but in the future maybe it can instead be done using /UpdateFile. I wasn't able to get /UpdateFile to work for this most recent PR draft but may try again later. |
|
updated:
that said short-term I'd suggest to just stick with
Then address above topics in a next step trying to standardize the package building with CMake Would this approach make sense? |
|
This PR feels like it has scope creep. Can we get a single workflow to build the existing firmware now, then worry about firmware version updates and packaging issues separately in a future PR? I think the latter needs a lot of thought and discussion. |
As far as I'm aware, nothing in this project uses CMake. (And personally I'd like to keep it that way, every project I've seen that uses it is constantly tweaking things to get it right.) |
@turboencabulator oops I confused Labrador with another project. Thanks for making me aware of my error :) l |
…ersion id - add a workflow for building the firmware. the workflow calls the define-firmware-ver action and uses the result to set the FIRMWARE_VERSION_ID macro in the compiled firmware - delete the hard-coded value of FIRMWARE_VERSION_ID in AVR_Code/.../globals.h - make the firmware compilation Makefile compatible with action-avr-make from Github; also add support for defining FIRMWARE_VERSION_ID
484fc57 to
184f126
Compare
Good idea – the PR now just includes a new action for defining the firmware version and a new workflow for compiling the firmware. I ran the firmware workflow in my fork, uploaded the resulting variant 02 .hex asset to my board, and confirmed that the board then interfaced properly with the Labrador UI on my mac. I also made sure that the variant 01 .hex differs from the variant 02 .hex (as expected), but I don't have an x64 windows machine so can't confirm that the variant 01 .hex actually works. If someone has such a machine, could you please upload labrador_0007_01.hex from here to your board and test its functionality? |
will do but will likely need until Wednesday |
Updating the .aip directly using Deleting the _02 will cause issues as it's used by the 32-bit build. |
|
Also I'm happy to ship this is variant 01 works. Looks good! |
|
One last thing I just did is to add the firmware workflow to continuous.yml. This will be convenient if/when a new PR is opened for packaging the firmware automatically into UI releases. Also, it's generally useful to have firmware versions tied to UI versions, which including the firmware in continuous.yml accomplishes. Maybe it would be even better to include the firmware in the continuous releases but somehow hide the firmware in the releases page, but there's no way to do that as far as I can tell. |
|
Can't we just not call upload_artifact? |
|
I think the .hex products would then never make it out of the firmware workflow's workspace, which gets deleted when the workflow exits. Even if an asset is uploaded using upload_artifact, it is only available for 90 days. There appears to be an additional upload step in continuous.yml that transfers all the assets (which have already had upload_artifact called on them) to some release directory, where they don't have an expiration date. Given this state of affairs, unless hex assets are included in the repository directly, I think that uploading them to the release directory is necessary. |
|
Wait, why is this the case? We'll run this script every time we rebuild anyway, right? |
Tested with Labrador version from commit 8fdaf80 no wires connected:
but with just wires connect it seems to pick up a lot of noise preventing exact measurement disconnecting USB gave:
|
|
@mi-hol does it show any issues when you pump through a "weird" sin wave, such as 791Hz? This will show any issues where the USB driver doesn't recombine the 6 endpoints in the correct order. |
Sorry, thats beyond my technical abilities. |
When I do it, I'll:
|



(Following up on some of the discussion in #381.)
This PR:
The versioning is centralized, but not automatic. Namely, the current version of the firmware has to be set in .github/actions/define-firmware-ver-action/action.yml. At compile time, the firmware version defined there gets injected:
Also, the inclusion of the version number in the .hex file names has been retained, so they are, e.g., labrafirm_0007_0{1 or 2}.hex. To me, this is worthwhile because then the firmware that's packaged into a given release can be very easily determined.