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

Projects
None yet
7 participants
@studavekar
Copy link
Contributor

commented Apr 8, 2019

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

@ccli8
Copy link
Contributor

left a comment

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

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2019

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 studavekar force-pushed the studavekar:fix-nuvonton-crash-data branch from f2baf6d to 3769ec4 Apr 9, 2019

@studavekar

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2019

@ccli8 have made the changes suggested.

@cmonr cmonr added needs: review and removed needs: work labels Apr 9, 2019

@ccli8

ccli8 approved these changes Apr 10, 2019

@jeromecoutant

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

@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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

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

@studavekar

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

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

Fixed the CI failure for GCC_ARM and ARM toolchain

@ccli8

ccli8 approved these changes Apr 11, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

CI started

@cmonr cmonr added needs: CI and removed needs: work labels Apr 12, 2019

@mbed-ci

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

Exporters restarted - internal symlink error

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Apr 12, 2019

@0xc0170 0xc0170 merged commit 4d56b94 into ARMmbed:master Apr 12, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9102 cycles (-103 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.