use define to support Code in stm32f103

This commit is contained in:
lyon1998 2021-10-11 20:33:21 +08:00
parent b513605bff
commit 4dba4e92e5
2 changed files with 18 additions and 1 deletions

View File

@ -725,6 +725,11 @@
<FileType>1</FileType>
<FilePath>..\pikascript\pikascript-api\STM32_PWM-api.c</FilePath>
</File>
<File>
<FileName>PikaMath_Operator-api.c</FileName>
<FileType>1</FileType>
<FilePath>..\pikascript\pikascript-api\PikaMath_Operator-api.c</FilePath>
</File>
</Files>
</Group>
<Group>
@ -795,6 +800,16 @@
<FileType>1</FileType>
<FilePath>..\pikascript\pikascript-lib\PikaStdDevice\PikaStdDevice_PWM.c</FilePath>
</File>
<File>
<FileName>PikaMath_Operator.c</FileName>
<FileType>1</FileType>
<FilePath>..\pikascript\pikascript-lib\PikaMath\PikaMath_Operator.c</FilePath>
</File>
<File>
<FileName>STM32_Code.c</FileName>
<FileType>1</FileType>
<FilePath>..\pikascript\pikascript-lib\STM32\STM32_Code.c</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -40,6 +40,7 @@ uint32_t GetPage(uint32_t Addr) {
return (Addr - FLASH_BASE) / FLASH_PAGE_SIZE;
}
#if (defined Code_ENABLE)
void STM32_Code_flashHandler() {
if (!codeHeap.ena){
/* recive not activate */
@ -134,4 +135,5 @@ void STM32_Code_flashHandler() {
printf("\r\n");
HAL_NVIC_SystemReset();
}
}
#endif