armink / CmBacktrace

Advanced fault backtrace library for ARM Cortex-M series MCU | ARM Cortex-M 系列 MCU 错误追踪库
MIT License
1.59k stars 640 forks source link

gcc下这个div 0必须手动打开而不是自动打开的吗? 注释掉就不会捕获除0了 #20

Open wutianjun5858 opened 5 years ago

wutianjun5858 commented 5 years ago

void fault_test_by_div0(void) { //volatile int SCB_CCR = (volatile int )0xE000ED14;// SCB->CCR int x, y, z;

//*SCB_CCR |= (1 << 4); /* bit4: DIV_0_TRP. */

x = 10;
y = 0;
z = x / y;
My_printf("z:%d\r\n", z);

}

lanxb commented 5 years ago

it is same problem for me.

lanxb commented 5 years ago

void fault_test_by_div0(void) { //volatile int SCB_CCR = (volatile int )0xE000ED14;// SCB->CCR int x, y, z;

//*SCB_CCR |= (1 << 4); /* bit4: DIV_0_TRP. */

x = 10;
y = 0;
z = x / y;
My_printf("z:%d\r\n", z);

} Help!!

Please publish your "*.ld" files here ,i can't get "stext" and "sstack",it's cna't work for me.