在线时间0 小时
UID136030
ST金币0
蝴蝶豆0
注册时间2009-6-19
新手上路
- 最后登录
- 1970-1-1
|
a0a.1 0b0c
我用的片子是STM32F103ZE,工具是IAR 5.20,编译的程序是ucos ii V2.86 我在App_TaskStart中建的数组,代码如下:
static void App_TaskStart (void *p_arg)
{
INT8U m_n8uTestArry[10];
(void)p_arg; /* See Note #1 */
App_InitValue();
BSP_Init(); /* Initialize BSP functions */
OS_CPU_SysTickInit(); /* Initialize the SysTick. */
App_EventCreate(); /* Create application events */
App_TaskCreate(); /* Create application tasks */
m_n8uTestArry[0]=0xaa;
m_n8uTestArry[1]=0xbb;
m_n8uTestArry[2]=0xcc;
m_n8uTestArry[3]=0xdd;
m_n8uTestArry[4]=0xee;
m_n8uTestArry[5]=0xff;
BSP_LED_Off(0);
while (DEF_TRUE) { /* Task body, always written as an infinite loop. */
BSP_LED_On(1);
OSTimeDlyHMSM(0, 0, 1, 0);
BSP_LED_Off(1);
OSTimeDlyHMSM(0, 0, 1, 0);
}
}
但是通过仿真器看m_n8uTestArry根本没有赋上值,我查了汇编代码是
MOVS R0,#0xAA
STRB R0,[SP]
MOVS R0,#0xBB
STRB R0,[SP,#0x1]
MOVS R0,#0xCC
STRB R0,[SP,#0x2]
MOVS R0,#0xDD
STRB R0,[SP,#0x3]
MOVS R0,#0xEE
STRB R0,[SP,#0x4]
MOVS R0,#0xFF
STRB R0,[SP,#0x5]
其中SP=0x200003D0; 堆栈定义在STM32F103ZE_FLASH.icf中
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/
不知道到底是什么原因?哪位高手能帮忙解答一下,谢谢!
|
|