-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
I'm troubleshooting an intermittent "imprecise" HardFault. crash_log_parser
crashed when trying to parse a crash log from firmware where I had disabled the write buffer use during default memory map access with the instruction SCnSCB->ACTLR &= ~(SCnSCB_ACTLR_DISDEFWBUF_Msk);
.
References:
https://community.nxp.com/docs/DOC-103810
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/CHDCBHEE.html
EDIT: Update here: #6444 (comment).
Description
- Type: Bug
- Priority: Major | Minor
Bug
Target
LPC4088
Toolchain:
GCC_ARM
Toolchain version:
MCUXpresso IDE v10.1.1 [Build 606] [2018-01-02]
(and whatever version of GCC_ARM that comes with)
mbed-cli version:
1.5.0 (with ARMmbed/mbed-cli#642)
mbed-os sha:
ad284b280 (tag: mbed-os-5.8.0-rc2, tag: mbed-os-5.8.0, arm/mbed-os-5.8, mbed-os-5.8) Merge pull request #6352 from ARMmbed/release-candidate
DAPLink version:
Expected behavior
crash_log_parser successfully parses a crash log to produce crash info.
Actual behavior
me@pc ~/Documents/proj/troubleshooting
$ ./crash_log_parser.py crash-log.txt fw-build-dbg.axf fw-build-dbg.map
Crash Info:
Traceback (most recent call last):
File "./crash_log_parser.py", line 194, in <module>
main(args.crashlog, elfhelper)
File "./crash_log_parser.py", line 164, in main
print("\tCrash location = %s [0x%s] (based on PC value)" % (pc_name.strip(), str(pc_val)))
UnboundLocalError: local variable 'pc_name' referenced before assignment
Steps to reproduce (maybe)
- Write a program that crashes with a HardFault on an ARM Cortex-M4. (Might need to be "imprecise"; IDK. Cortex-M3 would probably work.)
- Include the instruction
SCnSCB->ACTLR &= ~(SCnSCB_ACTLR_DISDEFWBUF_Msk);
to force precise faults. - Export to MCUXpresso IDE. Build. Load and run firmware.
- Make/watch it crash. Capture the
MbedOS Fault Handler
output, and run thecrash_log_parser
on it. - Observe failure to parse as above. Maybe.