Failed in running PMSIS helloworld example on AI-deck's board

Discussions about the AI-deck
Post Reply
computerpolice
Beginner
Posts: 9
Joined: Sun Jun 20, 2021 6:41 am

Failed in running PMSIS helloworld example on AI-deck's board

Post by computerpolice »

Hello!

I'm using the GAP_SDK in docker within the crazyflie's VM. I'm trying to execute the PMSIS helloworld example on the AI deck processor but the execution ends up failing due to the following error:

Code: Select all

Launching execution with command:
gap8-openocd -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/gap8revb.tcl -f tcl/jtag_boot_entry.tcl -c 'gap8_jtag_load_binary_and_start "/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V2/GCC_RISCV/test" elf 0x1c000080'
Open On-Chip Debugger 0.10.0+dev-gb84d97ec4 (2021-07-15-09:59)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
DEPRECATED! use 'adapter driver' not 'interface'
Warn : Interface already configured, ignoring
TARGET create
Info : core 0 selected
0
Info : gap8_adv_debug_itf tap selected
Info : adv_dbg_unit debug unit selected
Info : Option 7 is passed to adv_dbg_unit debug unit
GAP8 INIT TARGET
Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE
Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 002a, description 'Olimex OpenOCD JTAG ARM-USB-TINY-H', serial '*' at bus location '*'

Traceback (most recent call last):
  File "/gap_sdk/tools/gapy/gapy", line 162, in <module>
    main()
  File "/gap_sdk/tools/gapy/gapy", line 152, in main
    operationFunc(args, config)
  File "/gap_sdk/tools/gapy/run.py", line 146, in operationFunc
    raise RuntimeError('Runner has failed with value: %d' % status)
RuntimeError: Runner has failed with value: -1
/gap_sdk/tools/rules/pulp_rules.mk:244: recipe for target 'run' failed
make: *** [run] Error 1
root@4f657d0612c8:/gap_sdk/examples/pmsis/helloworld# 
I can't really tell what is wrong. I made sure that the olimex-arm-usb-tiny-h interface is connected to the VM by using the command lsusb. I also made sure to use $source configs/ai_deck.sh and $export GAPY_OPENOCD_CABLE=interface/ftdi/olimex-arm-usb-tiny-h.cfg in the main sdk directory. What could be the issue?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Failed in running PMSIS helloworld example on AI-deck's board

Post by kimberly »

hi! The VM can sometimes be tricky with the olimex... And you seem to do everything well with the VM!

I experienced sometimes that there are two olimex's listed in the USB devices, and that the one mentioning OPENOCD is the one to have.

Could you copy paste the libusb perhaps so that I can compare it with my machine?

Also, are you running the VM from ubuntu or windows?
computerpolice
Beginner
Posts: 9
Joined: Sun Jun 20, 2021 6:41 am

Re: Failed in running PMSIS helloworld example on AI-deck's board

Post by computerpolice »

Hi Kimberly!

I'm assuming you meant the lsusb results? Here they are:

Code: Select all

bitcraze@ubuntu:~$ lsusb
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 15ba:002a Olimex Ltd. ARM-USB-TINY-H JTAG interface
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 021: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
The Olimex interface in this list is the one with the OPENOCD mentioned (I can see it in the VM USB Settings but not in the list).

I'm running the Ubuntu VM through virtualbox on MacOS.
computerpolice
Beginner
Posts: 9
Joined: Sun Jun 20, 2021 6:41 am

Re: Failed in running PMSIS helloworld example on AI-deck's board

Post by computerpolice »

I figured it out! I just needed to specify the GAPY_OPENOCD_CABLE properly.

I used to command

Code: Select all

export GAPY_OPENOCD_CABLE=interface/ftdi/olimex-arm-usb-tiny-h.cfg
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Failed in running PMSIS helloworld example on AI-deck's board

Post by kimberly »

Ahhh oke! It seemed that it was going well from your first console print out as I saw the right .cfg in the openocd part of things, but perhaps the gap_sdk also needs it separately for it's flashing script too.

Good that it works now !
Post Reply