This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem 'stopped by vector catch' in allocating RAM when I added a new ble service" (nrf52840 sdk15.3.0)

Hello,everyone

I want to add dfu service in UART example ,but when I tried to allocate the RAM,Debug terminal shows nothing,Then I set the breakpoint in nrf_sdh_ble.c and debugging,I can't enter the C file,

After I set breakpoint in main.c,I found that when debug goes to "ble_stack_init();",It will be block and I can't do anything,like the images:

1.before  debug "ble_stack_init();"

2.after  debug "ble_stack_init();"

it shows"restricted memory" in Watch,and The window "output" shows"stopped by vector catch",If I start"built and run" directly,It can succeed,but I think it doesn;t make anythings,Finally,I see maybe I can use app_error_handler_bare(), unfortunately I don't know how to use it.could you please give me some help? thanks!

best regards,

zhong

  • Hi Einar,

    ok,so I can do it in mac os? I will do it, by the way,maybe my update-zip.file is incorrecct.It's my process:

    1.get the output file.hex in example hrs.and named "app_new.hex"

    2.use command:

    nrfutil pkg generate --application app_new.hex --application-version 1 --application-version-string "1.0.0" --hw-version 52 --sd-req 0xB6 --sd-id 0xB6 --softdevice s140_nrf52_6.1.1_softdevice.hex --key-file priv.pem FW.zip

    and I download the zipfile and use it.

    Is there any problem?looking forward to your reply.

    best regards,

    zhong

  • Hi,

    Yes, you can use RTT logging on Mac as well, but it is a bit less user friendly. You can follow the same basic instructions as for Linux, for instance from this post.

    Your nrfutil command looks mostly OK. However, you should increase the application-version, as the bootloader will prevent you to upgrade to the same or lower version number (unless NRF_DFU_APP_DOWNGRADE_PREVENTION is set to 0 in the bootloaders sdk_config.h).

  • Hi,

    I try this and I get these things:

    JLinkRTTClient

    ###RTT Client: ************************************************************

    ###RTT Client: *               SEGGER Microcontroller GmbH                *

    ###RTT Client: *   Solutions for real time microcontroller applications   *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: *       (c) 2012 - 2016  SEGGER Microcontroller GmbH       *

    ###RTT Client: *                                                          *

    ###RTT Client: *     www.segger.com     Support: [email protected]       *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: * SEGGER J-Link RTT Client   Compiled Mar 22 2019 17:28:45 *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: -----------------------------------------------

    ###RTT Client: Connecting to J-Link RTT Server via localhost:19021  Connected.

    SEGGER J-Link V6.44c - Real time terminal output

    J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15 V1.0, SN=683732423

    Process: JLinkExe

    Where can I find the exact file?and I try to change the application-version at 2,The same situation occured ,and I simply use the DfuTarg,It failed too.What should I do next?

    best regards,

    zhong

  • Hi,

    It's the log file with the bootloader_debug only:

    ###RTT Client: ************************************************************

    ###RTT Client: *               SEGGER Microcontroller GmbH                *

    ###RTT Client: *   Solutions for real time microcontroller applications   *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: *       (c) 2012 - 2016  SEGGER Microcontroller GmbH       *

    ###RTT Client: *                                                          *

    ###RTT Client: *     www.segger.com     Support: [email protected]       *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: * SEGGER J-Link RTT Client   Compiled Mar 22 2019 17:28:45 *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: -----------------------------------------------

    ###RTT Client: Connecting to J-Link RTT Server via localhost:19021  Connected.

    SEGGER J-Link V6.40 - Real time terminal output

    J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15 V1.0, SN=683732423

    Process: emStudio

    and this is the log file with bootloader,settings,softdevice and app:

    ###RTT Client: ************************************************************

    ###RTT Client: *               SEGGER Microcontroller GmbH                *

    ###RTT Client: *   Solutions for real time microcontroller applications   *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: *       (c) 2012 - 2016  SEGGER Microcontroller GmbH       *

    ###RTT Client: *                                                          *

    ###RTT Client: *     www.segger.com     Support: [email protected]       *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: *                                                          *

    ###RTT Client: * SEGGER J-Link RTT Client   Compiled Mar 22 2019 17:28:45 *

    ###RTT Client: *                                                          *

    ###RTT Client: ************************************************************

    ###RTT Client: -----------------------------------------------

    ###RTT Client: Connecting to J-Link RTT Server via localhost:19021  Connected.

    SEGGER J-Link V6.44c - Real time terminal output

    J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15 V1.0, SN=683732423

    Process: JLinkExe

    best regards,

    zhong

  • Hi,

    There is no RTT output here, just printouts from JLinkExe. You also need to connect to JLinkExe via telnet, as described in the end in the post I linked to.

Related