2020-08-23 08:00 AM
Hi,
I was going through the example of promixity sensor of B-L475E-IOT01A board in the github stm32l4cube repository. i compiled the code and debugged it. After dumping the program into my board and while trying to get the values in hyperterminal I get the following error, HardFault_Handler() at stm32l4xx_it.c:61 0x8000882 . to be noted that I got this error only after I entered the command in my hyperterminal to view the sensor values.
Can anyone help me with rectifying this
Thanks!!!
Solved! Go to Solution.
2020-08-24 08:33 PM
The linker script (.ld) controls where the linker places things.
The listing file (.lst, .lss, etc) is a disassembly of the file, or sources. I expect you could use objcopy to generate one from the .elf file if necessary.
2020-08-23 08:56 AM
Perhaps start by looking at a listing file for the offending location.
Ideally in your debugger, you can inspect the processor registers, and code at/prior to the faulting location.
Perhaps an interrupt firing with an uninitialized pointer or peripheral instance
2020-08-23 09:25 AM
@Community member I am a newbie , so it would be very helpful if you can share any resources who previously encountered similar problem?
Thanks!!
2020-08-23 10:35 AM
The linker should be able to generate a listing file. A debugger should be able to show code at a specific address.
2020-08-23 11:07 AM
Status VL53L0X_Error <optimized out>
I found this in VL53L0X_PerformSingleRangingMeasurement() at
vl53l0x_api.c:2,519 0x800105c
and ".ld"is the linker file if I am not wrong
2020-08-23 11:52 AM
Debug with an IDE. Use the stack trace to guide the debugging process. Inspect the SCB register to determine the source of the hardfault and correct.
2020-08-24 10:37 AM
Thank you trying that now
2020-08-24 08:33 PM
The linker script (.ld) controls where the linker places things.
The listing file (.lst, .lss, etc) is a disassembly of the file, or sources. I expect you could use objcopy to generate one from the .elf file if necessary.
2020-08-24 11:05 PM
Thank you so much , will try that
2020-08-24 11:26 PM
I commented out the function which actually converts the millimeter values to sigma ( I think the function ensures the distance values we get are within a limit of a certain range) , now the code seems to work , but not sure whether my values are calibrated . Thanks!!!