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

nrf51.cpu -- clearing lockup after double fault #2769

Open
atoncetti opened this issue Feb 11, 2022 · 1 comment
Open

nrf51.cpu -- clearing lockup after double fault #2769

atoncetti opened this issue Feb 11, 2022 · 1 comment

Comments

@atoncetti
Copy link

atoncetti commented Feb 11, 2022

Running apache-mynewt-nimble/apps/bleprph app on a micro:bit v1 yields the following problem:

$ newt run myperiph 0
App image successfully generated: ...
Loading app image into slot 1  ...
; nrf51.cpu configure -event gdb-detach {if {[nrf51.cpu curstate] eq "halted"} resume;shutdown}
GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git

--Type <RET> for more, q to quit, c to continue without paging--

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ...
0xfffffffe in ?? ()
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
0xfffffffe in ?? ()
target halted due to debug-request, current mode: Thread 
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
(gdb) c
Continuing.
nrf51.cpu -- clearing lockup after double fault

Program received signal SIGINT, Interrupt.
0xfffffffe in ?? ()

Setup:

# target.yml
target.app: "@apache-mynewt-nimble/apps/bleprph"
target.bsp: "@apache-mynewt-core/hw/bsp/bbc_microbit"
target.build_profile: optimized
# syscfg.yml
syscfg.vals:
      LOG_LEVEL: 255
      BLE_LL_CFG_FEAT_LE_ENCRYPTION: 0
      BLE_SM_LEGACY: 0
      BLE_SM_SC: 0
# project.yml

...

repository.apache-mynewt-core:
    type: github
    vers: 0-dev
    user: apache
    repo: mynewt-core

The same problem occurs with other example apps.

@OancaAndrei
Copy link

Hi, had a similar issue, from what I could gather you need to load both the bootloader and your app. When you halt reset your device you can see that pc is pointing at 0xfffffffe when it should be something more like 0x000000c0.

In the tutorials you'll find that there are two targets that need to be created, built and uploaded onto the device.

You've created the app but you might be missing the nrf51_boot target. This is at least what solved my issue.

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

No branches or pull requests

2 participants