STM320F0----IAP问题

2019-07-14 17:10发布

    目前在做IAP,遇到一个很诡异的file:///C:/Users/Administrator/AppData/Roaming/Foxmail7/Temp-5120-20150630094335/Catch9FE1(06-30-09-43-49).jpg问题      开发环境是KEIL 5.15,MCU STM32F030R8
        1,
Boot起始地址为0x08000000,IROM,IRAM设置如下图
         初始化SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_Flash);

,file:///C:/Users/Administrator/AppData/Roaming/Foxmail7/Temp-5120-20150630094335/Catch9FE1(06-30-09-43-49).jpg

2, APP起始地址为0x8003000,IROM,IRAM设置如下图

        初始化,按照官方的demo,中断向量表重载到SRAM
                uint32_t i = 0;
        __IO uint32_t VectorTable[48] __attribute__((at(0x20000000)));
        /* Relocate by software the vector table to the internal SRAM at 0x20000000 ***/  

        /* Copy the vector table from the Flash (mapped at the base of the application
        load address 0x08003000) to the base address of the SRAM at 0x20000000. */
        for(i = 0; i < 48; i++)
        {
                VectorTable = *(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2));
        }

        /* Enable the SYSCFG peripheral clock*/
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
        /* Remap SRAM at 0x00000000 */
        SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
       
       
        目前的问题是,我debug boot工程时候,跳转到 app运行,boot工程定义的变量 和数组一直在变化。然后从APP跳转回boot,
        boot工程定义的变量 和数组也是一直在变化。实际上,这些变量和数组并没有进行实际的赋值操作。如下




请问一下我的问题出在哪里?有没有方法解决?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
4条回答
wule110
2019-07-15 09:50
亲爱的娜娜 发表于 2018-10-2 06:52
之前也遇到过过这个问题,在debug时不断的看到自己定义个的一个数组(比如512字节)里面的数据发生变化,但是自己并没有修改这个数组的内容。
出现这个问题时设置个断点查看会发现其实数组的内容并没有发生变化,但是全速debug还是能看到这个数组在变化,如果不影响程序的运行结果,就别纠结这个了。 ...

没有啊,我的一直在变化!断点的时候,数组的内容都发生了变化。从APP跳转回来,内容也发生变化!

一周热门 更多>