Open bvernoux opened 1 year ago
So you are suspecting that something in the toolchain has changed and it breaks? Not sure if I understood everything correctly... I'll try to replicate that.
Ok, looks like there has been a new release of the pico-sdk recently (1.5.0). The github action used the latest version of the SDK from the master branch. I am not sure what exactly the issue is with that new version (there are quite a few changes). My fix for now is to use the old version 1.4.0 in the toolchain, that one seems to produce the correct code. It is probably not a good idea to reference a potentially changing version of the SDK in the toolchain anyway, so using a specific version should result in more stable build outputs. And I don't think we need any of the new features of 1.5.0, so this could become the permanent solution.
Could you just try to force rebuild to check the binary/uf2 output (on same actual code) ? Do you reproduce the issue described (with latest pico-sdk) on your side too ?
I didn't compare the binaries but with the 1.5.0 SDK I could reproduce the same problem
I confirm that using pico-sdk 1.4.0 (sudo git -C /opt/pico-sdk checkout 1.4.0) fix the issue For information on my side I have tried several intermediate pico-sdk version without success (with same USB issue) and I have not identified the commit which break the USB... pico-sdk commit tested with USB broken:
sudo git -C /opt/pico-sdk checkout -b c578422528d91da8f9ae80b8446889b6e3224d26
sudo git -C /opt/pico-sdk checkout -b 8b8778c59b3db9fb201172d0837b5dac1cf8065e
sudo git -C /opt/pico-sdk checkout -b 488bd66eb3977bb79d4e5891071a67437180dfc0
So it will be interesting to understand what happen (and which commit break the USB) between working USB on pico-sdk 1.4.0 up to pico-sdk 1.5.0 with non working USB. There is clearly no hurry about that as we can live with pico-sdk 1.4.0 as like you say the pico-sdk 1.5.0 does not bring us anything new/better for LibreCAL
A new warning about that issue as I have discovered that if building LibreCAL with pico-sdk 1.4.0 on Ubuntu 22.04 LTS (instead of Ubuntu 20.04 LTS) produce broken Firmware (Creating File does not work ...) which seems to be related to the GCC ARM of Ubuntu 22.04 LTS...
Ubuntu 20.04.6 LTS GCC ARM (working fine): arm-none-eabi-gcc --version arm-none-eabi-gcc (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
Ubuntu 22.04.3 LTS GCC ARM (note working produce broken Firmware): arm-none-eabi-gcc --version arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)
With recent build of the firmware even on old code the LibreCAL GUI freeze during connection and USB connection is lost after few seconds. Issue description on recent Firmware built:
Investigation comparison with working/reference LibreCAL Firmware:
I have rebuilt the firmware with original source code from https://github.com/jankae/LibreCAL/tree/main/Software/LibreCAL (https://github.com/jankae/LibreCAL/commit/1f512ad95bb842af440e329ada94a683d7dc7734) and it is the same LibreCAL GUI on Windows10 freeze (it report 0 VNA port...) then USB connection is lost (It seems it is related to USB error/timeout), I cannot reproduce that issue when sending SCPI commands with Python3 script.
To build the Firmware I'm using Ubuntu 20.04 LTS and I'm following the steps done with the https://github.com/jankae/LibreCAL/blob/main/.github/workflows/Build.yml#L155 A strange things is my generated LibreCAL.uf2 have not the same size 368640 bytes
Reference working LibreCAL firmware is here https://github.com/jankae/LibreCAL/actions/runs/3991398790 (EmbeddedFirmware--v0.1.0-2023-01-23-23-14-27.zip / LibreCAL.uf2) with size 366592 bytes using git commit https://github.com/jankae/LibreCAL/commit/1f512ad95bb842af440e329ada94a683d7dc7734
Wireshark USB OK capture for reference LibreCAL-GUI_Windows10_EmbeddedFirmware-v0.1.0-2023-01-23-23-14-27_USB_OK_pcapng.zip
Build version done later 18 Feb 2022 the Firmware is built exactly with same steps and same source code but it is different and have issue see Issue description on recent Firmware built (like my own built version) see built version here https://github.com/bvernoux/LibreCAL/actions/runs/4210635144 (EmbeddedFirmware--v0.1.0-2023-02-18-09-54-00.zip) with exactly same git commit https://github.com/bvernoux/LibreCAL/commit/1f512ad95bb842af440e329ada94a683d7dc7734 (but build in February) size 368640 bytes this firmware have same issue as in Issue description.
Wireshark USB KO capture with SCPI FIRMWARE & IDN command with no answer LibreCAL-GUI_Windows10_EmbeddedFirmware-v0.1.0-2023-02-18-09-54-00_USB_KO_pcapng.zip