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

Add health check runtime test for memories, fix fram driver and fix internal flash device driver #353

Merged
merged 32 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4f29ca5
firmware: Add Memory Health Check utility
c-porto Jul 24, 2024
89d7007
firmware: system: sys_log: Add a log function for tests
c-porto Jul 26, 2024
edab4b5
firmware: config: Fix HealthCheck flags
c-porto Jul 26, 2024
c242800
firmware: app: tasks: mem_check: Add tests for param loading from fram
c-porto Jul 26, 2024
aeafdb2
firmware: system: sys_log: Fix print_test_result function
c-porto Jul 27, 2024
0fd5515
firmware: Add initial backup for media info using internal flash
c-porto Jul 27, 2024
f2405c4
firmware: app: Fix obdh data saving to fram
c-porto Jul 28, 2024
1eb642c
firmware: system: sys_log: Add SYS_LOG_INFO color
c-porto Jul 28, 2024
7d37afb
firmware: app: tasks: time_control: Add log message when saving syste…
c-porto Jul 28, 2024
465a728
firmware: app: Refactor data log task
c-porto Jul 28, 2024
41e1385
firmware: Fix integer type bug in payload lenght assignment
c-porto Jul 28, 2024
3a01c36
firmware: Fix MEDIA_INT_FLASH device functions
c-porto Jul 29, 2024
537be79
firmware: app: tasks: read_edc: Update flash writing of PTT packets
c-porto Jul 30, 2024
6eaf9ec
firmware: app: utils: mem_mng: Format functions
c-porto Jul 30, 2024
18cfe49
firmware: app: tasks: mem_check: Add internal flash tests and cleanup
c-porto Jul 30, 2024
2504e8b
firmware: app: Update obdh data backup strategy
c-porto Jul 30, 2024
0a09314
firmware: app: tasks: mem_check: Include tests for new backup strategy
c-porto Jul 30, 2024
c9f2901
firmware: app: utils: mem_mng: Add another check to ensure data integ…
c-porto Jul 30, 2024
871e1db
firmware: system: sys_log: Increase max wait time for sys_log mutex
c-porto Jul 30, 2024
9471994
firmware: drivers: flash: Fix flash_erase function
c-porto Jul 30, 2024
ce72e52
firmware: app: utils: Remove assert
c-porto Jul 30, 2024
ccabdde
firmware: drivers: cy15x102qn: Add write enable command for writes
c-porto Jul 31, 2024
79dec56
firmware: devices: media: Add fram status register config on initiali…
c-porto Jul 31, 2024
72fa950
firmware: app: tasks: mem_check: Update mem_full_clean function
c-porto Jul 31, 2024
6ca4bb9
firmware: app: tasks: data_log: Add notification log message
c-porto Jul 31, 2024
8ed968e
firmware: app: tasks: startup: Update media init structure
c-porto Jul 31, 2024
bb76fb6
firmware: Update versions of modified files
c-porto Aug 2, 2024
e454c38
Merge branch 'dev_firmware' into feature_mem_debug
c-porto Aug 2, 2024
79a09fb
firmware: Update version for modified files
c-porto Aug 2, 2024
2c1a37a
firmware: app: tasks: startup: Fix MISRA-C 2012 violations
c-porto Aug 2, 2024
32c4680
firmware: tests: drivers: Update cy15x102qn test to expect WREN ops
c-porto Aug 2, 2024
cf09a64
firmware: tests: devices: Update media test to expect fram configurat…
c-porto Aug 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
firmware: system: sys_log: Add a log function for tests
c-porto committed Jul 26, 2024
commit 89d7007d7164dcc7a53c11be4d1d41f6e5abbce0
24 changes: 24 additions & 0 deletions firmware/system/sys_log/sys_log.c
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@
*/

#include <math.h>
#include <stdbool.h>

#include <FreeRTOS.h>
#include <task.h>
@@ -391,4 +392,27 @@ void sys_log_print_firmware_version(void)
sys_log_print_msg(FIRMWARE_VERSION);
}

void sys_log_print_test_result(bool result, const char *check_msg)
{
(void)sys_log_mutex_take();

sys_log_print_msg("[ ");

if (result)
{
sys_log_set_color(SYS_LOG_COLOR_GREEN);
sys_log_print_msg("OK");
sys_log_reset_color();
}
else
{
sys_log_set_color(SYS_LOG_COLOR_RED);
sys_log_print_msg("FAILED");
sys_log_reset_color();
}

sys_log_print_msg(" ] ");
sys_log_print_msg(check_msg);
}

/** \} End of sys_log group */
15 changes: 15 additions & 0 deletions firmware/system/sys_log/sys_log.h
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
#define SYS_LOG_H_

#include <stdint.h>
#include <stdbool.h>

/**
* \brief Event types.
@@ -262,6 +263,20 @@ void sys_log_print_splash_screen(void);
*/
void sys_log_print_firmware_version(void);

/**
* \brief Prints a systemd like check message for a test.
*
* The function takes the xSysLogMutex, but it does not give the mutex back, very much like
* the sys_log_print_event_from_module function.
*
* \param[in] result is the result of the test, True for "OK" and False for "FAILED".
*
* \param[in] check_msg is the message explaining the test.
*
* \return None.
*/
void sys_log_print_test_result(bool result, const char *check_msg);

/**
* \brief Initialization of the system log UART port.
*