Camera's sample programs cannot run

Camera's sample programs cannot run2019-11-21T10:46:56+00:00
Viewing 3 reply threads
  • Author
    Posts
    • Noël TaillardatNoël Taillardat
      Participant
      Post count: 3

      Hi,
      I’m a young developer on Gapuino, and I’m trying to use the camera for my applications.
      I’m using the ‘GAPuino GAP8 development board’ (V2) + the ‘Low Power QVGA Image Sensor’, from the ‘GAPUINO Combo Kit’.
      I’m also using the same virtual box than described in the sdk’s README.
      I have already managed to run helloworld programs, both from gap_sdk/example/pmsis/helloworld (from last release), and the helloworld from gap_sdk/example/native/pulpos/helloworld, but now, I can’t launch camera’s examples.

      1/
      Trying the camera’s example described in the User manual, now located at gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX, I get the following results (after a ‘make clean all run’):
      `
      osboxes@osboxes:~/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX$ make clean all run
      mkdir -p /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV
      riscv32-unknown-elf-gcc -O3 -g -DGVSOC -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/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -MD -MF /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test.d -o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test.o
      riscv32-unknown-elf-gcc -MMD -MP -Wl,–gc-sections -O3 -g -DGVSOC -I/home/osboxes/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test.o -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap/gapuino -lpibsp -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap -lrt -lrtio -lrt -lgcc -T/home/osboxes/gap_sdk/install/workstation/ld/link.gap8_rev1.ld -T/home/osboxes/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h
      riscv32-unknown-elf-objdump -D /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test > /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX/BUILD/GAP8_V2/GCC_RISCV/test.s
      /home/osboxes/gap_sdk/install/workstation/runner/run_gapuino.sh -s camera@test.py

      ,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/gap_sdk/install/workstation/runner/run_gapuino.sh: 29: [: gapuino: unexpected operator
      Bridge init – log level 2
      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 test
      Loading section (base: 0x1b000004, size: 0x3fc)
      Loading section (base: 0x1b000400, size: 0x840)
      Loading section (base: 0x1c000000, size: 0x18d54)
      Init section to 0 (base: 0x1c018d54, size: 0x1b4)
      Loading section (base: 0x1c018f08, size: 0x18)
      debug address 0x1c000090 contents 0x1c0056e0
      debug address 0x1c000090 contents 0x1c0056e0
      RSP server setup on port 9999
      Starting execution
      FATAL ERROR: list index out of range
      Loop exited
      commands completed

      `
      and I can’t see where the *”FATAL ERROR: list index out of range”* is coming from…
      Did I miss something concerning the camera configuration before running the example?

      Plus: running on gvsoc, it gives me:
      `
      […]
      Entering main controller
      ready to take a photo
      taking picture

      `
      and nothing past this point…

      2/
      Now I’ve also tried to run the “new” example in the new folder gap_sdk/examples/pmsis/test_periph/test_camera_lcd. Using ‘make clean all run’, the program runs, but does nothing then (while it should be printing successes or errors…):
      `
      osboxes@osboxes:~/gap_sdk/examples/pmsis/test_periph/test_camera_lcd$ make clean all run
      mkdir -p /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV
      riscv32-unknown-elf-gcc -O3 -g -DHIMAX -DCONFIG_GAPUINO -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_camera_lcd.c -I/home/osboxes/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -I. -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -MD -MF /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test_camera_lcd.d -o /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test_camera_lcd.o
      riscv32-unknown-elf-gcc -MMD -MP -Wl,–gc-sections -O3 -g -DHIMAX -DCONFIG_GAPUINO -I/home/osboxes/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -I. -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -o /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test_camera_lcd.o -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap/gapuino -lpibsp -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap -lrt -lrtio -lrt -lgcc -T/home/osboxes/gap_sdk/install/workstation/ld/link.gap8_rev1.ld -T/home/osboxes/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h
      riscv32-unknown-elf-objdump -D /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test > /home/osboxes/gap_sdk/examples/pmsis/test_periph/test_camera_lcd/BUILD/GAP8_V2/GCC_RISCV/test.s
      /home/osboxes/gap_sdk/install/workstation/runner/run_gapuino.sh

      ,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/gap_sdk/install/workstation/runner/run_gapuino.sh: 29: [: gapuino: unexpected operator
      Bridge init – log level 2
      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
      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      Cable state change disconnected
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      Waiting for notification from boot code
      Received for notification from boot code
      Loading binary from test
      Loading section (base: 0x1b000004, size: 0x440)
      Loading section (base: 0x1b000444, size: 0x83c)
      Loading section (base: 0x1c000000, size: 0x5fe8)
      Init section to 0 (base: 0x1c005fe8, size: 0x194)
      Loading section (base: 0x1c00617c, size: 0x18)
      debug address 0x1c000090 contents 0x1c005c6c
      debug address 0x1c000090 contents 0x1c005c6c
      RSP server setup on port 9999
      Starting execution

      *** PMSIS Camera with LCD Test ***

      Entering main controller…
      Main loop start

      `
      Here also, are there some specific configuration steps I missed while reading the doc (regarding the use of the camera)?
      Plus: I got the same behavior using gvsoc.

      Sorry for the long message, ‘hope someone would be able to help me, I’m eager to start using the camera!

      Best!

    • Yao ZHANGYao ZHANG
      Member
      Post count: 48
      Hi 
      Sorry for confusion, for using camera on GAPUINO board, you can use this example:
      And the 2nd example you used works, but It works with LCD, if there is no LCD connected, it hangs.
      But you can build it without lcd, by defined the parameter “BRIDGE” in Makefile to 1.
      BR,
      Yao Zhang
      Greenwaves Technologies

    • Noël TaillardatNoël Taillardat
      Participant
      Post count: 3

      Hi!
      Thanks a lot for your quick and precise answer!
      However I still have issues with this example: after “Entering main controller”, nothing happened, until I get a list of ftdi errors…
      I tried to ‘make clean all’ the whole sdk, to check my ftdi installation, but everything seemed ok.
      Here’s my log:

      osboxes@osboxes:~/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO$ make clean all run
      rm -rf imgOut
      mkdir imgOut
      mkdir -p /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV
      riscv32-unknown-elf-gcc -O3 -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/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -MD -MF /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test.d -o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test.o
      riscv32-unknown-elf-gcc -O3 -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 ImgIO.c -I/home/osboxes/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -MD -MF /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/ImgIO.d -o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/ImgIO.o
      riscv32-unknown-elf-gcc -MMD -MP -Wl,–gc-sections -O3 -I/home/osboxes/gap_sdk/install/GAP8_V2/include -I/home/osboxes/gap_sdk/install/GAP8_V2/include/io -I/home/osboxes/gap_sdk/install/workstation/include -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h -o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test.o /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/ImgIO.o -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap/gapuino -lpibsp -L/home/osboxes/gap_sdk/install/GAP8_V2/lib/gap -lrt -lrtio -lrt -lgcc -T/home/osboxes/gap_sdk/install/workstation/ld/link.gap8_rev1.ld -T/home/osboxes/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/osboxes/gap_sdk/install/GAP8_V2/include/rt/chips/gap/config.h
      riscv32-unknown-elf-objdump -D /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test > /home/osboxes/gap_sdk/examples/native/pulpos/periph/camera/camera_HIMAX_IO/BUILD/GAP8_V2/GCC_RISCV/test.s
      /home/osboxes/gap_sdk/install/workstation/runner/run_gapuino.sh -fileIO 5

      ,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/gap_sdk/install/workstation/runner/run_gapuino.sh: 29: [: gapuino: unexpected operator
      Bridge init – log level 2
      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 test
      Loading section (base: 0x1b000004, size: 0x3fc)
      Loading section (base: 0x1b000400, size: 0x840)
      Loading section (base: 0x1c000000, size: 0x1a6c0)
      Unable to connect to localhost port 9999 (Connection refused)
      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      Cable state change disconnected
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      Init section to 0 (base: 0x1c01a6c0, size: 0x1b0)
      Loading section (base: 0x1c01a870, size: 0x18)
      debug address 0x1c000090 contents 0x1c006ff4
      debug address 0x1c000090 contents 0x1c006ff4
      RSP server setup on port 9999
      Starting execution
      Entering main controller

      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      ft2232: ftdi_write_data() failed – usb bulk write failed (-1)
      ft2232: ftdi_stream_out has failed
      ft2232: ftdi_stream_inout has failed
      adv_dbg_itf: failed to read start bit from device
      terminate called after throwing an instance of ‘LoopCableException’
      what(): Exception accessing cable
      /home/osboxes/gap_sdk/tools/rules/pulp_rules.mk:142: recipe for target ‘run’ failed
      make: *** [run] Error 134

      Thanks again for your help!
      BR,

      Noël

    • Noël TaillardatNoël Taillardat
      Participant
      Post count: 3

      Issue solved with the same solution than the one described here: https://github.com/GreenWaves-Technologies/gap_sdk/issues/54#issuecomment-498653965 !
      Thanks Yao,
      BR
      Noel

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