Skip to content

Commit

Permalink
Added typescript access to heap debug functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnVidler committed Sep 22, 2023
1 parent c90146f commit 7ea36da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions libs/core/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ namespace control {
release_fiber();
}

/**
* CODAL Heap Debug Output
*/
void printCodalHeap() {
#if MICROBIT_CODAL && CODAL_DEBUG > 0
device_heap_print();
#else
dmesg( "CODAL debug disabled." );
#endif
}

/**
* Gets the number of milliseconds elapsed since power on.
*/
Expand Down
2 changes: 1 addition & 1 deletion libs/core/pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"DMESG_ENABLE": 1,
"DEVICE_DMESG_BUFFER_SIZE": 1024,
"DMESG_SERIAL_DEBUG": 1,
"CODAL_DEBUG": 3,
"CODAL_DEBUG": 1,
"CODAL_DEFAULT_STREAM_RECORDING_MAX_LENGTH": 60000
},
"optionalConfig": {
Expand Down
2 changes: 1 addition & 1 deletion pxtarget.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"codalTarget": {
"name": "codal-microbit-v2",
"url": "https://github.com/lancaster-university/codal-microbit-v2",
"branch": "v0.2.61-master.0",
"branch": "v0.2.61-master.2",
"type": "git"
},
"codalBinary": "MICROBIT",
Expand Down

0 comments on commit 7ea36da

Please sign in to comment.