Flashing on PCB gives Unknown Error in J-Link DLL

Hey Team,

I'm trying to flash the audio application on our custom PCB, this PCB follows the interfaces of the nrf5340 audio dk. Previously on lower SDK versions (2.7-2.9), I was able to flash my programs without any errors. However now with the newer toolchain version (3.0.1), Im getting this error whenever i run the west flash command

Command:

`west flash -d /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build --domain nrf5340_audio --dev-id 801055229 --recover`

Logs:

Flashing nrf5340_audio to 801055229
west flash -d /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build --domain nrf5340_audio --dev-id 801055229 --recover

-- west flash: rebuilding
[0/10] Performing build step for 'ipc_radio'
ninja: no work to do.
[1/10] Performing build step for 'nrf5340_audio'
ninja: no work to do.
[4/10] cd /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build/_sysbuild && /opt/nordic/ncs/toolchains/ef4fc6722e/Cellar/cmake/3.21.0/bin/cmake -E true
[6/9] No install step for 'nrf5340_audio'
[7/9] Completed 'nrf5340_audio'
[8/9] cd /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build/_sysbuild && /opt/nordic/ncs/toolchains/ef4fc6722e/Cellar/cmake/3.21.0/bin/cmake -E true
-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Recovering and erasing flash memory for both the network and application cores.
-- runners.nrfutil: Flashing file: /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build/merged.hex
-- runners.nrfutil: Recover
-- runners.nrfutil: Recover
-- runners.nrfutil: Erasing address ranges touched by firmware
Error: One or more batch tasks failed:
 * 801055229: Device error: Emulator error: Unknown Error in J-Link DLL (error code =-1) (Generic)

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path /opt/nordic/ncs/v3.0.1/nrf/applications/nrf5340_audio/build/generated_nrfutil_batch.json --serial-number 801055229

Sometimes I also get this error randomly

Error: One or more batch tasks failed:
 * 801055229: Device error: Failed to read from memory address 0x500038e4: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)

What should be the cause of this error and how do I fix it? Please let me know if you require any further information.

PS: Relevant information about the PCB like schematics and stuff are already shared in the private threads with this same account. 

Regards,

Soham

Parents
  • Hello,

    I believe this might be a compatibility issue with the version of nRF Util or J-Link you're using. Please refer to the migration guide to check the compatible versions required for SDK version 3.0.0 and above. Verify if your current versions match the recommended ones, if not, try upgrading or downgrading accordingly.

    Let me know if that resolves the issue or if you're still encountering problems.

    Kind regards,
    Abhijith

  • Hey Abhijith,

    The bluetooth error was resolved after I updated nrfutl, but the PCB flashing error still exists.

    This is the error I'm getting on flashing,

    ❯ nrfutil device program --firmware /Users/soham/ksham/pcb-tests/led-test/build/merged.hex
    [00:00:01] ------   0% [1/2 801055229] Failed, Device error: Failed to read from memory address 0x500038e4: Failed to write DebugPor
    Error: One or more program tasks failed:
     * 801055229: Device error: Failed to read from memory address 0x500038e4: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)

    The same program can be flashed successfully with the previous toolchain versions which use nrfjprog (working with v2.8.0). So I believe there's some issue with nrfutil. Can you please check with the technical team once and let me know?

    Best,

    Soham

Reply
  • Hey Abhijith,

    The bluetooth error was resolved after I updated nrfutl, but the PCB flashing error still exists.

    This is the error I'm getting on flashing,

    ❯ nrfutil device program --firmware /Users/soham/ksham/pcb-tests/led-test/build/merged.hex
    [00:00:01] ------   0% [1/2 801055229] Failed, Device error: Failed to read from memory address 0x500038e4: Failed to write DebugPor
    Error: One or more program tasks failed:
     * 801055229: Device error: Failed to read from memory address 0x500038e4: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)

    The same program can be flashed successfully with the previous toolchain versions which use nrfjprog (working with v2.8.0). So I believe there's some issue with nrfutil. Can you please check with the technical team once and let me know?

    Best,

    Soham

Children
No Data
Related