Facing an issue while flashing the code using segger debugger

Hi,

I am facing an issue while flashing the code using an external debugger. I want to flash an LED blink code on the I/O shield "Raytac MDBT53V-P1M." For this, I am using Segger J-Link EDU MINI to flash a code on the I/O shield. We have connected the LED on the P0.31 pin of the I/O shield.

Following is the connection Pinout:

Pin No. J-Flash EDU Mini MDBT53V-P1M
1 Vref ---------> VDD
2 SWIO ---------> SWDIO
3 GND ---------> GND
4 SWCLK ---------> SWCLK
5 GND ---------> GND
6 SWO -
7 NC NC
8 NC NC
9 NC NC
10 nRESET ---------> nRESET

Apart from this, I am giving 3.3v to the I/O shield from the ESP32 3.3v pin. 

my question is while going with the approach only "Zypher.hex" is this the only file we have to flash?

and any other files are required to flash on the nRF5340 SoC. 

What process I should follow?

Thank you for your support.

  • Hi,

    https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/config_and_build/programming.html states "To program the output build files to your device, which in most of the cases will be zephyr.hex or merged.hex, use the steps for the development environment." and you can see the output build files here: https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/config_and_build/configuring_app/output_build_files.html#app-build-output-files 

    For a multi core application you can see in the matrix in the later page that merged.hex is what you want for a single file that contains all the images you need

    Kind regards,
    Andreas

  • Hi Andreas,

    I have flashed the code over the I/O shield using "Programmer Tool" in nRF Connect for Desktop. after flashing the code is still LED Connected to P0.31 was Not Switching ON. The voltage coming on that pin is 0.28v, I have flashed the Zephyr.hex file over the I/O shield. but for testing when I was trying to flash the merged.hex I am getting the error.

    Following is the error log I have attached for your reference:

    2024-10-23T12:57:29.715Z INFO Initialising nrfutil module: device
    2024-10-23T12:57:29.729Z DEBUG Application data folder: /Users/soham/Library/Application Support/nrfconnect/pc-nrfconnect-programmer
    2024-10-23T12:57:29.750Z DEBUG App pc-nrfconnect-programmer v4.4.0 (official)
    2024-10-23T12:57:29.750Z DEBUG App path: /Users/soham/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
    2024-10-23T12:57:29.750Z DEBUG nRFConnect 5.0.2, required by the app is (>=4.4.1)
    2024-10-23T12:57:29.750Z DEBUG nRFConnect path: /Applications/nRF Connect for Desktop.app/Contents/Resources/app.asar
    2024-10-23T12:57:29.750Z DEBUG HomeDir: /Users/soham
    2024-10-23T12:57:29.750Z DEBUG TmpDir: /var/folders/rj/v_lglmyx661gl3vkggr4ymqw0000gn/T/
    2024-10-23T12:57:31.962Z INFO Using nrfutil-device core version: 7.13.0
    2024-10-23T12:57:32.045Z INFO Using nrfutil-device version: 2.1.1
    2024-10-23T12:57:32.045Z INFO Using nrf-device-lib version: 0.17.5
    2024-10-23T12:57:32.045Z INFO Using nrfjprog DLL version: 10.24.0
    2024-10-23T12:57:32.045Z INFO Using JLink version: JLink_V7.98i
    2024-10-23T12:57:32.045Z WARN Installed JLink version does not match the expected version (JLink_V7.94e)
    2024-10-23T12:57:32.062Z WARN It looks like you have installed JLink using 64-bit Apple M1 Installer, but currently we only support their Universal Installer for your system.
    2024-10-23T12:57:32.062Z WARN Please install JLink: https://www.segger.com/downloads/jlink/JLink_MacOSX_V788j_universal.pkg
    2024-10-23T12:57:32.165Z INFO Getting serialport options from persistent store 000801055229.pc-nrfconnect-programmer
    2024-10-23T12:57:32.166Z INFO Getting serialport options from persistent store 5786004803.pc-nrfconnect-programmer
    2024-10-23T12:57:57.614Z INFO Using nrfutil device to communicate with target via JLink
    2024-10-23T12:57:57.614Z INFO JLink OB firmware version J-Link EDU Mini V1 compiled Jul  3 2024 16:57:57
    2024-10-23T12:57:57.614Z INFO Device family 
    2024-10-23T12:57:57.614Z INFO Device version NRF5340_xxAA_ENGD
    2024-10-23T12:57:57.614Z INFO Board version 
    2024-10-23T12:57:57.962Z INFO Reading readback protection status for Application core
    2024-10-23T12:57:57.963Z INFO Reading readback protection status for Application core 0%
    2024-10-23T12:57:57.968Z INFO Reading readback protection status for Application core 100%
    2024-10-23T12:57:57.968Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_ALL'
    2024-10-23T12:57:57.969Z INFO Reading readback protection status for Application core completed
    2024-10-23T12:57:57.980Z INFO Reading readback protection status for Network core
    2024-10-23T12:57:57.981Z INFO Reading readback protection status for Network core 0%
    2024-10-23T12:57:57.991Z INFO Reading readback protection status for Network core 100%
    2024-10-23T12:57:57.991Z INFO Network core protection status 'NRFDL_PROTECTION_STATUS_ALL'
    2024-10-23T12:57:57.991Z INFO Reading readback protection status for Network core completed
    2024-10-23T12:57:58.092Z INFO Skipping reading core Application information as it is protected.
    2024-10-23T12:57:58.092Z INFO Skipping reading core Network information as it is protected.
    2024-10-23T12:57:58.812Z INFO Reading readback protection status for Application core
    2024-10-23T12:57:58.813Z INFO Reading readback protection status for Application core 0%
    2024-10-23T12:57:58.819Z INFO Reading readback protection status for Application core 100%
    2024-10-23T12:57:58.819Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_ALL'
    2024-10-23T12:57:58.819Z INFO Reading readback protection status for Application core completed
    2024-10-23T12:57:58.830Z INFO Reading readback protection status for Network core
    2024-10-23T12:57:58.831Z INFO Reading readback protection status for Network core 0%
    2024-10-23T12:57:58.837Z INFO Reading readback protection status for Network core 100%
    2024-10-23T12:57:58.837Z INFO Network core protection status 'NRFDL_PROTECTION_STATUS_ALL'
    2024-10-23T12:57:58.837Z INFO Reading readback protection status for Network core completed
    2024-10-23T12:57:58.935Z INFO Device is loaded and ready for further operation
    2024-10-23T12:58:46.828Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/zephyr.hex
    2024-10-23T12:58:46.841Z INFO File was last modified at  22/10/2024, 23:03:48
    2024-10-23T12:58:46.851Z INFO Update files regions according to Application core
    2024-10-23T12:58:46.851Z INFO Parse memory regions for file
    2024-10-23T12:58:46.851Z INFO Update files regions according to Network core
    2024-10-23T12:58:46.851Z INFO Parse memory regions for file
    2024-10-23T12:58:56.708Z INFO Recovering Application core
    2024-10-23T12:58:56.709Z INFO Recovering Application core 0%
    2024-10-23T12:59:02.789Z INFO Recovering Application core 100%
    2024-10-23T12:59:02.793Z INFO Recovering Application core completed
    2024-10-23T12:59:02.831Z INFO Recovering Network core
    2024-10-23T12:59:02.833Z INFO Recovering Network core 0%
    2024-10-23T12:59:15.159Z INFO Recovering Network core 100%
    2024-10-23T12:59:15.159Z INFO Recovering Network core completed
    2024-10-23T12:59:15.196Z INFO Writing HEX to Application core
    2024-10-23T12:59:15.485Z INFO Writing HEX to Application core 33%
    2024-10-23T12:59:15.485Z INFO Writing HEX to Application core 33%
    2024-10-23T12:59:15.664Z INFO Writing HEX to Application core 100%
    2024-10-23T12:59:15.665Z INFO Writing HEX to Application core completed
    2024-10-23T12:59:15.665Z INFO Loading core information for Application core
    2024-10-23T12:59:15.665Z INFO Loading core information for Application core 0%
    2024-10-23T12:59:15.666Z INFO Update files regions according to Application core
    2024-10-23T12:59:15.666Z INFO Parse memory regions for file
    2024-10-23T12:59:15.666Z INFO Update files regions according to Network core
    2024-10-23T12:59:15.666Z INFO Parse memory regions for file
    2024-10-23T12:59:15.701Z INFO Loading core information for Application core 100%
    2024-10-23T12:59:15.701Z INFO Loading core information for Application core completed
    2024-10-23T12:59:15.702Z INFO Update files regions according to Application core
    2024-10-23T12:59:15.702Z INFO Parse memory regions for file
    2024-10-23T12:59:15.702Z INFO Update files regions according to Network core
    2024-10-23T12:59:15.702Z INFO Parse memory regions for file
    2024-10-23T12:59:15.747Z INFO Loading core information for Network core
    2024-10-23T12:59:15.748Z INFO Update files regions according to Application core
    2024-10-23T12:59:15.748Z INFO Parse memory regions for file
    2024-10-23T12:59:15.748Z INFO Update files regions according to Network core
    2024-10-23T12:59:15.748Z INFO Parse memory regions for file
    2024-10-23T12:59:15.749Z INFO Loading core information for Network core 0%
    2024-10-23T12:59:15.783Z INFO Loading core information for Network core 100%
    2024-10-23T12:59:15.784Z INFO Loading core information for Network core completed
    2024-10-23T12:59:15.784Z INFO Update files regions according to Application core
    2024-10-23T12:59:15.784Z INFO Parse memory regions for file
    2024-10-23T12:59:15.784Z INFO Update files regions according to Network core
    2024-10-23T12:59:15.784Z INFO Parse memory regions for file
    2024-10-23T12:59:16.776Z INFO Reading readback protection status for Application core
    2024-10-23T12:59:16.777Z INFO Reading readback protection status for Application core 0%
    2024-10-23T12:59:16.783Z INFO Reading readback protection status for Application core 100%
    2024-10-23T12:59:16.783Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    2024-10-23T12:59:16.783Z INFO Reading readback protection status for Application core completed
    2024-10-23T12:59:16.800Z INFO Reading readback protection status for Network core
    2024-10-23T12:59:16.800Z INFO Reading readback protection status for Network core 0%
    2024-10-23T12:59:16.810Z INFO Reading readback protection status for Network core 100%
    2024-10-23T12:59:16.810Z INFO Network core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    2024-10-23T12:59:16.810Z INFO Reading readback protection status for Network core completed
    2024-10-23T12:59:33.007Z INFO Reading memory for Application core
    2024-10-23T12:59:33.009Z INFO Reading memory for Application core 0%
    2024-10-23T12:59:40.673Z INFO Reading memory for Application core 100%
    2024-10-23T12:59:41.143Z INFO Reading memory for Application core completed
    2024-10-23T12:59:41.144Z INFO Parse memory regions for Application core
    2024-10-23T12:59:41.146Z INFO Reading memory for Network core
    2024-10-23T12:59:41.147Z INFO Reading memory for Network core 0%
    2024-10-23T12:59:41.148Z INFO Parse memory regions for Application core
    2024-10-23T12:59:42.910Z INFO Reading memory for Network core 100%
    2024-10-23T12:59:43.033Z INFO Reading memory for Network core completed
    2024-10-23T12:59:43.033Z INFO Parse memory regions for Application core
    2024-10-23T12:59:43.033Z INFO Parse memory regions for Network core
    2024-10-23T13:01:11.413Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/merged.hex
    2024-10-23T13:01:11.413Z INFO File was last modified at  22/10/2024, 23:03:49
    2024-10-23T13:01:11.429Z INFO Update files regions according to Application core
    2024-10-23T13:01:11.429Z INFO Parse memory regions for file
    2024-10-23T13:01:11.429Z INFO Update files regions according to Network core
    2024-10-23T13:01:11.429Z INFO Parse memory regions for file
    2024-10-23T13:02:18.863Z INFO Does not need to be reloaded:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/zephyr.hex
    2024-10-23T13:02:18.863Z INFO Does not need to be reloaded:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/merged.hex
    2024-10-23T13:02:33.241Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/merged.hex
    2024-10-23T13:02:33.241Z INFO File was last modified at  22/10/2024, 23:03:49
    2024-10-23T13:02:33.250Z INFO Update files regions according to Application core
    2024-10-23T13:02:33.250Z INFO Parse memory regions for file
    2024-10-23T13:02:33.251Z INFO Update files regions according to Network core
    2024-10-23T13:02:33.251Z INFO Parse memory regions for file
    2024-10-23T13:02:53.084Z INFO Recovering Application core
    2024-10-23T13:02:53.084Z INFO Recovering Application core 0%
    2024-10-23T13:02:54.295Z INFO Recovering Application core 100%
    2024-10-23T13:02:54.296Z INFO Recovering Application core completed
    2024-10-23T13:02:54.343Z INFO Recovering Network core
    2024-10-23T13:02:54.344Z INFO Recovering Network core 0%
    2024-10-23T13:03:06.632Z INFO Recovering Network core 100%
    2024-10-23T13:03:06.632Z INFO Recovering Network core completed
    2024-10-23T13:03:06.668Z INFO Writing HEX to Application core
    2024-10-23T13:03:07.063Z INFO Writing HEX to Application core 33%
    2024-10-23T13:03:07.063Z INFO Writing HEX to Application core 33%
    2024-10-23T13:03:07.488Z INFO Writing HEX to Application core 100%
    2024-10-23T13:03:07.489Z INFO Writing HEX to Application core completed
    2024-10-23T13:03:07.490Z INFO Loading core information for Application core
    2024-10-23T13:03:07.490Z INFO Loading core information for Application core 0%
    2024-10-23T13:03:07.490Z INFO Update files regions according to Application core
    2024-10-23T13:03:07.491Z INFO Parse memory regions for file
    2024-10-23T13:03:07.491Z INFO Update files regions according to Network core
    2024-10-23T13:03:07.491Z INFO Parse memory regions for file
    2024-10-23T13:03:07.527Z INFO Loading core information for Application core 100%
    2024-10-23T13:03:07.527Z INFO Loading core information for Application core completed
    2024-10-23T13:03:07.528Z INFO Update files regions according to Application core
    2024-10-23T13:03:07.528Z INFO Parse memory regions for file
    2024-10-23T13:03:07.528Z INFO Update files regions according to Network core
    2024-10-23T13:03:07.528Z INFO Parse memory regions for file
    2024-10-23T13:03:07.573Z INFO Loading core information for Network core
    2024-10-23T13:03:07.574Z INFO Update files regions according to Application core
    2024-10-23T13:03:07.574Z INFO Parse memory regions for file
    2024-10-23T13:03:07.574Z INFO Update files regions according to Network core
    2024-10-23T13:03:07.574Z INFO Parse memory regions for file
    2024-10-23T13:03:07.575Z INFO Loading core information for Network core 0%
    2024-10-23T13:03:07.606Z INFO Loading core information for Network core 100%
    2024-10-23T13:03:07.606Z INFO Loading core information for Network core completed
    2024-10-23T13:03:07.607Z INFO Update files regions according to Application core
    2024-10-23T13:03:07.607Z INFO Parse memory regions for file
    2024-10-23T13:03:07.607Z INFO Update files regions according to Network core
    2024-10-23T13:03:07.607Z INFO Parse memory regions for file
    2024-10-23T13:03:09.312Z INFO Reading readback protection status for Application core
    2024-10-23T13:03:09.312Z INFO Reading readback protection status for Application core 0%
    2024-10-23T13:03:09.317Z INFO Reading readback protection status for Application core 100%
    2024-10-23T13:03:09.317Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    2024-10-23T13:03:09.318Z INFO Reading readback protection status for Application core completed
    2024-10-23T13:03:17.548Z INFO Reading memory for Application core
    2024-10-23T13:03:27.047Z INFO Reading memory for Application core
    2024-10-23T13:03:34.243Z INFO Reading memory for Application core
    2024-10-23T13:03:40.421Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/firmware-dev/build/zephyr/zephyr.hex
    2024-10-23T13:03:40.421Z INFO File was last modified at  04/10/2024, 21:54:15
    2024-10-23T13:03:40.509Z INFO Update files regions according to Application core
    2024-10-23T13:03:40.509Z INFO Parse memory regions for file
    2024-10-23T13:03:40.509Z INFO Update files regions according to Network core
    2024-10-23T13:03:40.509Z INFO Parse memory regions for file
    2024-10-23T13:03:45.617Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/zephyr.hex
    2024-10-23T13:03:45.617Z INFO File was last modified at  22/10/2024, 23:03:48
    2024-10-23T13:03:45.621Z INFO Update files regions according to Application core
    2024-10-23T13:03:45.621Z INFO Parse memory regions for file
    2024-10-23T13:03:45.621Z INFO Update files regions according to Network core
    2024-10-23T13:03:45.621Z INFO Parse memory regions for file
    2024-10-23T13:04:09.126Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/zephyr.hex
    2024-10-23T13:04:09.127Z INFO File was last modified at  22/10/2024, 23:03:48
    2024-10-23T13:04:09.133Z INFO Update files regions according to Application core
    2024-10-23T13:04:09.133Z INFO Parse memory regions for file
    2024-10-23T13:04:09.133Z INFO Update files regions according to Network core
    2024-10-23T13:04:09.133Z INFO Parse memory regions for file
    2024-10-23T13:04:12.283Z INFO Recovering Application core
    2024-10-23T13:04:12.283Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:04:28.095Z INFO Recovering Application core
    2024-10-23T13:04:28.096Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:04:34.635Z INFO Recovering Application core
    2024-10-23T13:04:34.635Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:04:46.285Z INFO Recovering Application core
    2024-10-23T13:04:46.286Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:06:33.085Z INFO Reading memory for Application core
    2024-10-23T13:06:41.123Z INFO Recovering Application core
    2024-10-23T13:06:41.124Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:07:06.425Z INFO Parsing HEX file:  /Users/soham/Ksham-Innovation/dfu/blinky/build-dk/zephyr/zephyr.hex
    2024-10-23T13:07:06.426Z INFO File was last modified at  22/10/2024, 23:03:48
    2024-10-23T13:07:06.433Z INFO Update files regions according to Application core
    2024-10-23T13:07:06.433Z INFO Parse memory regions for file
    2024-10-23T13:07:06.433Z INFO Update files regions according to Network core
    2024-10-23T13:07:06.433Z INFO Parse memory regions for file
    2024-10-23T13:07:09.516Z INFO Recovering Application core
    2024-10-23T13:07:09.517Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:07:27.026Z INFO Recovering Application core
    2024-10-23T13:07:27.027Z ERROR Failed "recovering application core". Error: code: 9, description: Nrfjlink, message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    2024-10-23T13:10:03.840Z INFO Reading memory for Application core
    2024-10-23T13:10:11.196Z INFO Reading memory for Application core
    2024-10-23T13:10:26.719Z INFO Update files regions according to Application core
    2024-10-23T13:10:26.719Z INFO Parse memory regions for file
    2024-10-23T13:12:03.555Z INFO Generating system report...
    2024-10-23T13:12:06.021Z INFO System report: /Users/soham/Library/Application Support/nrfconnect/pc-nrfconnect-programmer/nrfconnect-system-report-2024-10-23T13-12-03.555Z.txt

    Also Following is the screenshot and Blinky code zip file for your reference:

    3146.blinky.zip

    Please guide me through the flashing process. Thank you for your support.

    Regards,

    Akhilesh

  • Hi,

    From what I can see the EDU Mini should support cortex-M33, so in theory it should work.

    From your logs it looks like it might be a MAC OS issue, but it's just the recover function that seems to be going wrong.

    WARN Installed JLink version does not match the expected version (JLink_V7.94e)

    WARN It looks like you have installed JLink using 64-bit Apple M1 Installer, but currently we only support their Universal Installer for your system.

    WARN Please install JLink: https://www.segger.com/downloads/jlink/JLink_MacOSX_V788j_universal.pkg

    Could you

    1. Make sure that the Jlink version is up to date
    2. Then try with some simpler commandoes with nrfjprog or nrfutil, for instance nrfutil device --recover 

    Kind regards,
    Andreas

  • Hi Andreas 

    Thank you so much for your input I will update the version and try again.

    But my doubt is still unanswered as I was able to flash the code on the I/O Shield and I was able to read the memory of the I/O Shield. still LED connected to P0.31 didn't turn ON. I couldn't able to understand the issue. I have checked with the LED also working and tested the code on the nRF5340 Dk board and LED Connected to P0.31 GPIO was blinking there. 

    Regards, 
    Akhilesh

  • Hi Akhilesh,

    I'm not familiar with the module you're using. I would suggest that you do some debugging and fetch some logs. It might be that the firmware crashes before it does any code execution when putting it into the board.

    From the PS of the module the GPIO looks to be ok to use for anything you wish, i.e it's fine to connect it to the LED. 

    Kind regards,
    Andreas

Related