Cannot boot from Hyper Flash – Gapduino

|||Cannot boot from Hyper Flash – Gapduino
Cannot boot from Hyper Flash – Gapduino2019-12-10T07:08:30+00:00
Viewing 2 reply threads
  • Author
    Posts
    • Rosh MendisRosh Mendis
      Participant
      Post count: 4

      Hi,

      I am using the GAPUINO board Model 1.1 (post-Oct 2019 purchase). running the latest SDK 3.0 (checked out 1st Dec 2019)

      I am testing the following example in the gap_sdk:
      gap_sdk/examples/native/pulpos/helloworld

      in the Makefile i have added the following (to boot from flash and use UART printf):

      PULP_CFLAGS = -O3 -g -DPRINTF_UART
      PLPBRIDGE_FLAGS += -f -hyper

      However when I compile and run : make clean all run

      I get the following error:
      FATAL ERROR: load_jtag_hyper() missing 1 required positional argument: ‘binaries’

      Also, I reset the board, re-plugged in USB etc. and I still don’t get the printf output from UART (using cutecom 115200)

      Please can someone help ? we have two boards we would like to start some low-power inference research/work.

      Full output:
      ~/Documents/gap_sdk/examples/native/pulpos/helloworld$ make clean all run
      mkdir -p /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV
      riscv32-unknown-elf-gcc -O3 -g -DPRINTF_UART -fno-jump-tables -fno-tree-loop-distribute-patterns -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wundef -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -D__riscv__ -D__pulp__ -DCONFIG_GAP -D__PULP_OS__ -MMD -MP -c test.c -I/home/osboxes/Documents/gap_sdk/install/GAP8_V2/include -I/home/osboxes/Documents/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/Documents/gap_sdk/install/workstation/include -include /home/osboxes/Documents/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -MD -MF /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test.d -o /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test.o
      riscv32-unknown-elf-gcc -MMD -MP -Wl,–gc-sections -O3 -g -DPRINTF_UART -I/home/osboxes/Documents/gap_sdk/install/GAP8_V2/include -I/home/osboxes/Documents/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/Documents/gap_sdk/install/workstation/include -include /home/osboxes/Documents/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -o /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test.o -L/home/osboxes/Documents/gap_sdk/install/GAP8_V2/lib/gap/gapuino -lpibsp -L/home/osboxes/Documents/gap_sdk/install/GAP8_V2/lib/gap -lrt -lrtio -lrt -lgcc -T/home/osboxes/Documents/gap_sdk/install/workstation/ld/link.gap8_rev1.ld -T/home/osboxes/Documents/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/osboxes/Documents/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h
      riscv32-unknown-elf-objdump -D /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test > /home/osboxes/Documents/gap_sdk/examples/native/pulpos/helloworld/BUILD/GAP8_V2/GCC_RISCV/test.s
      /home/osboxes/Documents/gap_sdk/install/workstation/runner/run_gapuino.sh -f -hyper

      ,ad8888ba, db 88888888ba ad88888ba
      d8″‘ `”8b d88b 88 “8b d8” “8b
      d8′ d8’`8b 88 ,8P Y8a a8P
      88 d8′ `8b 88aaaaaa8P’ “Y8aaa8P”
      88 88888 d8YaaaaY8b 88″”””””‘ ,d8″””8b,
      Y8, 88 d8″”””””””8b 88 d8″ “8b
      Y8a. .a88 d8’ `8b 88 Y8a a8P
      "Y88888P" d8'8b 88 “Y88888P”

      ———————————GAPUINO————————————

      /home/osboxes/Documents/gap_sdk/install/workstation/runner/run_gapuino.sh: 29: [: gapuino: unexpected operator
      Reading ELF file
      Segment : 1b000004 3f0
      Segment : 1b0003f4 83c
      Segment : 1c000000 3a44
      Segment : 1c003b78 18
      Generating boot binary
      Nb areas: 4
      Area 0: offset: 0x400, base: 0x1b000004, size: 0x3f0, nbBlocks: 1
      Area 1: offset: 0x800, base: 0x1b0003f4, size: 0x83c, nbBlocks: 3
      Area 2: offset: 0x1400, base: 0x1c000000, size: 0x3a44, nbBlocks: 15
      Area 3: offset: 0x5000, base: 0x1c003b78, size: 0x18, nbBlocks: 1
      Generating files (header offset: 0x5400)
      Bridge init – log level 2
      Program exited
      Program exited
      Loading binary through jtag
      Notifying to boot code new boot mode (mode: 1)
      ftdi2232 libftdi version 1.4 (major: 1, minor: 4, micro: 0, snapshot ver: unknown)
      Found ftdi device i:0x403:0x6010:0
      Connecting to ftdi device i:0x403:0x6010:0
      Cable state change connected
      Waiting for notification from boot code
      Received for notification from boot code
      Loading binary from /home/osboxes/Documents/gap_sdk/install/workstation/bin/flasher
      Loading section (base: 0x1b000004, size: 0x324)
      Loading section (base: 0x1b000328, size: 0x908)
      Loading section (base: 0x1c000000, size: 0x64e8)
      Init section to 0 (base: 0x1c0064e8, size: 0xe8)
      Loading section (base: 0x1c0065d0, size: 0x44)
      debug address 0x1c000090 contents 0x1c0062b8
      Starting execution
      [Flasher]: Flasher Version 1.0 start
      [Flasher]: pad config done
      [Flasher]: conf finished.
      Initializing bridge flasher
      Flash address buffer 0x1c028730
      Bridge flasher completed
      [Flasher]: Flasher Finish
      Detected end of application, exiting with status: 0
      Loop exited
      commands completed
      Bridge init – log level 2
      Program exited
      FATAL ERROR: load_jtag_hyper() missing 1 required positional argument: ‘binaries’ <<<—- ERROR
      Loop exited
      commands completed

    • Rosh MendisRosh Mendis
      Participant
      Post count: 4

      I can fix the above error using the patch mentioned here : https://github.com/GreenWaves-Technologies/gap_sdk/issues/86

      However, after flashing, when I unplug USB and plug it back in , the board still does NOT boot from FLASH. I have tried pressing RESET, still no change.

      below is am example log:

      ———————————GAPUINO————————————

      Reading ELF file
      Segment : 1b000004 3f0
      Segment : 1b0003f4 83c
      Segment : 1c000000 3b48
      Segment : 1c003c80 18
      Generating boot binary
      Nb areas: 4
      Area 0: offset: 0x400, base: 0x1b000004, size: 0x3f0, nbBlocks: 1
      Area 1: offset: 0x800, base: 0x1b0003f4, size: 0x83c, nbBlocks: 3
      Area 2: offset: 0x1400, base: 0x1c000000, size: 0x3b48, nbBlocks: 15
      Area 3: offset: 0x5000, base: 0x1c003c80, size: 0x18, nbBlocks: 1
      Generating files (header offset: 0x5400)
      Bridge init – log level 2
      Program exited
      Program exited
      Loading binary through jtag
      Notifying to boot code new boot mode (mode: 1)
      ftdi2232 libftdi version 1.4 (major: 1, minor: 4, micro: 0, snapshot ver: unknown)
      Found ftdi device i:0x403:0x6010:0
      Connecting to ftdi device i:0x403:0x6010:0
      Cable state change connected
      Waiting for notification from boot code
      Received for notification from boot code
      Loading binary from /home/osboxes/Documents/gap_sdk/install/workstation/bin/flasher
      Loading section (base: 0x1b000004, size: 0x324)
      Loading section (base: 0x1b000328, size: 0x908)
      Loading section (base: 0x1c000000, size: 0x650c)
      Init section to 0 (base: 0x1c00650c, size: 0xec)
      Loading section (base: 0x1c0065f8, size: 0x44)
      debug address 0x1c000090 contents 0x1c0062d8
      Starting execution
      [Flasher]: Flasher Version 1.0 start
      [Flasher]: pad config done
      [Flasher]: conf finished.
      Initializing bridge flasher
      Flash address buffer 0x1c028730
      Bridge flasher completed
      [Flasher]: Flasher Finish
      Detected end of application, exiting with status: 0
      Loop exited
      commands completed
      Bridge init – log level 2
      Program exited
      Loading binary through jtag_hyper
      Notifying to boot code that we are doing a JTAG boot from hyperflash
      ftdi2232 libftdi version 1.4 (major: 1, minor: 4, micro: 0, snapshot ver: unknown)
      Found ftdi device i:0x403:0x6010:0
      Connecting to ftdi device i:0x403:0x6010:0
      Cable state change connected
      Loop exited
      commands completed
      ————————————————————-

      I have tried running the following examples:
      gap_sdk\examples\pmsis\test_periph\blink_led
      gap_sdk\examples\pmsis\test_periph\uart_helloworld

      Both examples above work as expected when booting from JTAG.

      I am using Gapuino Model V1.1, running the latest SDK 3.1 (from Ubuntu 16 VM). I have sourced configs/gapuino_v2.sh.

      Please can someone provide some help or tips on debugging this problem ?

      Thank you

    • Rosh MendisRosh Mendis
      Participant
      Post count: 4

      I have tested other examples like the Mbed digital out, and also tested on another gapuino board. same issue exists. So not an issue with this board instance.
      Below is more debug. I can’t see any errors or crashing. Just simply the board will not boot from hyperflash after the process.

      Please can someone from Greenwaves confirm that the Gapuino model 1.1 cannot boot from Flash after power cycle ?

      Pressing reset while plugged into USB does not work either.

      The examples i’ve tested all Boot from JTAG okay (blink led, uart etc.)
      Am I missing something trivial ? do I require an additional bootloader code to run from Flash ?

      Thank you

      + echo ———————————GAPUINO————————————
      ———————————GAPUINO————————————
      + echo

      + pwd
      + here=/home/osboxes/Documents/gap8_sandpit/blink_led
      + cd /home/osboxes/Documents/gap8_sandpit/blink_led/BUILD/GAP8_V2/GCC_RISCV
      + FLAG_FLASH=0
      + FLAG_SCRIPT=0
      + FLAG_BOOT=0
      + FLAG_NORUN=0
      + FLAG_NOFLASH=0
      + verbose=4
      + fileio=0
      + [ gapuino = gapoc_a ]
      + cable=ftdi@digilent
      + boot_mode=jtag
      + gdb=
      + ioloop=ioloop
      + reqloop=reqloop
      + binary=–binary=test
      + buildFlashImage=
      + [ 2 -eq 0 ]
      + [ 2 -gt 0 ]
      + FLAG_FLASH=1
      + buildFlashImage=flashImageBuilder –verbose –flash-boot-binary=test –raw=flashImg.raw
      + shift
      + [ 1 -gt 0 ]
      + ioloop=
      + reqloop=
      + binary=
      + boot_mode=jtag_hyper
      + shift
      + [ 0 -gt 0 ]
      + [ -n ]
      + [ 1 -eq 1 ]
      + eval flashImageBuilder –verbose –flash-boot-binary=test –raw=flashImg.raw
      + flashImageBuilder –verbose –flash-boot-binary=test –raw=flashImg.raw
      Reading ELF file
      Segment : 1b000004 3f0
      Segment : 1b0003f4 83c
      Segment : 1c000000 3aac
      Segment : 1c003be8 18
      Generating boot binary
      Nb areas: 4
      Area 0: offset: 0x400, base: 0x1b000004, size: 0x3f0, nbBlocks: 1
      Area 1: offset: 0x800, base: 0x1b0003f4, size: 0x83c, nbBlocks: 3
      Area 2: offset: 0x1400, base: 0x1c000000, size: 0x3aac, nbBlocks: 15
      Area 3: offset: 0x5000, base: 0x1c003be8, size: 0x18, nbBlocks: 1
      Generating files (header offset: 0x5400)
      + plpbridge –verbose=4 –cable=ftdi@digilent –boot-mode=jtag –flash-image=flashImg.raw –chip=gap_rev1 flash wait
      Bridge init – log level 4
      Program exited
      Waiting termination
      Program exited
      Loading ELF binaries (path: /home/osboxes/Documents/gap_sdk/install/workstation/bin/flasher)
      Loading binary through jtag
      Notifying to boot code new boot mode (mode: 1)
      Using debug IR: 0x4
      Using retry count: 0
      Checking errors: 0
      Using access timeout: 1000000 us
      ftdi2232 libftdi version 1.4 (major: 1, minor: 4, micro: 0, snapshot ver: unknown)
      iterating 1 devices
      try opening i:0x403:0x6010:0
      Found ftdi device i:0x403:0x6010:0
      iterating 1 devices
      try opening i:0x1D6B:0x2:0
      Connecting to ftdi device i:0x403:0x6010:0
      Connected to libftdi driver.
      Cable state change connected
      JTAG chain len is 1
      adv_dbg_itf: jtag_ir_chainlen = 4
      JTAG IR len is 4, DR len is 32
      Device 0 ID: 149511C3
      ft2232: chip reset (active: 1)
      ft2232: chip reset (active: 0)
      Waiting for notification from boot code
      Received for notification from boot code
      adv_dbg_itf: select ir 4
      Loading binary from /home/osboxes/Documents/gap_sdk/install/workstation/bin/flasher
      Loading section (base: 0x1b000004, size: 0x324)
      Loading section (base: 0x1b000328, size: 0x908)
      Loading section (base: 0x1c000000, size: 0x650c)
      Init section to 0 (base: 0x1c00650c, size: 0xec)
      Loading section (base: 0x1c0065f8, size: 0x44)
      Lauching IO loop
      debug address 0x1c000090 contents 0x1c0062d8
      ReqLoop started
      Starting execution
      Starting execution
      Flashing the flash image
      adv_dbg_itf: select ir 4
      [Flasher]: Flasher Version 1.0 start
      [Flasher]: pad config done
      [Flasher]: conf finished.
      Initializing bridge flasher
      Flash address buffer 0x1c028730
      Bridge flasher completed
      adv_dbg_itf: select ir 4
      [Flasher]: Flasher Finish
      adv_dbg_itf: select ir 4
      Detected end of application, exiting with status: 0
      Loop exited
      commands completed
      + [ 0 -eq 0 ]
      + pid_bridge=3183
      + [ -z ]
      + [ 0 -gt 0 ]
      + [ 0 -eq 0 ]
      + wait 3183
      + plpbridge –verbose=4 –cable=ftdi@digilent –boot-mode=jtag_hyper –chip=gap_rev1 load start wait
      Bridge init – log level 4
      Waiting termination
      Program exited
      Loading ELF binaries (path: )
      Loading binary through jtag_hyper
      Notifying to boot code that we are doing a JTAG boot from hyperflash
      Using debug IR: 0x4
      Using retry count: 0
      Checking errors: 0
      Using access timeout: 1000000 us
      ftdi2232 libftdi version 1.4 (major: 1, minor: 4, micro: 0, snapshot ver: unknown)
      iterating 1 devices
      try opening i:0x403:0x6010:0
      Found ftdi device i:0x403:0x6010:0
      iterating 1 devices
      try opening i:0x1D6B:0x2:0
      Connecting to ftdi device i:0x403:0x6010:0
      Connected to libftdi driver.
      Cable state change connected
      JTAG chain len is 1
      adv_dbg_itf: jtag_ir_chainlen = 4
      JTAG IR len is 4, DR len is 32
      Device 0 ID: 149511C3
      ft2232: chip reset (active: 1)
      ft2232: chip reset (active: 0)
      Starting execution
      Loop exited
      commands completed

Viewing 2 reply threads
  • You must be logged in to reply to this topic.