- The code should be audited for the following aspects, as a final check before the final flash.
Automated Check Ideas (GitHub Actions)
- ✅ Telecommand Execution (TCMDEXEC_) function names match their registrations in the table.
- Implemented in check_tcmd_function_names_match_registration_names().
- No malloc usage (via malloc(...)).
- FreeRTOS malloc operations via pvPortMalloc and pvPortCalloc may be acceptable, assuming the use cases were audited and approved during implementation.
- ✅ Are all TEST_EXEC_ functions registered in the test table?
- Implemented in validate_test_exec_registration().
- ✅ Are all TCMDEXEC_ functions registered in the telecommand table?
- Implemented in validate_tcmdexec_registration().
✅ = Automated validations now exists.
Manual Execution Checks
The following checks involve executing code and/or telecommands.
- Units tests pass.
- Self-checks pass (main and boom).
- Python-based system tests/checks pass.
Logging Checks
- Are all logs to LOG_message()? Limited use of UART logging.
- Are LOG_message() calls using the correct exclusions and levels?
- Are the log levels appropriate? Logs right before non-zero returns should generally be a warning/error level.
- Are the log format strings consistent with the actual arguments? TODO: Find a build option to enable this.
Other Checks
- Check the changelog of libraries (LittleFS, CSP maybe) for bug fixes.
- Are there any large VLA allocations? Can/should any be replaced with static allocations?
- Maybe enable -Wvla or -Wstack-usage? Not sure what they are yet.
- Maybe enable compiler optimizations? Decision: We'll use -Og (debug-safe optimizations) for the life of the project.
- Ensure that the Golden Copy is mapped in STM32L4R5XX_FLASH.ld file as such:
FLASH_BANK_2 (xrw) : ORIGIN = 0x8100000, LENGTH = 1024K
This is the linker script. The length can change.
- Ensure that we have flashed the golden copy of the OS to the FLASH_BANK_2 address defined in the linker script STM32L4R5XX_FLASH.ld
- Ensure all tasks are registered in the FREERTOS_task_info_struct_t FREERTOS_task_handles_array [] array. Consider a unit test for this check, maybe.
- Ensure the BOOT0 pin configuration is applied using STM32CubeProgrammer.
- nSWBOOT0 = Unchecked (use software config)
- nBOOT0 = Checked (boot from system memory)
- Check that the sum of the stack sizes of all the tasks (in main.c, measured in bytes) sums to less than the configTOTAL_HEAP_SIZE (in bytes) in FreeRTOSConfig.h (plus a margin).
Management Checks
- Are all the requirements met?
- Are all GitHub Issues implemented and/or closed as not implemented.
- Are all PRs merged?
- Are all branches merged?
- Ctrl+Shift+F for TODO and FIXME in the codebase.
- Upload the final flashed firmware .bin and .elf files to a GitHub Release.
- Critical for referencing in the exec_blob feature, which may call functions at specific memory addresses as they exist in the firmware.