CmBacktrace
CmBacktrace copied to clipboard
gcc下这个div 0必须手动打开而不是自动打开的吗? 注释掉就不会捕获除0了
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);
}
it is same problem for me.
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.