diff --git a/demos/ARMCM3-STM32F103-FATFS-GCC/main.c b/demos/ARMCM3-STM32F103-FATFS-GCC/main.c index ddd85c8fc..cfe5fde8b 100644 --- a/demos/ARMCM3-STM32F103-FATFS-GCC/main.c +++ b/demos/ARMCM3-STM32F103-FATFS-GCC/main.c @@ -113,7 +113,7 @@ static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) { return; } n = chHeapStatus(NULL, &size); - siprintf(buf, "core free memory : %lu bytes", chCoreFree()); + siprintf(buf, "core free memory : %lu bytes", chCoreStatus()); shellPrintLine(chp, buf); siprintf(buf, "heap fragments : %lu", n); shellPrintLine(chp, buf); diff --git a/demos/PPC-SPC563-GCC/main.c b/demos/PPC-SPC563-GCC/main.c index f2101c130..6e65e2263 100644 --- a/demos/PPC-SPC563-GCC/main.c +++ b/demos/PPC-SPC563-GCC/main.c @@ -37,7 +37,7 @@ static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) { return; } n = chHeapStatus(NULL, &size); - siprintf(buf, "core free memory : %i bytes", chCoreFree()); + siprintf(buf, "core free memory : %i bytes", chCoreStatus()); shellPrintLine(chp, buf); siprintf(buf, "heap fragments : %i", n); shellPrintLine(chp, buf); diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index 1418b70ec..aa6d29716 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -42,7 +42,7 @@ static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) { return; } n = chHeapStatus(NULL, &size); - sprintf(buf, "core free memory : %i bytes", chCoreFree()); + sprintf(buf, "core free memory : %i bytes", chCoreStatus()); shellPrintLine(chp, buf); sprintf(buf, "heap fragments : %i", n); shellPrintLine(chp, buf); diff --git a/os/kernel/include/chmemcore.h b/os/kernel/include/chmemcore.h index 7888222b3..4870c79f1 100644 --- a/os/kernel/include/chmemcore.h +++ b/os/kernel/include/chmemcore.h @@ -59,7 +59,7 @@ extern "C" { void core_init(void); void *chCoreAlloc(size_t size); void *chCoreAllocI(size_t size); - size_t chCoreFree(void); + size_t chCoreStatus(void); #ifdef __cplusplus } #endif diff --git a/os/kernel/src/chmemcore.c b/os/kernel/src/chmemcore.c index d0c657a48..f835e2111 100644 --- a/os/kernel/src/chmemcore.c +++ b/os/kernel/src/chmemcore.c @@ -109,11 +109,11 @@ void *chCoreAllocI(size_t size) { } /** - * @brief Core memory left. + * @brief Core memory status. * * @return The size, in bytes, of the free core memory. */ -size_t chCoreFree(void) { +size_t chCoreStatus(void) { return (size_t)(endmem - nextmem); } diff --git a/readme.txt b/readme.txt index c05ba2de7..54600c1d4 100644 --- a/readme.txt +++ b/readme.txt @@ -77,10 +77,15 @@ - CHANGE: Modified the STM32 FatFs demo, now it spawns a command shell or the serial port SD2, type "help" for the available commands. More commands can be easily added. +- CHANGE: Renamed the chCoreFree() function in chCoreStatus() because it + might be mistaken for a function that frees memory. - Various documentation fixes, added an article covering debugging under ChibiOS/RT, updated the article about interrupt handlers to cover also fast interrupt sources. - Long overdue test code cleanup and documentation. +- Added new test cases, now the coverage is again up to 100% except for the + debug module that would require triggering system terminating tests (panics), + the uncovered code is minimal and extremely simple anyway. *** 1.5.5 *** - FIX: Removed some "dead" code in the old ARMv7-M files (there are new diff --git a/test/testdyn.c b/test/testdyn.c index 2d05f346b..dcd2d951e 100644 --- a/test/testdyn.c +++ b/test/testdyn.c @@ -44,6 +44,7 @@ *