C8 MCU flash size check (#461)

This commit is contained in:
Ben Lye
2020-10-30 11:21:39 +00:00
committed by GitHub
parent 36675cf729
commit 627d47f139
2 changed files with 10 additions and 1 deletions

View File

@@ -374,7 +374,7 @@ void setup()
#ifndef DISABLE_FLASH_SIZE_CHECK
unsigned short *flashSize = (unsigned short *) (0x1FFFF7E0);// Address register
debugln("Module Flash size: %dKB",(int)(*flashSize & 0xffff));
if((int)(*flashSize & 0xffff) < 128) // Not supported by this project
if((int)(*flashSize & 0xffff) < MCU_EXPECTED_FLASH_SIZE) // Not supported by this project
while (true) { //SOS
for(uint8_t i=0; i<3;i++)
{