Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Fix buggy CI self hosted runners behaviour flash failed #36

Open
John15321 opened this issue Aug 21, 2022 · 0 comments · Fixed by #45
Open

[MINOR] Fix buggy CI self hosted runners behaviour flash failed #36

John15321 opened this issue Aug 21, 2022 · 0 comments · Fixed by #45
Assignees
Labels
Bug Something isn't working CI/CD Issues related to the CI/CD configuration Help wanted Extra attention is needed Investigation Testing Task related to testing

Comments

@John15321
Copy link
Member

John15321 commented Aug 21, 2022

Sometimes it's needed to re-run a hardware CI job multiple times for it to succeed. It seems to be caused by the runner not being able to properly access the ST-Link. A few examples of false fails:

[100%] Built target OBC.elf
st-flash 1.6.1
2022-08-21T14:33:55 INFO common.c: F4xx (Dynamic Efficency): 96 KiB SRAM, 384 KiB flash in at least 16 KiB pages.
file OBC.bin md5 checksum: 22fb569ed5f2276ebadbfe39ed765e, stlink checksum: 0x0008c5b6
2022-08-21T14:33:55 INFO common.c: Attempting to write 6116 (0x17e4) bytes to stm32 address: 134217728 (0x8000000)
EraseFlash - Sector:0x0 Size:0x4000 2022-08-21T14:33:55 INFO common.c: Flash page at addr: 0x08000000 erased
2022-08-21T14:33:55 INFO common.c: Finished erasing 1 pages of 1[63](https://github.com/Aerospace-ASP/Firmware/runs/7938859229?check_suite_focus=true#step:6:64)84 (0x4000) bytes
2022-08-21T14:33:55 INFO common.c: Starting Flash write for F2/F4/L4
2022-08-21T14:33:55 INFO flash_loader.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 6116
2022-08-21T14:33:56 ERROR flash_loader.c: flash loader run error
stlink_fwrite_flash() == -1
2022-08-21T14:33:56 ERROR common.c: stlink_flash_loader_run(0x8000000) failed! == -1
Error: Process completed with exit code 255.
Building: OBC.bin
[100%] Built target OBC.elf
libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003, errno=13
st-flash 1.6.1
libusb: error [get_usbfs_fd] libusb requires write access to USB device nodes
2022-08-20T17:46:01 WARN usb.c: Couldn't find any ST-Link devices
Error: Process completed with exit code 255.

Examples:

Related to:

@John15321 John15321 added Bug Something isn't working Help wanted Extra attention is needed Investigation CI/CD Issues related to the CI/CD configuration Testing Task related to testing labels Aug 21, 2022
@John15321 John15321 self-assigned this Aug 21, 2022
John15321 added a commit that referenced this issue Aug 30, 2022
### Proposed changes
* Added a temporary fix for the flashing error by trying to rerun the flashing command. Because The issue occurs with every second run it should temporarily be solved although it should be investigated further.
```bash
st-flash write OBC.bin 0x8000000 || st-flash write OBC.bin 0x8000000
```

### Resolves issue/task
* #36
@John15321 John15321 reopened this Aug 30, 2022
@John15321 John15321 added this to the 🚀 Finish CI/CD setup milestone Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working CI/CD Issues related to the CI/CD configuration Help wanted Extra attention is needed Investigation Testing Task related to testing
Projects
None yet
1 participant