Skip to content

STM32F413 Crash Capture #11139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 9, 2019
Merged

Conversation

sethitow
Copy link
Contributor

@sethitow sethitow commented Jul 31, 2019

Description

This pull request adds crash capture support to STM32F413 targets.

[mbed] Working path "/fakepath/mbed-os-example-crash-reporting" (program)
[mbed] Detecting connected targets/boards to your system...
[mbed] Opening serial terminal to "DISCO_F413ZH"
--- Terminal on /dev/tty.usbmodem141103 - 9600,8,N,1 ---


Mbed-OS crash reporting test: main()

Forcing exception

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0   : 0800CE14
R1   : 0000000A
R2   : E000ED00
R3   : 0000AAA3
R4   : 00000000
R5   : 00000000
R6   : 00000000
R7   : 00000000
R8   : 00000000
R9   : 00000000
R10  : 00000000
R11  : 00000000
R12  : FFFFFFFF
SP   : 20002950
LR   : 080002ED
PC   : 080002C4
xPSR : 010F0000
PSP  : 20002930
MSP  : 2004FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000000
UFSR : 00000100
DFSR : 00000008
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP

-- MbedOS Fault Handler --



++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x8001013
Error Value: 0x80002C4
Current Thread: main  Id: 0x20001120 Entry: 0x8001EB3 StackSize: 0x1000 StackMem: 0x20001960 SP: 0x2004FF58 
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=DISCO_F413ZH
-- MbedOS Error Info --

= System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting =
mbed_error_reboot_callback: System rebooting, reboot error callback received

Mbed-OS crash reporting test: main()

Successfully read reboot info ==> 

  error status: 0x80FF013D
  error value: 0x080002C4
  error address: 0x08001013
  error reboot count: 0x00000001
  error crc: 0x77CB5C03

Crash Report data captured:
[0]: 0x0800CE14
[1]: 0x0000000A
[2]: 0xE000ED00
[3]: 0x0000AAA3
[4]: 0x00000000
[5]: 0x00000000
[6]: 0x00000000
[7]: 0x00000000
[8]: 0x00000000
[9]: 0x00000000
[10]: 0x00000000
[11]: 0x00000000
[12]: 0xFFFFFFFF
[13]: 0x20002950
[14]: 0x080002ED
[15]: 0x080002C4

Mbed-OS crash reporting test completed

Pull request type

[ ] Fix
[ ] Refactor
[ x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@ciarmcom ciarmcom requested review from a team July 31, 2019 23:00
@ciarmcom
Copy link
Member

@sethitow, thank you for your changes.
@ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@sethitow sethitow marked this pull request as ready for review July 31, 2019 23:27
; 320KB SRAM (0x50000)
; Total: 118 vectors = 472 bytes (0x1D8) to be reserved in RAM
RW_IRAM1 (0x20000000+0x1D8) (0x50000-0x1D8-Stack_Size) { ; RW data
RW_IRAM1 (MBED_RAM0_START) (MBED_RAM0_SIZE-Stack_Size) { ; RW data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crash report data area seems to be missing

RW_m_crash_data MBED_CRASH_REPORT_RAM_START EMPTY MBED_CRASH_REPORT_RAM_SIZE { ; RW data
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, good catch. I believe I've fixed this and I've amended the commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid force push in the future as the review history is lost.
Have you tested your change with the different toolchains to ensure that crash capture is now working for this target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, will avoid in the future. No, I only have access to gcc right now.

@sethitow sethitow force-pushed the stm32f413-crash-capture branch from 6902cea to 4c4b95e Compare August 1, 2019 18:28
@evedon
Copy link
Contributor

evedon commented Aug 5, 2019

CI Started

@mbed-ci
Copy link

mbed-ci commented Aug 5, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@evedon
Copy link
Contributor

evedon commented Aug 6, 2019

LGTM

@MarceloSalazar @ARMmbed/team-st-mcd please review the STM files

@MarceloSalazar
Copy link

Pending review and approval from @ARMmbed/team-st-mcd

@jamesbeyond jamesbeyond requested review from a team and MarceloSalazar August 6, 2019 15:06
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 9, 2019

Pending review and approval from @ARMmbed/team-st-mcd

Can we proceed with this PR? Please review

Copy link
Contributor

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for delay ... (summer break )
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants