Skip to content
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

Fix crash capture feature for nuvoton #10349

Merged
merged 7 commits into from
Apr 12, 2019

Conversation

studavekar
Copy link
Contributor

Description

This should fix #9069, updated to created a memory region instead of block.

Tested on a set of devices, instead of just one like #10311

Device Test Results
K64F tests-mbed_platform-crash_reporting Pass
NRF52840_DK tests-mbed_platform-crash_reporting Pass
DISCO_L475VG_IOT01A tests-mbed_platform-crash_reporting Pass
NUMAKER_PFM_NUC472 tests-mbed_platform-crash_reporting Pass
NUMAKER_PFM_M487 tests-mbed_platform-crash_reporting Pass

Pull request type

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

Reviewers

@SenRamakri @ccli8

Release Notes

Copy link
Contributor

@ccli8 ccli8 left a comment

Choose a reason for hiding this comment

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

On Nuvoton targets, CSTACK is placed at start of IRAM region to detect stack overflow by hardware error. Would you change crash data to other location like:

M487.icf:

define symbol __ICFEDIT_region_IRAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_IRAM_end__   = 0x20027F00 - 1;
define symbol __region_CRASH_DATA_RAM_start__  = 0x20027F00;
define symbol __region_CRASH_DATA_RAM_end__  = 0x20028000 - 1;

TARGET_NU_XRAM_SUPPORTED/NUC472_442.icf:
TARGET_NU_XRAM_UNSUPPORTED/NUC472_442.icf:

define symbol __ICFEDIT_region_IRAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_IRAM_end__   = 0x2000FF00 - 1;
define symbol __region_CRASH_DATA_RAM_start__  = 0x2000FF00;
define symbol __region_CRASH_DATA_RAM_end__  = 0x20010000 - 1;

@jeromecoutant
Copy link
Collaborator

Hi

I still think that this crash feature support should be defined for ALL targets.
Then customer is enabled it or not only with json configuration.

So CRASH_DATA_SIZE should not be part of icf, ld and sct files,
this should be defined at platform side: 0x100 when feature is enabled, 0 when disabled.

Regards,

@studavekar
Copy link
Contributor Author

I still think that this crash feature support should be defined for ALL targets.

Ideally, that should be the case. However, it's not in the scope of current PR

So CRASH_DATA_SIZE should not be part of icf, ld and sct files,
this should be defined at platform side: 0x100 when feature is enabled, 0 when disabled.

we need to carve out memory to store the crash context and report it after reset. @jeromecoutant can you please elaborate on suggested improvement.

@studavekar
Copy link
Contributor Author

@ccli8 have made the changes suggested.

@jeromecoutant
Copy link
Collaborator

@jeromecoutant can you please elaborate on suggested improvement.

There should not be any impact on RAM when crash feature is disabled.
That's why I suggested a 0 size.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2019

I still think that this crash feature support should be defined for ALL targets.
Then customer is enabled it or not only with json configuration.

@jeromecoutant To keep this moving, can you create an issue about this?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 10, 2019

Test run: FAILED

Summary: 2 of 7 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 10, 2019

Failures are related to the changes - linker error about undefined crash symbols

@studavekar
Copy link
Contributor Author

Failures are related to the changes - linker error about undefined crash symbols

Fixed the CI failure for GCC_ARM and ARM toolchain

@cmonr
Copy link
Contributor

cmonr commented Apr 12, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 12, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2019

Exporters restarted - internal symlink error

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.

M487: Crash report test failed in IAR
7 participants