Connecting Redboard and ThingPlus, and flashing

Hi,

I am following this tutorial: https://learn.sparkfun.com/tutorials/re … ment-guide

First problem:

After connecting the individual board one at a time, I see two connections(like COM 9 and COM 10). So I do not know which port to use for serial connections. I have no idea why that happens.

Second problem:

After building the project, when I run the project through run configuration on Freedom IDE, I get the following error:

    SEGGER J-Link GDB Server V6.52e Command Line Version
    
    JLinkARM.dll V6.52e (DLL compiled Oct 16 2019 12:16:54)
    
    Command line: -if jtag -device FE310 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
    -----GDB Server start settings-----
    GDBInit file:                  none
    GDB Server Listening port:     2331
    SWO raw output listening port: 2332
    Terminal I/O port:             2333
    Accept remote connection:      localhost only
    Generate logfile:              off
    Verify download:               on
    Init regs on start:            on
    Silent mode:                   off
    Single run mode:               on
    Target connection timeout:     0 ms
    ------J-Link related settings------
    J-Link Host interface:         USB
    J-Link script:                 none
    J-Link settings file:          none
    ------Target related settings------
    Target device:                 FE310
    Target interface:              JTAG
    Target interface speed:        1000kHz
    Target endian:                 little
    
    Connecting to J-Link...
    J-Link is connected.
    Firmware: J-Link OB-K22-SiFive compiled Aug 22 2019 14:12:56
    Hardware: V1.00
    S/N: 979005689
    Checking target voltage...
    Target voltage: 3.30 V
    Listening on TCP/IP port 2331
    Connecting to target...
    J-Link found 1 JTAG device, Total IRLen = 5
    JTAG ID: 0x20000913 (RISC-V)
    Connected to target
    Waiting for GDB connection...Connected to 127.0.0.1
    Reading all registers
    Received monitor command: speed 1000
    Target interface speed set to 1000 kHz
    Received monitor command: clrbp
    Received monitor command: reset
    Resetting target
    Received monitor command: halt
    Halting target CPU...
    ...Target halted (PC = 0x00001004)
    Received monitor command: regs
    X0 = 00000000, X1 = 20015444, X2 = 80000F10, X3 = 80001288
    X4 = 00000000, X5 = 200109D2, X6 = 0000000F, X7 = 80000B6C
    X8 = 00000400, X9 = 02000080, X10= 00000000, X11= 8000104C
    X12= 0000000E, X13= 0000000E, X14= 00000000, X15= 00000000
    X16= 0000001F, X17= 00000000, X18= 02000080, X19= 00000000
    X20= 00000000, X21= 00000000, X22= 00000000, X23= 00000000
    X24= 00000000, X25= 00000000, X26= 00000000, X27= 00000000
    X28= 00000000, X29= 00000000, X30= 00000000, X31= 00000000
    PC = 00001004
    Reading all registers
    Received monitor command: speed auto
    Select auto target interface speed (4000 kHz)
    Received monitor command: flash breakpoints 1
    Flash breakpoints enabled
    Received monitor command: semihosting enable
    Semi-hosting enabled (SVC Addr = 0x08)
    Received monitor command: semihosting IOClient 1
    Semihosting I/O set to TELNET Client
    Read 2 bytes @ address 0x00000000 (Data = 0x0000)
    Read 2 bytes @ address 0x00000002 (Data = 0x0000)
    Read 2 bytes @ address 0x00000004 (Data = 0x0000)
    Read 2 bytes @ address 0x00000006 (Data = 0x0000)
    Read 2 bytes @ address 0x00000008 (Data = 0x0000)
    Read 2 bytes @ address 0x0000000A (Data = 0x0000)
    Read 2 bytes @ address 0x0000000C (Data = 0x0000)
    Read 2 bytes @ address 0x0000000E (Data = 0x0000)
    Read 2 bytes @ address 0x00000010 (Data = 0x0000)
    Read 2 bytes @ address 0x00000012 (Data = 0x0000)
    Read 2 bytes @ address 0x00000014 (Data = 0x0000)
    Read 2 bytes @ address 0x00000016 (Data = 0x0000)
    Read 2 bytes @ address 0x00000018 (Data = 0x0000)
    Read 2 bytes @ address 0x0000001A (Data = 0x0000)
    Read 2 bytes @ address 0x0000001C (Data = 0x0000)
    Read 2 bytes @ address 0x0000001E (Data = 0x0000)
    Read 2 bytes @ address 0x00000020 (Data = 0x0000)
    Read 2 bytes @ address 0x00000022 (Data = 0x0000)
    Read 2 bytes @ address 0x00000024 (Data = 0x0000)
    Read 2 bytes @ address 0x00000026 (Data = 0x0000)
    Read 2 bytes @ address 0x00000028 (Data = 0x0000)
    Read 2 bytes @ address 0x0000002A (Data = 0x0000)
    Read 2 bytes @ address 0x0000002C (Data = 0x0000)
    Read 2 bytes @ address 0x0000002E (Data = 0x0000)
    Read 2 bytes @ address 0x00000030 (Data = 0x0000)
    Read 2 bytes @ address 0x00000032 (Data = 0x0000)
    Read 2 bytes @ address 0x00000034 (Data = 0x0000)
    Read 2 bytes @ address 0x00000036 (Data = 0x0000)
    Read 2 bytes @ address 0x00000038 (Data = 0x0000)
    Read 2 bytes @ address 0x0000003A (Data = 0x0000)
    Read 2 bytes @ address 0x0000003C (Data = 0x0000)
    Read 2 bytes @ address 0x0000003E (Data = 0x0000)
    Read 2 bytes @ address 0x00000040 (Data = 0x0000)
    Read 2 bytes @ address 0x00000042 (Data = 0x0000)
    Read 2 bytes @ address 0x00000044 (Data = 0x0000)
    Read 2 bytes @ address 0x00000046 (Data = 0x0000)
    Read 2 bytes @ address 0x00000048 (Data = 0x0000)
    Read 2 bytes @ address 0x0000004A (Data = 0x0000)
    Read 2 bytes @ address 0x0000004C (Data = 0x0000)
    Read 2 bytes @ address 0x0000004E (Data = 0x0000)
    Read 2 bytes @ address 0x00000050 (Data = 0x0000)
    Read 2 bytes @ address 0x00000052 (Data = 0x0000)
    Read 2 bytes @ address 0x00000054 (Data = 0x0000)
    Read 2 bytes @ address 0x00000056 (Data = 0x0000)
    Read 2 bytes @ address 0x00000058 (Data = 0x0000)
    Read 2 bytes @ address 0x0000005A (Data = 0x0000)
    Read 2 bytes @ address 0x0000005C (Data = 0x0000)
    Read 2 bytes @ address 0x0000005E (Data = 0x0000)
    Read 2 bytes @ address 0x00000060 (Data = 0x0000)
    Read 2 bytes @ address 0x00000062 (Data = 0x0000)
    Downloading 404 bytes @ address 0x20010000 - Verified OK
    Downloading 15600 bytes @ address 0x20010200 - Verified OK
    Downloading 5460 bytes @ address 0x20013EF0 - Verified OK
    Downloading 3148 bytes @ address 0x20015444 - Verified OK
    Downloading 12 bytes @ address 0x20016090 - Verified OK
    Downloading 2768 bytes @ address 0x200160A0 - Verified OK
    Comparing flash   [....................] Done.
    Writing register (pc = 0x20010000)
    Reading all registers
    Starting target CPU...
    ERROR: Communication timed out: Requested 4 bytes, received 0 bytes !
    ERROR: Can not read register 4224 (PC) while CPU is running
    WARNING: Target connection lost.
    Reading all registers
    WARNING: Failed to read memory @ address 0x00000000

After that, the board ejects and reconnects.

I also tried copy-and-paste to the board’s flash directly, but again board disconnects and reconnects.

Please let me know how to solve this issue.

Thank you.

Thanks to @robin_hodgson’s detailed instructions ( viewtopic.php?p=211369#p211369 ) I solved the issue. I followed them but with hello world first. When I connected the device and programmed it through Segger IDE, it first updated the driver for J-Link for each board, Redboard and ThingPlus. Both boards worked and the serial terminal displayed the output.

I repeated the same procedure with Blinky and it worked as well on both boards.

Finally, I repeated both examples for each board with Freedom IDE and this time they worked.

I do not know what was the exact problem, but I guess the driver update fixed them.

Thank you again!