Skip to content
Snippets Groups Projects
Verified Commit 6a358342 authored by rahix's avatar rahix
Browse files

feat(pycardium): Implement proper heap


Closes #15.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent c5730693
No related branches found
No related tags found
No related merge requests found
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include "max32665.h" #include "max32665.h"
static char heap[4096]; /* Defined in linker script */
extern void *__StackTop, *__StackLimit;
extern int __StackTop, __StackLimit; extern void *__HeapBase, *__HeapLimit;
int main(void) int main(void)
{ {
...@@ -21,7 +21,7 @@ int main(void) ...@@ -21,7 +21,7 @@ int main(void)
NVIC_EnableIRQ(TMR5_IRQn); NVIC_EnableIRQ(TMR5_IRQn);
while (1) { while (1) {
gc_init(heap, heap + sizeof(heap)); gc_init(&__HeapBase, &__HeapLimit);
mp_init(); mp_init();
pyexec_friendly_repl(); pyexec_friendly_repl();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment