- 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.
- ✅ 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 test now exists.
Manual Execution Checks
The following checks involve executing code and/or telecommands.
- Units tests pass.
- 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?
- Ensure that the Golden Copy is mapped in STM32L4R5ZITx_FLASH.ld file as such:
GOLDEN_COPY (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 GOLDEN_COPY address defined in the linker script
STM32L4R5ZITx_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
) sums to less than the configTOTAL_HEAP_SIZE
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.