Unable to run shell_module example on nrf52840dongle board using uart over USB

Dear all,

I used till now an application to route BLE data over serial port through the dongle USB nrf52840, SEGGER IDE and 1.9.2 nrf conneck. All works well.

Now I'm trying to move to visual studio code and 2.6 nrf connect, usinf a J-Link lite cortex as debugger on windows 10.

I'm able to compile, but I'm not able to successfully run my firmware.

I tried different samples but I had a lot of different problems:

- not able to see the RTT output;

- software stall or signal trap;

- unidentied errors and so on.

In order to understand what I wrong, I used a simplified version of the shell_module example.

I can successfully compile, but firmware hangs on usb_dc_ep_set_stall() function call.

I attached the whole project folder.

Please, could anyone help me or have a working example ?

Thanks.

5481.shell_module.zip 

Parents
  • Hi, 

    Duplicate this nrf52840dongle_nrf52840.overlay under the shell_module\boards folder, and build with overlay-usb.conf. This should make the shell_module example work on the nRF52840 Dongle. Since nRF52840 Dongle doesn't have an on-board debugger, it cannot provide RTT. To get RTT, please develop on nRF52840DK.

    Regards,
    Amanda H. 

  • Hi,

    I'm using this overlay file yet.

    Sorry, I was not clear about RTT. I have a segger j-link lite attached to the debug connector pads of the dongle.

    I realized that probably some problems are related to the lack of the bootloader on my dongle. In fact, with segger IDE, I used to program the dongle with the j-link lite and then directly start the debugger. This works differently with visual studio code.

    After restoring the original bootloader I found that the following procedure works, but there are many instabilities:

    - compile the code in visual studio code with debug settings

    - load the hex generated file using the flashing tool of the nrf connect for desktop

    - attach the debugger in visual studio code, with a breakpoint at the main entry point

    - start a RTT terminal

    - start code execution

    I found very frustrating that there is a very few documentation available on how to configure visual studio code with segger debugger integration and on how to personalize visual studio code with the nrf connect plug-in.

    For example, I'm unable to start automatically the RTT terminal after attaching the debugger

    Moreover, I would like to have more control on the flashing and on the debugging of the nrf devices. For example, how to reset the device without reflashing it.

    Regards,
    Luca 
Reply
  • Hi,

    I'm using this overlay file yet.

    Sorry, I was not clear about RTT. I have a segger j-link lite attached to the debug connector pads of the dongle.

    I realized that probably some problems are related to the lack of the bootloader on my dongle. In fact, with segger IDE, I used to program the dongle with the j-link lite and then directly start the debugger. This works differently with visual studio code.

    After restoring the original bootloader I found that the following procedure works, but there are many instabilities:

    - compile the code in visual studio code with debug settings

    - load the hex generated file using the flashing tool of the nrf connect for desktop

    - attach the debugger in visual studio code, with a breakpoint at the main entry point

    - start a RTT terminal

    - start code execution

    I found very frustrating that there is a very few documentation available on how to configure visual studio code with segger debugger integration and on how to personalize visual studio code with the nrf connect plug-in.

    For example, I'm unable to start automatically the RTT terminal after attaching the debugger

    Moreover, I would like to have more control on the flashing and on the debugging of the nrf devices. For example, how to reset the device without reflashing it.

    Regards,
    Luca 
Children
Related