This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urN lua/lauxlib.c APM/libraries/AP_Scripting/lua/src/lauxlib.c | |
--- lua/lauxlib.c 2022-12-14 08:41:37.443587208 +1100 | |
+++ APM/libraries/AP_Scripting/lua/src/lauxlib.c 2022-12-14 10:11:20.343728284 +1100 | |
@@ -32,7 +32,6 @@ | |
#define MAX_SIZET ((size_t)(~(size_t)0)) | |
#endif | |
- | |
/* | |
** {====================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create a thread that checks for ECC errors in flash. We disable | |
fault IRQs in the thread and monitor it from the main thread. If it | |
doesn't complete in 1s then erase flash This is the only way I've | |
found to check for ECC errors without causing a bus fault or | |
unconditionally erasing flash | |
*/ | |
struct ecccheck { | |
const uint32_t *start; | |
uint32_t size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create a thread that checks for ECC errors in flash. We disable | |
fault IRQs in the thread and monitor it from the main thread. If it | |
doesn't complete in 1s then erase flash This is the only way I've | |
found to check for ECC errors without causing a bus fault or | |
unconditionally erasing flash | |
*/ | |
struct ecccheck { | |
const uint32_t *start; | |
uint32_t size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create a thread that checks for ECC errors in flash. We disable | |
fault IRQs in the thread and monitor it from the main thread. If it | |
doesn't complete in 1s then erase flash This is the only way I've | |
found to check for ECC errors without causing a bus fault or | |
unconditionally erasing flash | |
*/ | |
struct ecccheck { | |
const uint32_t *start; | |
uint32_t size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void check_ecc_errors(void) | |
{ | |
auto *dma = dmaStreamAlloc(STM32_DMA_STREAM_ID(1, 1), 0, nullptr, nullptr); | |
uint32_t buf[32]; | |
uint32_t ofs = 0; | |
while (ofs < BOARD_FLASH_SIZE*1024 && FLASH->SR1 == 0 && FLASH->SR2 == 0) { | |
__disable_fault_irq(); | |
dmaStartMemCopy(dma, | |
STM32_DMA_CR_PL(0) | STM32_DMA_CR_PSIZE_BYTE | | |
STM32_DMA_CR_MSIZE_BYTE, |
OlderNewer