feat(freertos): Initialize cpu_sr when FreeRTOS core call port function xPortStartScheduler

This commit is contained in:
Dong Heng
2018-04-27 17:26:51 +08:00
committed by Wu Jian Gang
parent 3dda706968
commit 025f49d228

View File

@ -176,6 +176,16 @@ void xPortSysTickHandle(void)
portBASE_TYPE ICACHE_FLASH_ATTR
xPortStartScheduler(void)
{
/*
* TAG 1.2.3 FreeRTOS call "portDISABLE_INTERRUPTS" at file tasks.c line 1973, this is not at old one.
* This makes it to be a wrong value.
*
* So we should initialize global value "cpu_sr" with a right value.
*
* Todo: Remove this one when refactor startup function.
*/
cpu_sr = 0x20;
/*******software isr*********/
_xt_isr_attach(ETS_SOFT_INUM, SoftIsrHdl, NULL);
_xt_isr_unmask(1 << ETS_SOFT_INUM);