Uploading using J-link on custom board.

Hello, 

I am trying to upload code to a custom board using a SEGGER J-link device. I have tried doing this using VSCode and the nRF connect extension, I have tried using J-Flash Lite and I have tried using nRF connect for desktop. Is there a clear tutorial about how to upload to a custom board (I have found one where you make the devicetree for a custom board but it doesn't tell you how to upload it.) Or can someone point me in the right directions?

Kind regards,
Niels Redegeld

  • Hi Swathy, 

    I have looked into both and it still doesn´t seem to work, when i try to erase the chip on the nrf connect app for pc i get the following error:

    12:53:32.166
    Recovering Application core
    12:53:32.168
    Failed to recovering application core core. Error: [object Object], message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR
    12:53:32.351
    Error: Task failed. One or more batch tasks failed: - [jlink] JLINKARM_DLL_ERROR, code: Nrfjlink. Message: Batch task recover failed, [jlink] JLINKARM_DLL_ERROR.
    Do you happen to know what goes wrong if this error shows?

    Kind Regards,
    Niels Redegeld
  • I have found one of my issues, the battery I used apperiantly had low voltage. i fixed that and now i can read and erase, but still can't write to the chip. I have tried nrfjprog --recover and it works fine, but it doesn't fix the issue. 

    These are the errors i get now

    [error] [ Client] - Encountered error -102: Command program_file executed for 279 milliseconds with result -102
    [error] [ nRF52] - The write access failed, but no cause could be determined.
    [error] [ nRF52] - It may be due to an unaligned access, accessing a nonexistent memory, or a communication issue.
    [error] [ nRF52] - Failed while performing 'Write' operation on target address 0x00000000.
    -102: An unknown error.
    [error] [ nRF52] - Failed while reading device information.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 33: nrfjprog --program 'c:\hello_world\build\zephyr\zephyr.hex' --sectoranduicrerase --verify -f NRF52 --snr 801027849

  • I made it work, I do not know what fixed the issue but all i know is that my first mistake was a low battery. 

Related