CmBacktrace icon indicating copy to clipboard operation
CmBacktrace copied to clipboard

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

Open wutianjun5858 opened this issue 7 years ago • 2 comments

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);

}

wutianjun5858 avatar Aug 13 '18 02:08 wutianjun5858

it is same problem for me.

lanxb avatar Nov 21 '18 06:11 lanxb

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.

lanxb avatar Nov 21 '18 06:11 lanxb