Skip to content

riotboot/nrf52840dk: flashing slot1 with JLINK fails #14576

@fjmolinas

Description

@fjmolinas

Description

Flashing slot1 results in an unspecified error when using JLINK on nrf52840dk. This works with Openocd.

Steps to reproduce the issue

BUILD_IN_DOCKER=1 BOARD=nrf52840dk make -C tests/riotboot/ riotboot/flash-slot1

Expected results

Flashing succeeds.

Actual results

Unspecified error.

compiling /home/francisco/workspace/RIOT2/dist/tools/riotboot_gen_hdr/bin/genhdr...
creating /home/francisco/workspace/RIOT2/tests/riotboot/bin/nrf52840dk/tests_riotboot-slot1.1595408589.riot.bin...
/home/francisco/workspace/RIOT2/dist/tools/jlink/jlink.sh flash /home/francisco/workspace/RIOT2/tests/riotboot/bin/nrf52840dk/tests_riotboot-slot1.1595408589.riot.bin
### Flashing Target ###
### Flashing at base address 0x0 with offset 528384 ###
SEGGER J-Link Commander V6.71a (Compiled Apr  3 2020 11:59:31)
DLL version V6.71a, compiled Apr  3 2020 11:59:21

J-Link Commander will now exit on Error

J-Link Command File read successfully.
Processing script file...

J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
Hardware version: V1.00
S/N: 683890121
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.300V
Target connection not established yet but required for command.
Device "NRF52" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end
Found SW-DP with ID 0x2BA01477
Unknown DP version. Assuming DPv0
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
Halting CPU for downloading file.
Downloading file [/home/francisco/workspace/RIOT2/tests/riotboot/bin/nrf52840dk/tests_riotboot-slot1.1595408589.riot.bin]...
Unspecified error -1

Script processing completed.

Versions

Operating System Environment
----------------------------
         Operating System: "Ubuntu" "18.04.4 LTS (Bionic Beaver)"
                   Kernel: Linux 5.3.0-62-generic x86_64 x86_64
             System shell: /bin/dash (probably dash)
             make's shell: /bin/dash (probably dash)

Installed compiler toolchains
-----------------------------
               native gcc: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
        arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
                  avr-gcc: avr-gcc (GCC) 5.4.0
         mips-mti-elf-gcc: missing
               msp430-gcc: msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
     riscv-none-embed-gcc: riscv-none-embed-gcc (GNU MCU Eclipse RISC-V Embedded GCC, 64-bit) 8.2.0
     xtensa-esp32-elf-gcc: missing
   xtensa-esp8266-elf-gcc: xtensa-esp8266-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 5.2.0
                    clang: missing

Installed compiler libs
-----------------------
     arm-none-eabi-newlib: "3.0.0"
      mips-mti-elf-newlib: missing
  riscv-none-embed-newlib: "3.0.0"
  xtensa-esp32-elf-newlib: missing
xtensa-esp8266-elf-newlib: "2.2.0"
                 avr-libc: "2.0.0" ("20150208")

Installed development tools
---------------------------
                   ccache: ccache version 3.4.1
                    cmake: cmake version 3.14.0-rc3
                 cppcheck: Cppcheck 1.82
                  doxygen: 1.8.16
                      git: git version 2.27.0
                     make: GNU Make 4.1
                  openocd: Open On-Chip Debugger 0.10.0+dev-01100-g51dd4ce6-dirty (2020-03-03-15:33)
                   python: Python 3.6.9
                  python2: Python 2.7.17
                  python3: Python 3.6.9
                   flake8: 3.7.7 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.6.9 on Linux
               coccinelle: spatch version 1.0.4 with Python support and with PCRE support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: boardsArea: Board portsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions