Fixed shell regression because chCoreGetStatusX() change.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15094 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-11-16 14:27:19 +00:00
parent d35e7954b5
commit aef7260c96
1 changed files with 3 additions and 1 deletions

View File

@ -130,6 +130,7 @@ static void cmd_systime(BaseSequentialStream *chp, int argc, char *argv[]) {
#if (SHELL_CMD_MEM_ENABLED == TRUE) || defined(__DOXYGEN__)
static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
size_t n, total, largest;
memory_region_t region;
(void)argv;
if (argc > 0) {
@ -137,7 +138,8 @@ static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) {
return;
}
n = chHeapStatus(NULL, &total, &largest);
chprintf(chp, "core free memory : %u bytes" SHELL_NEWLINE_STR, chCoreGetStatusX());
chCoreGetStatusX(&region);
chprintf(chp, "core free memory : %u bytes" SHELL_NEWLINE_STR, region.size);
chprintf(chp, "heap fragments : %u" SHELL_NEWLINE_STR, n);
chprintf(chp, "heap free total : %u bytes" SHELL_NEWLINE_STR, total);
chprintf(chp, "heap free largest: %u bytes" SHELL_NEWLINE_STR, largest);