35 lines
604 B
C
35 lines
604 B
C
|
||
#include "tasks.h"
|
||
|
||
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
|
||
#include "boottasks.h"
|
||
#else
|
||
#include "apptasks.h"
|
||
#endif
|
||
|
||
void SetVectorTable(void)
|
||
{
|
||
#if (__CORTEX_M == 0)
|
||
// 在使用STM32F0XX时,若增加IAP,则必须在APP中将中断向量表拷贝到SRAM,并将系统重映射到SRAM,这样才能使中断恢复正常工作。
|
||
#else
|
||
CLEAR_ALL_INT();
|
||
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
|
||
SCB->VTOR = FLASH_BASE | 0;
|
||
#else
|
||
SCB->VTOR = FLASH_BASE | STM32_BOOT_SIZE;
|
||
#endif
|
||
SET_ALL_INT();
|
||
#endif
|
||
}
|
||
|
||
void MainTasks(void)
|
||
{
|
||
#if (CUR_CORE_BOARD == CORE_BOARD_BOOT)
|
||
BootMainTask(); // 启动代码
|
||
#else
|
||
AppMainTask(); // 应用代码
|
||
#endif
|
||
}
|
||
|
||
|