Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LCD_DISCO_F746NG BSP_DISCO_F746NG Graphics
Diff: stats_report.h
- Revision:
- 3:297f513b26fe
- Parent:
- 2:447f54400c21
--- a/stats_report.h Sun Aug 25 00:45:05 2019 +0700
+++ b/stats_report.h Mon Aug 26 22:24:04 2019 +0700
@@ -7,7 +7,6 @@
#define STATS_REPORT
#include "mbed.h"
-
/**
* System Reporting library. Provides runtime information on device:
* - CPU sleep, idle, and wake times
@@ -37,19 +36,19 @@
mbed_stats_sys_get(&sys_stats);
printf("=============================== SYSTEM INFO ================================\r\n");
- printf("Mbed OS Version: %ld \r\n", sys_stats.os_version);
- printf("CPU ID: 0x%lx \r\n", sys_stats.cpu_id);
+ printf("Mbed OS Version: %d \r\n", sys_stats.os_version);
+ printf("CPU ID: 0x%x \r\n", sys_stats.cpu_id);
printf("Compiler ID: %d \r\n", sys_stats.compiler_id);
- printf("Compiler Version: %ld \r\n", sys_stats.compiler_version);
+ printf("Compiler Version: %d \r\n", sys_stats.compiler_version);
for (int i = 0; i < MBED_MAX_MEM_REGIONS; i++) {
if (sys_stats.ram_size[i] != 0) {
- printf("RAM%d: Start 0x%lx Size: 0x%lx \r\n", i, sys_stats.ram_start[i], sys_stats.ram_size[i]);
+ printf("RAM%d: Start 0x%x Size: 0x%x \r\n", i, sys_stats.ram_start[i], sys_stats.ram_size[i]);
}
}
for (int i = 0; i < MBED_MAX_MEM_REGIONS; i++) {
if (sys_stats.rom_size[i] != 0) {
- printf("ROM%d: Start 0x%lx Size: 0x%lx \r\n", i, sys_stats.rom_start[i], sys_stats.rom_size[i]);
+ printf("ROM%d: Start 0x%x Size: 0x%x \r\n", i, sys_stats.rom_start[i], sys_stats.rom_size[i]);
}
}
}
@@ -104,8 +103,8 @@
// Collect and print heap stats
mbed_stats_heap_get(&heap_stats);
- printf("Current heap: %lu\r\n", heap_stats.current_size);
- printf("Max heap size: %lu\r\n", heap_stats.max_size);
+ printf("Current heap: %u\r\n", heap_stats.current_size);
+ printf("Max heap size: %u\r\n", heap_stats.max_size);
}
/**
@@ -119,12 +118,12 @@
int count = mbed_stats_thread_get_each(thread_stats, max_thread_count);
for (int i = 0; i < count; i++) {
- printf("ID: 0x%lx \r\n", thread_stats[i].id);
+ printf("ID: 0x%x \r\n", thread_stats[i].id);
printf("Name: %s \r\n", thread_stats[i].name);
- printf("State: %ld \r\n", thread_stats[i].state);
- printf("Priority: %ld \r\n", thread_stats[i].priority);
- printf("Stack Size: %ld \r\n", thread_stats[i].stack_size);
- printf("Stack Space: %ld \r\n", thread_stats[i].stack_space);
+ printf("State: %d \r\n", thread_stats[i].state);
+ printf("Priority: %d \r\n", thread_stats[i].priority);
+ printf("Stack Size: %d \r\n", thread_stats[i].stack_size);
+ printf("Stack Space: %d \r\n", thread_stats[i].stack_space);
}
}
};