From 4124d0a9502ed61b06ba9090e71f3d61ad7d5076 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 14 Nov 2021 18:17:36 +0100 Subject: [PATCH] Quick and dirty: use a memory address actually usable with DMA --- radio/src/cli.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radio/src/cli.cpp b/radio/src/cli.cpp index 05a93eca3..cd27740a0 100644 --- a/radio/src/cli.cpp +++ b/radio/src/cli.cpp @@ -903,7 +903,7 @@ int cliSerialPassthrough(const char **argv) if (port_n == INTERNAL_MODULE) { // TODO: check the stack level so we don't crash it - uint8_t tmpBuf[256]; + uint8_t* tmpBuf = (uint8_t*)malloc(256); // setup serial com // TODO: @@ -931,6 +931,9 @@ int cliSerialPassthrough(const char **argv) serialPutc(inData); } } + + free(tmpBuf); + tmpBuf = nullptr; } #endif