Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNIST example error: Protocol version mismatch between bridge and runtime #101

Closed
danieldennett opened this issue Jan 23, 2020 · 5 comments

Comments

@danieldennett
Copy link

Dear GWT,

At the moment I am working with the AI-deck from BitCraze and plan on making a simple program in TF lite for it. For this I want to check if the gap_sdk with its nntool and autotiler is working properly for the AI-deck. I am working from the 3.1.1_dev_001 branch and I was able to run the helloworld example from gap-sdk/examples/native/pulpos. Consequently, I was testing the mnist example on the AI-deck and I was able to flash it partially. It stopped after loading the test binary. The error message below did not gave us any leads where to start looking for. Except that debug address 0x00000001 contents 0x-10215242 could be a clue, but I am not sure how to harness this information and where to start debugging. Thanks in advance.

Loading section (base: 0x1c009d8c, size: 0x48)
debug address 0x00000001 contents 0x-10215242
Protocol version mismatch between bridge and runtime (bridge: 4, runtime: -1091576147)
terminate called after throwing an instance of 'std::logic_error'
  what():  Unable to connect to runtime
/home/user/gap_sdk/tools/rules/pulp_rules.mk:162: recipe for target 'run' failed
make: *** [run] Error 134

@Yaooooo
Copy link
Member

Yaooooo commented Jan 23, 2020 via email

@danieldennett
Copy link
Author

Hey,

Thank you for your response. I have tried to use the openOCD as a bridge. I started with your instructions first, but that gave me the following error message

Generating files (header offset: 0xc400)
  Adding component (name: Mnist_L3_Flash_Const.dat, flashOffset: 0xc434)
112576
Open On-Chip Debugger 0.10.0+dev-gc0bf3edc (2020-01-08-16:56)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Interface already configured, ignoring
TARGET create
Info : core 0 selected
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: no device found
Error: unable to open ftdi device with vid 15ba, pid 002b, description 'Olimex OpenOCD JTAG ARM-USB-OCD-H', serial '*' at bus location '*'

Open On-Chip Debugger 0.10.0+dev-gc0bf3edc (2020-01-08-16:56)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
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: no device found
Error: unable to open ftdi device with vid 15ba, pid 002b, description 'Olimex OpenOCD JTAG ARM-USB-OCD-H', serial '*' at bus location '*'

All the while I only have 1 Olimex connected and it is being recognizedby lsusb and also it was correctly used by the plpbridge with the helloworld example. So my next step was trying to solve the openocd issue with the tools the gap_sdk is providing this led to these commands

cd ~/gap_sdk/tools/gap-openocd
./configure && make && make install
cd ~/gap_sdk/tools/gap-openocd- tools
openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/gap8revb.tcl -f .tcl/jtag_boot.tcl

this gave me the same error message but now singular

Open On-Chip Debugger 0.10.0+dev-gc0bf3edc (2020-01-08-16:56)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
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: no device found
Error: unable to open ftdi device with vid 15ba, pid 002b, description 'Olimex OpenOCD JTAG ARM-USB-OCD-H', serial '*' at bus location '*'

After this the helloworld example also didn't work anymore. Also the lights on the ai-deck are not blinking anymore when I attach the JTAG connection. While working with the plpbridge this was not the case. This is how far I got and will have another look at it on monday with a colleague of mine.

@gwtsivasiva
Copy link
Contributor

Hi Daniel,

What is the name you see on the Olimex ? There are two types of Olimex : ARM-USB-OCD and ARM-USB-OCD-H. The configs are different depending on the version.
This might be the reason why the device is not found.

For Mnist, you have two errors message because the first one concerns the picture flashing in memory, the second one is for running the app/example.
For the helloworld example, you flash nothing in memory, that is why the error appears only once.

Siva.

@danieldennett
Copy link
Author

danieldennett commented Jan 27, 2020

Hey Siva,

Thank you for your response! The name of my Olimex is Olimex Ltd. ARM-USB-TINY-H JTAG interface. Thanks to yr hint, I found the right config file in gap_sdk/tools/gap8-openocd/tcl/interface/ftdi.

Ah that makes a lot of sense! Thanks for the clarification.

Best regards,

Daniel

@gwtsivasiva
Copy link
Contributor

Hi David,

Glad I could help.
If that is all, I am closing this thread, feel free to open a new one if you have issues.

Siva.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants