static void DEV_ReadCommSets(void)
{
UINT32 i, value;
tParaSet *pSets = DevCommSets;
DF_ReadMainMemoryPage(SAVE_DEV_COMM_SETS_PAGE,
DEV_ReadData, COMM_MAX_SETS * 4 + 4);
for (i = 0; i < COMM_MAX_SETS; i++)
{
value = BytesToDword(&DEV_ReadData[i * 4]);
pSets->value = value;
if ((pSets->value > pSets->MaxValue) || (pSets->value < pSets->MinValue))
{
pSets->value = pSets->DefValue;
}
pSets++;
}
DEV_CommSetsCrc = BytesToDword(&DEV_ReadData[i * 4]);
}
(gdb) c
Continuing.
Breakpoint 1, DEV_ReadCommSets () at device.c:984
984 pSets->value = value;
(gdb) n
0x00000000 in ?? () 出现这种问题,请问我该怎么查,谢谢
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
楼主编译都通过了么????
http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
那就是环境有毛病,从地址0000000开始,就是说没有进入main
http://shop34182318.taobao.com/
https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr
回复 4楼ddllxxrr 的帖子
原因找到了,是我中断函数没有设置好,设置好了之后执行pSets->value = value;后会进入下面的硬中断函数,不知道这个问题该怎么解决,谢谢
/**
* @brief This function handles Hard Fault exception.
* @param None
* @retval None
*/
void HardFault_Handler(void)
{
/* Go to infinite loop when Hard Fault exception occurs */
while (1)
{}
}
调试过程如下:
(gdb) n
271 main();
(gdb) c
Continuing.
Breakpoint 1, DEV_ReadCommSets () at device.c:980
980 for (i = 0; i < COMM_MAX_SETS; i++)
(gdb) n
982 value = BytesToDword(&DEV_ReadData[i * 4]);
(gdb) n
984 pSets->value = value;
(gdb) n
HardFault_Handler () at stm32f10x_it.c:61
61 {
(gdb) n
64 {}