MCPcopy Create free account
hub / github.com/kiibohd/controller / cliFunc_ram

Function cliFunc_ram

Debug/cli/cli.c:924–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924void cliFunc_ram( char* args )
925{
926#if defined(_kinetis_) || defined(_host_) || (_nrf_) || defined(_rustlib_)
927 print("Not implemented");
928#else
929extern uint32_t _sstack, _estack;
930
931 uint32_t *p;
932 for (p = &_sstack; p < &_estack; p++) {
933 if (*p != 0xDEADBEEF) break;
934 }
935
936 uint32_t stack_size = &_estack - &_sstack;
937 uint32_t stack_current = &_estack - (uint32_t*)__get_MSP();
938 uint32_t stack_peak = &_estack - p;
939
940 print( NL );
941 print("stack: ");
942 printHex(stack_size);
943 print(" bytes" NL);
944
945 print(" current = ");
946 printHex(stack_current);
947 print(" (");
948 printInt8( 100 * stack_current / stack_size );
949 print("%)" NL);
950
951 print(" peak = ");
952 printHex(stack_peak);
953 print(" (");
954 printInt8( 100 * stack_peak / stack_size );
955 print("%)" NL);
956#endif
957}
958
959void cliFunc_sleep( char* args )
960{

Callers

nothing calls this directly

Calls 2

__get_MSPFunction · 0.85
printInt8Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…