Coder Social home page Coder Social logo

greenwaves-technologies / gap_sdk Goto Github PK

View Code? Open in Web Editor NEW
136.0 21.0 77.0 220.59 MB

SDK for Greenwaves Technologies' GAP8 IoT Application Processor

Home Page: https://greenwaves-technologies.com/en/gap8-the-internet-of-things-iot-application-processor/

License: Apache License 2.0

Makefile 1.07% C 59.77% C++ 23.90% Assembly 0.49% Shell 0.07% Perl 0.22% Python 13.54% GDB 0.01% CMake 0.38% HTML 0.01% Tcl 0.36% CSS 0.01% Stata 0.13% Jupyter Notebook 0.04% QMake 0.01%
sdk gap-sdk pulp gap8 iot-platform processor microprocessor

gap_sdk's People

Contributors

alxkbr avatar antoine-faravelon avatar asmorkalov avatar ccravens avatar eyssk avatar garik avatar gemenerik avatar gwtsivasiva avatar haugoug avatar hugovansteenhuyze avatar iptresolavy avatar marco-fariselli avatar mattabrs avatar maximzem avatar microtronics-dc-fw avatar owenchj avatar owenchj0 avatar pafrak avatar sousoux avatar thomasstauffer666 avatar yaooooo avatar zimka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gap_sdk's Issues

GPIO enable not working for example benchmarks

I'm tried following the instrucitons regarding enabling the GPIO 17 for the example gap8 benchmarks which involves running a series of NN layers. It says that all I have to do is comment out the line:

#define NOGPIO

but im getting this error that i dont get its associatation when commenting out the above line:
image

gap_flasher broken

When trying to compile and run the pulp helloworld example program, I get the following error:

ccravens@osboxes:~/src/helloworld$ make all
mkdir -p /home/ccravens/src/helloworld/BUILD/GAP8/GCC_RISCV
riscv32-unknown-elf-gcc -O3 -g -fno-jump-tables -fno-tree-loop-distribute-patterns -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wundef -fdata-sections -ffunction-sections -march=rv32imcxgap8 -mPE=8 -mFC=1 -D__riscv__ -D__pulp__ -MMD -MP -c test.c  -I/home/ccravens/gap_sdk/install/gap/include/pulp-os  -I/home/ccravens/gap_sdk/install/gap/include/pulp-os/io  -I/home/ccravens/gap_sdk/install/workstation/include  -include /home/ccravens/gap_sdk/install/gap/include/pulp-os/gap_config.h -MD -MF /home/ccravens/src/helloworld/BUILD/GAP8/GCC_RISCV/test.d -o /home/ccravens/src/helloworld/BUILD/GAP8/GCC_RISCV/test.o
riscv32-unknown-elf-gcc -MMD -MP -Wl,--gc-sections -O3 -g -o /home/ccravens/src/helloworld/BUILD/GAP8/GCC_RISCV/test  /home/ccravens/src/helloworld/BUILD/GAP8/GCC_RISCV/test.o -L/home/ccravens/gap_sdk/install/gap/libs -lrt -lio -lrt -lgcc -T/home/ccravens/gap_sdk/install/workstation/ld/link.gap8.ld -T/home/ccravens/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/ccravens/gap_sdk/install/gap/include/pulp-os/gap_config.h
/home/ccravens/gap_sdk/tools/version/record_version.sh: line 7: cd: /home/ccravens/gap_sdk/tools/gap_flasher: No such file or directory

I'm wondering if the following commit may have broken this: d5d010a

Workload distribution in the cluster.

Hello,

Currently, I'm watching the execution on the GAPuino of the nntool/mnist example . And I have some questions about how the cluster works.

I understood that the Conv2D and MaxPooling layers are running on HWConvolutionEngine, but are the other 8 RISC-V cores in "idle mode" during this time?

And in the case of Dense Layer, is the execution parallelized between the 8 RISC-V cores of the cluster?

Thank you in advance.

Mnist Example Unable to connect to localhost port 9999 (connection refused)

I try to run the example of Mnist from pulp-examples and i get this response :

Bridge init - log level 1
Program exited
Loading binary through jtag
Notifying to boot code that we are doing a JTAG boot
Cable state change connected
Loading binary from test
Loading section (base: 0x1b000004, size: 0x324)
Loading section (base: 0x1b000328, size: 0x0)
Init section to 0 (base: 0x1b000328, size: 0x808)
Loading section (base: 0x1c000000, size: 0x270f8)
Unable to connect to localhost port 9999 (Connection refused)
Init section to 0 (base: 0x1c0270f8, size: 0xcc)
Loading section (base: 0x1c0271c4, size: 0x44)
Loading section (base: 0x1c027208, size: 0x84)
debug address 0x1c000090 contents 0x1c008808
debug address 0x1c000090 contents 0x1c008808
Start execution on GAP8
Entering main controller
Error from ftdi_read_data() - usb bulk read failed (-7)
Cable state change disconnected
ft2232: Error from ftdi_read_data() - usb bulk read failed (-7)
Read failed
ft2232: fdti_stream_in has failed
ft2232: ftdi_stream_inout has failed
adv_dbg_itf: failed to read crc from device
*** Error in `python3': double free or corruption (out): 0x0000000003111cb0 ***

I am in a virtual box of ubuntu 16.04 Xenial and I can run other examples as cifar10.

Thank you for your time.

unable to run hello world example! plus another MAJOR request

I tried running 'make clean all run' for testing Hello World example but I am getting this error regarding the makefile where it can't recognize the pmsis_rules.mk file.

Makefile:9: /pmsis_rules.mk: No such file or directory
make: *** No rule to make target '/pmsis_rules.mk'. Stop

How do I fix this?

Also do you know where I can find any multilayer NN examples and how to use nntool to map them to the GAP8? Also to view performance counters for such benchmarks?

Camera picture

Hi

I haven't quite understood if the moment I capture an Image I can use it for say with the algorithm of Mnist or is any further processing required?

Regards,

Peter

UART Connection

Hi

I want to transfer data from my Gap8 to the computer through a UART module but I have some issues so far. I am not sure if the pins I choose are correct because in the users manual are not connected anywhere . I connected them according to the Arduino Uno. Also I am not sure with what to fill the entry itf entry of the config structure and the device name for the uart_open function.

Thank you for your time

Panagiotis

I2S drivers on FreeRTOS/PMSIS

Hello,

I see that the SDK doesnt have drivers for I2S on FreeRTOS/PMSIS. Would it be available on future versions ? .

Thanks,
Satish.

rt_bridge_connect not working on release 3.4

Hello,

some application code does not work on release 3.4 while working on release 3.3.

There is an infinite loop in
rt_bridge_connect(1, NULL);
we call at the beginning of our application to store images.
From printf debugging, there is a never ending condition in
__rt_wait_event_check(event, call_event);

We cannot find working examples of rt_bridge_connect on that release.

Thank you for your help

Problems with accesing the performance counterS

Hello,
I modified a bit the application you give in the following link:
https://github.com/GreenWaves-Technologies/benchmarks/tree/f12e26077a4f42409dcb597f36612cf7fe96dbdb/gap8/cnn
With the code you provide in the CIfar example to be able to read the performance counters.

With the PCER configured like this:
rt_perf_t *perf = cluster_perf;
rt_perf_init(perf);
rt_perf_conf(perf, (1<<RT_PERF_CYCLES));
........
rt_perf_reset(perf);
gap8_resethwtimer();
WriteGpio(GPIO, 1);
rt_perf_start(perf);
Ti = gap8_readhwtimer();
for (int i=0; i<Iter; i++) Counting();
Ti = gap8_readhwtimer() - Ti;
rt_perf_stop(perf);
rt_perf_save(perf);
WriteGpio(GPIO, 0);
PERF_CYCLES[0] = rt_perf_get(perf, RT_PERF_CYCLES);
*num_ops = Ti;
......
printf ("%10s Benchmark: (x%d iterations) Time: %10lu uSec. Cycles1: %10lu / RT_PERF_CYCLES: %10lu\n",tests_names[i], ITERATIONS, tot_time, op_num, PERF_CYCLES[cur_test-1]);
......
and with the PCER configured like this:
rt_perf_t *perf = cluster_perf;
rt_perf_init(perf);
rt_perf_conf(perf, (1<<RT_PERF_LD));
.......
rt_perf_reset(perf);
gap8_resethwtimer();
WriteGpio(GPIO, 1);
rt_perf_start(perf);
Ti = gap8_readhwtimer();
for (int i=0; i<Iter; i++) Counting();
Ti = gap8_readhwtimer() - Ti;
rt_perf_stop(perf);
rt_perf_save(perf);
WriteGpio(GPIO, 0);
PERF_CYCLES[0] = rt_perf_get(perf, RT_PERF_CYCLES);
PERF_LD[0] = rt_perf_get(perf, RT_PERF_LD);
*num_ops = Ti;

printf ("%10s Benchmark: (x%d iterations) Time: %10lu uSec. Cycles1: %10lu / PERF_LD: %10lu\n",tests_names[i], ITERATIONS, tot_time, op_num, PERF_LD[cur_test-1]);

I ALWAYS obtain the same data:
--------------- Sequential ---------------
Counting FC Benchmark: (x10000 iterations) Time: 1528015 uSec. Cycles1: 263861947 / Cycles2: 469782528 Instructions: 263863029

                  ---------------          Parallel   ---------------

Counting FC Benchmark: (x10000 iterations) Time: 1540527 uSec. Cycles1: 266204986 / PCER: 469782528
Counting 1C Benchmark: (x10000 iterations) Time: 1548035 uSec. Cycles1: 267713181 / PCER: 469782528
Counting 2C Benchmark: (x10000 iterations) Time: 1577729 uSec. Cycles1: 273205794 / PCER: 469782528
Counting 4C Benchmark: (x10000 iterations) Time: 1669403 uSec. Cycles1: 289773049 / PCER: 469782528

Am I doing something wrong or there is something wrong with the function?
I need help with this ASAP
Kind regards

Installation on Ubuntu 18.04

I'm aware it's not officially supported, but here's what I've come across under Ubuntu 18.04. The instructions largely worked, apart from some Git LFS errors:

Error: Failed to call git rev-parse --git-dir --show-toplevel: "fatal: not a git repository (or any of the parent directories): .git\n"

These didn't prevent the toolchain from downloading. However, the toolchain does not work under Ubuntu 18.04, building the SDK failed with:

/usr/lib/gap_riscv_toolchain/bin/../libexec/gcc/riscv32-unknown-elf/7.1.1/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory

It appears libmpfr4 has been removed from the packages, only libmpfr6 is available.

After rebuilding/installing pulp-riscv-gnu-toolchain with:

./configure --prefix=/usr/lib/gap_riscv_toolchain --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
make

I was able to build the basic helloworld project, and several other projects, though I haven't tried actually running any of them yet.

Water Meter success check issue

Small fix needed in applications/WaterMeter/Mnist.c:350

for(int num=0;num<7;num++){

should be

for(int num=0;num<=7;num++){

So it checks that the last digit is correct.

Unable to adjust ssd_model.tflite with nntool - ReshapeParameters not implemented

In gap_sdk/tools/nntool/tests/graph/ssd_model.tflite
nntool fails

I'm using commit 504aff5f1305ce2605ce60c59085d5f396f89218 (HEAD -> master, tag: release-v3.0, origin/master, origin/HEAD)

Welcome to NNTOOL. Type help or ? to list commands.

(NNT) set debug true
debug - was: False
now: True
(NNT) open ssd_model.tflite
nntool_shell - opening graph file ssd_model.tflite
new_tflite_graph_all - Importing TFLITE model version 3
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT ssd_model.tflite 0) adjust
adjust_order - step 0: input_1 adjust input 0 80x80x3 => c x h x w
adjust_order - step 0: input_1 adjust output 0 80x80x3 => c x h x w
adjust_order - step 1: CONV_2D_0_0 adjust weights 16x5x5x3 => out_c x in_c x h x w
adjust_order - step 1: CONV_2D_0_0 adjust input 0 80x80x3 => c x h x w
adjust_order - step 1: CONV_2D_0_0 adjust output 0 80x80x16 => c x h x w
adjust_order - step 2: CONV_2D_0_0_activation adjust input 0 80x80x16 => c x h x w
adjust_order - step 2: CONV_2D_0_0_activation adjust output 0 80x80x16 => c x h x w
adjust_order - step 3: MAX_POOL_2D_0_1 adjust input 0 16x80x80 => c x h x w
adjust_order - step 3: MAX_POOL_2D_0_1 adjust output 0 40x40x16 => c x h x w
adjust_order - step 4: CONV_2D_0_2 adjust weights 16x5x5x16 => out_c x in_c x h x w
adjust_order - step 4: CONV_2D_0_2 adjust input 0 16x40x40 => c x h x w
adjust_order - step 4: CONV_2D_0_2 adjust output 0 40x40x16 => c x h x w
adjust_order - step 5: CONV_2D_0_2_activation adjust input 0 40x40x16 => c x h x w
adjust_order - step 5: CONV_2D_0_2_activation adjust output 0 40x40x16 => c x h x w
adjust_order - step 6: CONV_2D_0_4 adjust weights 16x3x3x16 => out_c x in_c x h x w
adjust_order - step 6: CONV_2D_0_4 adjust input 0 16x40x40 => c x h x w
adjust_order - step 6: CONV_2D_0_4 adjust output 0 40x40x16 => c x h x w
Traceback (most recent call last):
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 1753, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 2148, in onecmd
stop = func(statement)
File "/home/tj/gap_sdk/tools/nntool/interpreter/nntool_shell.py", line 806, in do_adjust
self.execute_adjust_order()
File "/home/tj/gap_sdk/tools/nntool/interpreter/nntool_shell.py", line 797, in execute_adjust_order
self.G.adjust_order()
File "/home/tj/gap_sdk/tools/nntool/graph/nngraph.py", line 166, in adjust_order
adjust_order(self, reshape_weights)
File "/home/tj/gap_sdk/tools/nntool/graph/manipulations/adjust_order.py", line 49, in adjust_order
raise NotImplementedError("this needs to be implemented")
NotImplementedError: this needs to be implemented
EXCEPTION of type 'NotImplementedError' occurred with message: 'this needs to be implemented'

NNtool example issue

Hello,

I'm trying to run the same nntool example. And I'm getting the same error:

Error: CNN_LinearReLU Kernel: S3_Linear_10x64x4x4, Can't find a matching basic kernel

Do you have a clue of what could be the issue for this error?

Thank you very much,
Isabella

Difference between the Multiscale Pedestrian Detection and the Pedestrian Detection (HoG)

Is there any diference between these given applications?
In the link:
https://greenwaves-technologies.com/manuals/BUILD/APPLICATIONS/html/index.html#section0
They are treated as different but then the description is exactly the same and none of them has a path or even the name of the c file to search in the sdk folder for it.
In fact, of the 6 applications provided in the link:
Canny Edge Detection. Has a "What in this folder" but no path.
Multiscale Pedestrian Detection. Does not have a "What in this folder", "Structure of the directory" or the path to it.
CIFAR10 image recognition. This one does have a "Structure of the directory" section which also includes the path.
Face Detection. Does not have a "What in this folder", "Structure of the directory" or the path to it (Althoug is the only on facedetection in the application folder)
Pedestrian Detection (HoG): Does have a "Structure of the directory" section" but not the path to it which if is gap_sdk/applications/MultiScalePedestrianDetector then which one is the path for the other one?
MNIST image recognition Does have a "Structure of the directory" but no path.

Question about nntool

Hi,

I would like to execute on the board a CNN architecture as MobileNet or ShuffleNet with Tensorflow. To do this, I ask myself some question:

1. Does the operation of NNTOOL require a python script with Keras or a script with only Tensorflow is enough ?
2. The example gap_sdk/examples/nntool/mnist/ is dense, what are the steps to follow to make my own example ?
3. Does the example gap_sdk/examples/nntool/mnist/ use all the cores in the cluster to make the inference? (it seems to me that the inference is executed only on the master core of the cluster,am I right?)

Regards,

Autotiler version confusion

Hello,
Is it supposed to be that in the file gap_sdk/tools/autotiler_v2/Makefile placed TILER_VER=3.0.0?
I expect it should be TILER_VER=2.0.1 for example.

Premature stopping of the inference of the example nntool/mnist.

Hello,

I am currently playing with the nntool/mnist example on the GAPuino. In particular, I modify the network by removing or adding layers and by modifying the number of kernels. I have noticed that in some cases the inference seems to stop prematurely.

Does anyone observe the same behaviour? And what's causing it?

For example :

*** NNTOOL Mnist Example ***

Entering main controller
Reading image
File: samples_8602_pgm open: Ok
Image samples_8602_pgm:  [W: 28, H: 28] Gray, HeaderSize: 13
P5
28 28
255

Image samples_8602_pgm, [W: 28, H: 28], Gray, Size: 784 bytes, Loaded sucessfully
Finished reading image
Preprocess 8 bit
Constructor
Call cluster

          S1_Conv2d_32x1x5x5_MaxPool_2x2_Relu:          0, Operation:     483840, Operation/Cycle: inf
                        S2_Linear_10x32x12x12:          0, Operation:      46080, Operation/Cycle: inf
                                   S3_SoftMax:          0, Operation:         10, Operation/Cycle: inf

                                        Total:          0, Operation:     529930, Operation/Cycle: inf

Ended

Problems with running Cifar10 example application

Hi,

We are currently to run the Cifar10 example application shipped in the code, however there seem to be a truncated file that is not presented in the SDK. The /gap_sdk/tools/autotiler/lib/libtile.a file is not present. Is this the most updated version of the code? Should we be expecting any updates to this?

Thanks for the clarification.

Adriel

Regarding issue in modifying nntool MNIST example

Dear GreenWaves Technologies,

This is regarding the Mnist example present in the folder: gap_sdk/examples/nntool/mnist/
I have followed the steps, and the example works in the current setting.
However, when modifying the 'gap_sdk/examples/nntool/mnist/model/train.py'
file by changing the number of filters or kernel sizes the example doesn't work complies directly.

My inspection shows, there are several dependencies that need to be taken care of due to modifications. The one which I could figure is the file: 'gap_sdk/examples/autotiler/Mnist/MnistModel.c', in which the layer definitions need to be updated accordingly. After modifying this layer definition, the example could compile and run, but the model running on GAP8 was not giving accurate results, which I think may be due to the dependencies/changes required that I might have missed.

Please let me know if you can share the summary/overview of the dependencies to be taken care of when modifying the 'gap_sdk/examples/nntool/mnist/model/train.py', with very simple changes like changing kernel sizes or the number of filters.

If there is any documentation or notes available please let me know, any initial start is appreciated.

regards,
Sandeep

Missing apt-get packages

When attempting to build the SDK for the first time on the VirtualBox Ubuntu image, I had to install 2 additional libraries in order to successfully build the SDK:

  1. cmake
  2. libusb-1.0

After installing these, it appears the SDK built successfully. I suggest adding "cmake libusb-1.0" to the list of apt-get packages on the first step of the README

How to use custom network with nntools [Question]

Hi, I've been trying to use nntools to make my own network, here is what I did:

  1. change the code in examples/nntools/mnist/model/train.py to train another network
  2. change all the 28x28 to 500x500 in examples/nntool/mnist/common.mk and examples/nntool/mnist/model/run.py

Then I did make -f emul.mk all, it fails at nntool -g -M BUILD_MODEL_8BIT_EMUL -m mnistModel.c -T BUILD_MODEL_8BIT_EMUL/tensors BUILD_MODEL_8BIT_EMUL/mnist.json, since I did not change the name mnist.

Ouput as followed

root@10bd4f9e53f4:/gap_sdk/examples/nntool/mnist# nntool -g -M BUILD_MODEL_8BIT_EMUL -m mnistModel.c -T BUILD_MODEL_8BIT_EMUL/tensors  BUILD_MODEL_8BIT_EMUL/mnist.json
<graph.nngraph.NNGraph object at 0x7fb95a96b2e8>
code_generator - Quantization record not found for node input_1
Traceback (most recent call last):
  File "/gap_sdk/tools/nntool/nntool", line 94, in <module>
    main()
  File "/gap_sdk/tools/nntool/nntool", line 78, in main
    mod.generate_code(args)
  File "/gap_sdk/tools/nntool/interpreter/generator.py", line 69, in generate_code
    model = code_template(G, code_generator=code_gen)
  File "/gap_sdk/tools/nntool/generation/default_template.py", line 138, in default_template
    return execute_template(generator_template_v3, G, naming_convension, code_generator)
  File "/gap_sdk/tools/nntool/generation/default_template.py", line 132, in execute_template
    return template_function(G, code_generator)
  File "/gap_sdk/tools/nntool/generation/default_template.py", line 88, in generator_template_v3
    ${gen.kernel_generator(indent=1)}
  File "/gap_sdk/tools/nntool/generation/code_generator.py", line 463, in kernel_generator
    raise err
  File "/gap_sdk/tools/nntool/generation/code_generator.py", line 460, in kernel_generator
    qrec = self.G.quantization[NodeId(node)]
KeyError: <utils.node_id.NodeId object at 0x7fb95a962e80>

Seems it stuck at It then generates an nntool state file by running an nntool script with commands to adjust the tensor and activation order, fuse certain operations together and automatically quantify the graph step.

And the reason being the input layer of my network is not named input_1, I searched the repo but can't find where to define this input layer name.

Is there a documentation for nntools? cause I can't find it in the official documentation.

Thanks for the help again~
Cheers!


Another error was raised but I can't seem to find where:

input_norm_func - was:
now: x: (x>>1)/128
input_divisor - was: 128
now: 1
input_offset - was: -1
now: 0
nntool_shell - input file images/10018.pgm
execute_graph - execute uncached: quantization mode none
EXCEPTION of type 'ValueError' occurred with message: 'Input data dimensions are not compatible with graph input: cannot reshape array of size 2500
00 into shape (3,500,500) try -W and -H flags                 to force the input dimensions to specific value'
To enable full traceback, run the following command: 'set debug true'
dump_tensors - was: False
now: True
graph_reorder_constant_in - was: True
now: True
graph_produce_node_names - was: False
now: True
graph_produce_operinfos - was: False
now: True
graph_monitor_cycles - was: False
now: True

Looks like image was read as a flatted array instead of (500,500,3), but no line number of filename was given, but I think the image preprocessing part needs to be changed.

Cannot boot from HyperFlash

Hi,
I'm sorry for posting this issue here, as I don't know completely if it's related to the SDK or HDK. However, the forum seems quite inactive and no one has replied to this issue yet on the forum in the last 3-4 days. We have purchased multiple gapuino boards in the hope of using them for energy harvesting applications (powered externally- e.g. from solar power), so would like to get a minimum example working (booting) from Flash not from USB.

I am using a Gapuino 1.1 board (purchased after Oct. 2019). Using SDK 3.1, Ubuntu 16.04 VM, USB 3.0. have sourced configs/gapuino_v2.sh. Have also applied the patch/fix for load_jtag_hyper() as mentioned here: #86

Booting from JTAG works fine, I can see uart, LEDs blink, no errors, bridge works fine. But, I have tried to boot several simple applications from FLASH, but the process described in the docs do not work. For the blink LED example : examples\pmsis\test_periph\blink_led

Added
PLPBRIDGE_FLAGS += -f -hyper
to the makefile

According to the log (high verbose) below, it appears as if the binary has been flashed, but the board does not boot and execute from the Flash. I have tried power cycling, reseting while connected to USB, external power sources etc. nothing seems to boot the board from the Flash.

make clean all run

+ 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

nntool quantization fails with 3x3 kernel

aquant with a 3x3 kernel fails.

Here are the tflite models for repo
nntool_kernel_3x3_5x5.tar.gz

Call stack:

Traceback (most recent call last):
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 1753, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 2148, in onecmd
stop = func(statement)
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 272, in cmd_wrapper
return func(cmd2_app, args)
File "/home/tj/gap_sdk/tools/nntool/interpreter/nntool_shell.py", line 877, in do_aquant
stats_collector.collect_stats(self.G, [data])
File "/home/tj/gap_sdk/tools/nntool/stats/stats_collector.py", line 53, in collect_stats
stat = self._collect(G, input_tensors)
File "/home/tj/gap_sdk/tools/nntool/stats/activation_stats_collector.py", line 27, in _collect
execute_iterator(G, input_tensors, disable_cache=True):
File "/home/tj/gap_sdk/tools/nntool/execution/execute_graph.py", line 292, in execute_uncached_iterator
output, details = Executer.execute(fusion_node, output, qrec=fqrec)
File "/home/tj/gap_sdk/tools/nntool/execution/executer.py", line 41, in execute
return func(node, in_tensors, qrec)
File "/home/tj/gap_sdk/tools/nntool/execution/executer.py", line 156, in execute_conv2d
details=details)
File "/home/tj/gap_sdk/tools/nntool/execution/kernels/conv2d.py", line 284, in conv2d
qrec, details)
File "/home/tj/gap_sdk/tools/nntool/execution/kernels/conv2d.py", line 327, in process_input
res = np.dot(in_slice, w_slice)
ValueError: shapes (6,) and (9,) not aligned: 6 (dim 0) != 9 (dim 0)
EXCEPTION of type 'ValueError' occurred with message: 'shapes (6,) and (9,) not aligned: 6 (dim 0) != 9 (dim 0)'

3x3 log:

(NNT 28_5x5.tflite 0) open 28_3x3.tflite
nntool_shell - opening graph file 28_3x3.tflite
new_tflite_graph_all - Importing TFLITE model version 3
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_3x3.tflite 0) adjust
adjust_order - step 0: input_1 adjust input 0 28x28x1 => c x h x w
adjust_order - step 0: input_1 adjust output 0 28x28x1 => c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust weights 16x3x3x1 => out_c x in_c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust input 0 28x28x1 => c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust output 0 14x14x16 => c x h x w
adjust_order - step 2: DEPTHWISE_CONV_2D_0_0_activation adjust input 0 14x14x16 => c x h x w
adjust_order - step 2: DEPTHWISE_CONV_2D_0_0_activation adjust output 0 14x14x16 => c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust weights 1x3x3x16 => out_c x in_c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust input 0 16x14x14 => c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust output 0 14x14x16 => c x h x w
adjust_order - step 4: DEPTHWISE_CONV_2D_0_1_activation adjust input 0 14x14x16 => c x h x w
adjust_order - step 4: DEPTHWISE_CONV_2D_0_1_activation adjust output 0 14x14x16 => c x h x w
adjust_order - step 5: output_1 adjust input 0 14x14x16 => c x h x w
adjust_order - step 5: output_1 adjust output 0 14x14x16 => c x h x w
nngraph - adjusted order
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_3x3.tflite 0) fusions
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_3x3.tflite 0) aquant -q 1 image/* -D 255
nntool_shell - input file image/tmp.pgm
execute_graph - execute uncached: quantization mode none
Traceback (most recent call last):
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 1753, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 2148, in onecmd
stop = func(statement)
File "/home/tj/.local/lib/python3.6/site-packages/cmd2/cmd2.py", line 272, in cmd_wrapper
return func(cmd2_app, args)
File "/home/tj/gap_sdk/tools/nntool/interpreter/nntool_shell.py", line 877, in do_aquant
stats_collector.collect_stats(self.G, [data])
File "/home/tj/gap_sdk/tools/nntool/stats/stats_collector.py", line 53, in collect_stats
stat = self._collect(G, input_tensors)
File "/home/tj/gap_sdk/tools/nntool/stats/activation_stats_collector.py", line 27, in _collect
execute_iterator(G, input_tensors, disable_cache=True):
File "/home/tj/gap_sdk/tools/nntool/execution/execute_graph.py", line 292, in execute_uncached_iterator
output, details = Executer.execute(fusion_node, output, qrec=fqrec)
File "/home/tj/gap_sdk/tools/nntool/execution/executer.py", line 41, in execute
return func(node, in_tensors, qrec)
File "/home/tj/gap_sdk/tools/nntool/execution/executer.py", line 156, in execute_conv2d
details=details)
File "/home/tj/gap_sdk/tools/nntool/execution/kernels/conv2d.py", line 284, in conv2d
qrec, details)
File "/home/tj/gap_sdk/tools/nntool/execution/kernels/conv2d.py", line 327, in process_input
res = np.dot(in_slice, w_slice)
ValueError: shapes (6,) and (9,) not aligned: 6 (dim 0) != 9 (dim 0)
EXCEPTION of type 'ValueError' occurred with message: 'shapes (6,) and (9,) not aligned: 6 (dim 0) != 9 (dim 0)'

5x5 log:

Welcome to NNTOOL. Type help or ? to list commands.

(NNT) set debug true
debug - was: False
now: True
(NNT) open 28_5x5.tflite
nntool_shell - opening graph file 28_5x5.tflite
new_tflite_graph_all - Importing TFLITE model version 3
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_5x5.tflite 0) adjust
adjust_order - step 0: input_1 adjust input 0 28x28x1 => c x h x w
adjust_order - step 0: input_1 adjust output 0 28x28x1 => c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust weights 16x5x5x1 => out_c x in_c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust input 0 28x28x1 => c x h x w
adjust_order - step 1: DEPTHWISE_CONV_2D_0_0 adjust output 0 14x14x16 => c x h x w
adjust_order - step 2: DEPTHWISE_CONV_2D_0_0_activation adjust input 0 14x14x16 => c x h x w
adjust_order - step 2: DEPTHWISE_CONV_2D_0_0_activation adjust output 0 14x14x16 => c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust weights 1x5x5x16 => out_c x in_c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust input 0 16x14x14 => c x h x w
adjust_order - step 3: DEPTHWISE_CONV_2D_0_1 adjust output 0 14x14x16 => c x h x w
adjust_order - step 4: DEPTHWISE_CONV_2D_0_1_activation adjust input 0 14x14x16 => c x h x w
adjust_order - step 4: DEPTHWISE_CONV_2D_0_1_activation adjust output 0 14x14x16 => c x h x w
adjust_order - step 5: output_1 adjust input 0 14x14x16 => c x h x w
adjust_order - step 5: output_1 adjust output 0 14x14x16 => c x h x w
nngraph - adjusted order
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_5x5.tflite 0) fusions
nngraph - update graph dimensions
nngraph - calculate liveness
(NNT 28_5x5.tflite 0) aquant -q 1 image/* -D 255
nntool_shell - input file image/tmp.pgm
execute_graph - execute uncached: quantization mode none
+------+----------------------------------+------+------+---------+------+-------+------+
| Step | Name | In | Out | Weights | Bias | Calc | Acc |
+======+==================================+======+======+=========+======+=======+======+
| 0 | input_1 | | Q1.7 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+
| 1 | DEPTHWISE_CONV_2D_0_0 | Q1.7 | Q2.6 | Q1.7 | Q2.6 | Q2.14 | Q2.6 |
+------+----------------------------------+------+------+---------+------+-------+------+
| 1 | DEPTHWISE_CONV_2D_0_0_activation | Q2.6 | Q2.6 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+
| 1 | DEPTHWISE_CONV_2D_0_0_fusion | Q1.7 | Q2.6 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+
| 2 | DEPTHWISE_CONV_2D_0_1 | Q2.6 | Q1.7 | Q1.7 | Q1.7 | Q3.13 | Q1.7 |
+------+----------------------------------+------+------+---------+------+-------+------+
| 2 | DEPTHWISE_CONV_2D_0_1_activation | Q1.7 | Q1.7 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+
| 2 | DEPTHWISE_CONV_2D_0_1_fusion | Q2.6 | Q1.7 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+
| 3 | output_1 | Q1.7 | Q1.7 | | | | |
+------+----------------------------------+------+------+---------+------+-------+------+

make run ignores flashImg.raw file build issues

To reproduce add file that does not exist to PLPBRIDGE_FLAGS in Makefile:

PLPBRIDGE_FLAGS += $(addprefix -f ,./quantized_model/*.bin) -jtag

make run command log:

Reading ELF file
  Segment : 1b000000 308
  Segment : 1b000308 50
  Segment : 1c000000 65af0
  Segment : 1c065bc8 44
  Segment : 1c065c0c 8
Traceback (most recent call last):
  File "/home/alexander/Projects/GAP8/gap_sdk/install/workstation/bin/flashImageBuilder", line 432, in <module>
    flashImage.appendComponent(os.path.dirname(comp), os.path.basename(comp))
  File "/home/alexander/Projects/GAP8/gap_sdk/install/workstation/bin/flashImageBuilder", line 133, in appendComponent
    self.compList.append(Comp(dirname, name))
  File "/home/alexander/Projects/GAP8/gap_sdk/install/workstation/bin/flashImageBuilder", line 69, in __init__
    self.size = os.path.getsize(self.path)
  File "/usr/lib/python3.5/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: '/home/alexander/Projects/GAP8/gap8-reid-demo/tests/single_layer_test/../../ReID-Demo/quantized_model/*.bin'
Bridge init - log level 0
Cable state change connected
FATAL ERROR: [Errno 2] No such file or directory: 'flashImg.raw'
commands completed
Bridge init - log level 0
Cable state change connected
main call
pad config done
fs mounted
Loading layers to HyperRAM

The error is ignored and make is not stopped, as expected.

How to run helloworld

Dear GreenWaves,

I have GAPUINO Combo Kit and install GAP_SDK. But when I run the example, there is error as followings. Please review it and would you let know how I can solve it?

dooker@dooker-vm:~/gap_sdk/examples/pmsis/helloworld$ make clean all run
mkdir -p /home/dooker/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8/GCC_RISCV
riscv32-unknown-elf-gcc -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 helloworld.c -I/home/dooker/gap_sdk/install/GAP8/include -I/home/dooker/gap_sdk/install/GAP8/include/io -I/home/dooker/gap_sdk/install/workstation/include -include /home/dooker/gap_sdk/install/GAP8/include/rt/chips/gap/config.h -MD -MF /home/dooker/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8/GCC_RISCV/helloworld.d -o /home/dooker/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8/GCC_RISCV/helloworld.o
cc1: fatal error: /home/dooker/gap_sdk/install/GAP8/include/rt/chips/gap/config.h: No such file or directory
compilation terminated.
/home/dooker/gap_sdk/tools/rules/pulp_rules.mk:108: recipe for target '/home/dooker/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8/GCC_RISCV/helloworld.o' failed
make: *** [/home/dooker/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8/GCC_RISCV/helloworld.o] Error 1

Rgds,
Dooker

Not able to use gdbserver

Hello
I am working on latest release (3.4) using gapuino V2.

I have several problems in making applications work. To help progress I wanted to use gdbserver, but it seems it does not work.

I tried using the "hello world !" program example but it says nothing to do for gdbserver
make clean all gdbserver
It says nothing is to be made for "gdbserver"

Note that "Hello world !" example does work with make clean all run

Thank you

ftdi build problem

When building the sdk, got this error:

`[ 33%] Performing download step (git clone) for 'ftdi'
cd /home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src && /usr/bin/cmake -P /home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src/ftdi-stamp/ftdi-download-Debug.cmake
CMake Error at ftdi-stamp/ftdi-download-Debug.cmake:16 (message):
Command failed: 1

'/usr/bin/cmake' '-P' '/home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/tmp/ftdi-gitclone.cmake'

See also

/home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src/ftdi-stamp/ftdi-download-*.log

CMakeFiles/ftdi.dir/build.make:89: recipe for target 'ftdi/src/ftdi-stamp/ftdi-download' failed
make[7]: *** [ftdi/src/ftdi-stamp/ftdi-download] Error 1
make[7]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build'
CMakeFiles/Makefile2:144: recipe for target 'CMakeFiles/ftdi.dir/all' failed
make[6]: *** [CMakeFiles/ftdi.dir/all] Error 2
make[6]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build'
Makefile:138: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build'
CMakeFiles/pulp-debug-bridge.dir/build.make:110: recipe for target 'pulp-debug-bridge-prefix/src/pulp-debug-bridge-stamp/pulp-debug-bridge-build' failed
make[4]: *** [pulp-debug-bridge-prefix/src/pulp-debug-bridge-stamp/pulp-debug-bridge-build] Error 2
make[4]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build'
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/pulp-debug-bridge.dir/all' failed
make[3]: *** [CMakeFiles/pulp-debug-bridge.dir/all] Error 2
make[3]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build'
Makefile:127: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/build'
Makefile:38: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/yao/Projects/SDK/gap_sdk_github/tools/pulp_tools'
Makefile:85: recipe for target 'install_pulp_tools' failed
make: *** [install_pulp_tools] Error 2`

Checked error logs: /home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src/ftdi-stamp/ftdi-download-*.log

`yao@ubuntu:~/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src$ cat /home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/src/ftdi-stamp/ftdi-download-*.log
Cloning into 'ftdi'...
error: cannot expand target domain name in SRV RR
fatal: Unable to look up developer.intra2net.com
Cloning into 'ftdi'...
error: cannot expand target domain name in SRV RR
fatal: Unable to look up developer.intra2net.com
Cloning into 'ftdi'...
error: cannot expand target domain name in SRV RR
fatal: Unable to look up developer.intra2net.com
CMake Error at /home/yao/Projects/SDK/gap_sdk_github/build/pulp-debug-bridge-prefix/src/pulp-debug-bridge-build/ftdi/tmp/ftdi-gitclone.cmake:40 (message):
Failed to clone repository: 'git://developer.intra2net.com/libftdi'

-- Had to git clone more than once:
3 times.`

Not sure "git://developer.intra2net.com/libftdi" is still reachable, please check.

Yao

MNIST example error: Protocol version mismatch between bridge and runtime

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

uart_read hangs indefinitely after hyperflash device is opened

Hi. We are having a problem trying to read from the uart after opening the hyperflash device. Below is a minimal modification to test_hyperflash.c that shows the issue. If you send a single byte to the Gap8 (for example, using screen /dev/ttyUSB1 9600) the code will pass the first uart_read() test after entering test_hyper_flash(). It will then hang at the second uart_read() test at the end of test_hyper_flash() no matter how many bytes are sent to the Gap8. Although not shown in this example, uart_write calls still work. We are using the version 2 Gapuino board. We have several version 2 boards and all have the same problem. Is there some way to resolve this?

Thanks.

/* PMSIS includes */
#include "pmsis.h"
#include "bsp/flash.h"
#include "bsp/flash/hyperflash.h"
#include "Gap8.h"

/* Variables used. */
#define BUFFER_SIZE ( 2048 )

//RT_L2_DATA uint8_t rx_buffer[1];
static uint8_t *rx_buffer;
static uint8_t *buff, *rcv_buff;
static uint32_t hyper_buff;
static struct pi_device flash;
static struct pi_hyperflash_conf conf;

struct pi_device uart;
struct pi_uart_conf uart_conf;
#ifdef ASYNC
static volatile uint8_t done = 0;

/* Callback for end of RX transfer. */
void __end_of_rx(void *arg)
{
printf("Read async done.\n");
done = 1;
}

/* Callback for end of TX transfer. */
void __end_of_tx(void *arg)
{
pi_task_t *cb = (pi_task_t *) arg;
printf("Write async done.\n");
pi_flash_read_async(&flash, hyper_buff, rcv_buff, (uint32_t) BUFFER_SIZE, cb);
}

/* Callback for end of erase. */
void __end_of_erase(void *arg)
{
pi_task_t *cb = (pi_task_t ) arg;
printf("Erase async done.\n");
pi_flash_program_async(&flash, hyper_buff, buff, (uint32_t) BUFFER_SIZE, cb);
}
#endif /
ASYNC */
void uart_read() {
pi_uart_conf_init(&uart_conf);
uart_conf.baudrate_bps = 9600;
uart_conf.uart_id = 0;
uart_conf.enable_tx = 1;
uart_conf.enable_rx = 1;

pi_open_from_conf(&uart, &uart_conf);
if (pi_uart_open(&uart)) {
  printf("uart open failed\n");
}

rx_buffer = (uint8_t *) pmsis_l2_malloc((uint32_t) 1);
pi_task_t wait_task = {0};
pi_task_block(&wait_task);
printf("tasK_block passed\n");
pi_uart_read_async(&uart, rx_buffer, 1, &wait_task);
printf("pi_uart_async_read called, waiting\n");
pi_task_wait_on(&wait_task);
printf("waiting over, got 1 byte with value %d\n",  rx_buffer[0]);

}

void test_hyper_flash(void)
{
printf("Entering main controller\n\n");
uart_read();

uint32_t errors = 0;
struct pi_flash_info flash_info;

buff = (uint8_t *) pmsis_l2_malloc((uint32_t) BUFFER_SIZE);
if (buff == NULL)
{
    printf("buff alloc failed !\n");
    pmsis_exit(-1);
}

rcv_buff = (uint8_t *) pmsis_l2_malloc((uint32_t) BUFFER_SIZE);
if (rcv_buff == NULL)
{
    printf("rcv_buff alloc failed !\n");
    pmsis_exit(-2);
}

for (uint32_t i=0; i<(uint32_t) BUFFER_SIZE; i++)
{
    buff[i] = i & 0xFF;
    rcv_buff[i] = 0;
}

/* Init & open flash. */
pi_hyperflash_conf_init(&conf);
pi_open_from_conf(&flash, &conf);
if (pi_flash_open(&flash))
{
    printf("Error flash open !\n");
    pmsis_exit(-3);
}

/* Retrieve info on flash. */
pi_flash_ioctl(&flash, PI_FLASH_IOCTL_INFO, (void *) &flash_info);
hyper_buff = ((flash_info.flash_start + flash_info.sector_size - 1) &
              ~(flash_info.sector_size - 1)) + 128;
/* Erase a sector in flash, write a buffer then read back from flash. */
#ifdef ASYNC
pi_task_t cb_erase, cb_tx, cb_rx;
pi_task_callback(&cb_erase, __end_of_erase, &cb_tx);
pi_task_callback(&cb_tx, __end_of_tx, &cb_rx);
pi_task_callback(&cb_rx, __end_of_rx, NULL);
pi_flash_erase_async(&flash, hyper_buff, (uint32_t) BUFFER_SIZE, &cb_erase);
while (!done)
{
    pi_yield();
}
#else
pi_flash_erase(&flash, hyper_buff, (uint32_t) BUFFER_SIZE);
printf("Erase sync done.\n");
pi_flash_program(&flash, hyper_buff, buff, (uint32_t) BUFFER_SIZE);
printf("Write sync done.\n");
pi_flash_read(&flash, hyper_buff, rcv_buff, (uint32_t) BUFFER_SIZE);
printf("Read sync done.\n");
#endif  /* ASYNC */

/* Verification. */
for (uint32_t i=0; i<(uint32_t) BUFFER_SIZE; i++)
{
    if (buff[i] != rcv_buff[i])
    {
        errors++;
        printf("%2x-%2x ", buff[i], rcv_buff[i]);
    }
}

pmsis_l2_malloc_free(buff, (uint32_t) BUFFER_SIZE);
pmsis_l2_malloc_free(rcv_buff, (uint32_t) BUFFER_SIZE);
pi_flash_close(&flash);

printf("\nHyperflash transfer done with %ld error(s) !\n", errors);
printf("\nTest %s with %ld error(s) !\n", (errors) ? "failed" : "success", errors);

uart_read();

pmsis_exit(errors);

}

/* Program Entry. */
int main(void)
{
printf("\n\n\t *** PMSIS Hyperflash Test ***\n\n");
return pmsis_kickoff((void *) test_hyper_flash);
}

Missing "build" folder : tf2gap8

Hello,

I'm trying to run the cifar10 example.
However, when trying this command :

$ cd ~/gap_sdk/tf2gap8
$ make install 
[...] success.

$ cd ~/gap_sdk/tf2gap8/examples/cifar10
$ make run

it outputs the following error :

--- T2G_FREEZE GRAPH ---
( . /home/myuser/gap_sdk/tf2gap8/build/virtualenv/bin/activate ; /home/myuser/gap_sdk/tf2gap8/build/bin/freeze_graph --input_graph="/home/myuser/gap_sdk/tf2gap8/examples/cifar10/data/cifar10.pbtxt" --input_checkpoint="/home/myuser/gap_sdk/tf2gap8/examples/cifar10/data/model.ckpt" --output_graph="/home/myuser/gap_sdk/tf2gap8/examples/cifar10/tfbuild/cifar10_frozen.pb" --output_node_names="prediction/y_output" )
/bin/sh: 1: .: Can't open /home/myuser/gap_sdk/tf2gap8/build/virtualenv/bin/activate
Makefile:48: recipe for target '/home/myuser/gap_sdk/tf2gap8/examples/cifar10/tfbuild/cifar10_frozen.pb' failed
make: *** [/home/myuser/gap_sdk/tf2gap8/examples/cifar10/tfbuild/cifar10_frozen.pb] Error 

It looks like the "build" folder is missing.
Did I miss any installation step?

GAPuino Rel.B breaks Sensor Board compatibility

GAPuino Rel. B has removed I2S1_SDI from P4 connector. Therefor half of the microphones are not usable any more!

A test with examples/pmsis/test_periph/i2s/pdm_4mic even shows, that only 1 out of the 4 mic's are working:

Starting execution
Entering main controller
Interface 0 / channel 0
  Sample 0: -1640
  Sample 1: 5393
  Sample 2: -2442
  Sample 3: 5407
  Sample 4: -3329
  Sample 5: 3911
  Sample 6: 1399
  Sample 7: 8035
  Sample 8: 12571
  Sample 9: -5118
  Sample 10: -4563
  Sample 11: 1690
  Sample 12: 954
  Sample 13: 16759
  Sample 14: 11322
  Sample 15: -1367
Interface 0 / channel 1
  Sample 0: -32768
  Sample 1: -32768
  Sample 2: -32768
  Sample 3: -32768
  Sample 4: -32768
  Sample 5: -32768
  Sample 6: -32768
  Sample 7: -32768
  Sample 8: -32768
  Sample 9: -32768
  Sample 10: -32768
  Sample 11: -32768
  Sample 12: -32768
  Sample 13: -32768
  Sample 14: -32768
  Sample 15: -32768
Interface 1 / channel 0
  Sample 0: -32768
  Sample 1: -32768
  Sample 2: -32768
  Sample 3: -32768
  Sample 4: -32768
  Sample 5: -32768
  Sample 6: -32768
  Sample 7: -32768
  Sample 8: -32768
  Sample 9: -32768
  Sample 10: -32768
  Sample 11: -32768
  Sample 12: -32768
  Sample 13: -32768
  Sample 14: -32768
  Sample 15: -32768
Interface 1 / channel 1
  Sample 0: -32768
  Sample 1: -32768
  Sample 2: -32768
  Sample 3: -32768
  Sample 4: -32768
  Sample 5: -32768
  Sample 6: -32768
  Sample 7: -32768
  Sample 8: -32768
  Sample 9: -32768
  Sample 10: -32768
  Sample 11: -32768
  Sample 12: -32768
  Sample 13: -32768
  Sample 14: -32768
  Sample 15: -32768
Detected end of application, exiting with status: 0

Using 1x1 filters with HWCE of GAP8

Hi, we are using GAP8 to deploy our ML models for some real world applications. However, in our model, there are some 1x1 filters. In the document of GAP8 and the header file "CNN_HwCE.h/.c", we only find out it accepts 1/2/3 3x3 filters or 1 5x5 filters or 1 4x7 filters for one cycle. Therefore, we decide to write our own codes for 1x1 filters. We would like to know whether HWCE accepts 1x1 filters in its hardware design and whether there is any advice for doing that?

openocd cannot be compiled on ubuntu 19.10

I am trying to compile openocd on ubuntu 19.10
I tried with both gcc versions 9.2.1 and 7.4.0

I compiled the latest gap sdk successfully (v3.1), but when I run the command make openocd I get the following warning/error:

/usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: error: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror=cpp] #warning "The <sys/sysctl.h> header is deprecated and will be removed." ^~~~~~~

cc1: all warnings being treated as errors make[3]: *** [Makefile:3391: src/helper/libhelper_la-options.lo] Error 1 make[3]: Leaving directory '/home/lorenzo/GAP/gap_sdk/tools/gap8-openocd' make[2]: *** [Makefile:4309: install-recursive] Error 1 make[2]: Leaving directory '/home/lorenzo/GAP/gap_sdk/tools/gap8-openocd' make[1]: *** [Makefile:4611: install] Error 2 make[1]: Leaving directory '/home/lorenzo/GAP/gap_sdk/tools/gap8-openocd' make: *** [Makefile:114: openocd] Error 2

I tried to ignore sysctl setting the HAVE_SYS_SYSCTL_H flag equal to 0 in the following config files:
tools/gap8-openocd/config.h
tools/gap8-openocd/configure

But no luck yet

Thanks!
lorenzo

Scope of NNTOOL

Hello,

I am looking for the scope of the NNTOOL. I tried to transfer/deploy SSD tensorflow lite model and Facenet Keras model using facenet.h5 file but both didn't work. It seems that corresponding functions (i.e. kernals) are not implemented.

Could you please provide me the scope of the NNTOOL or pointer? What kind of model can I deploy on the edge device? How can I perform only inference using the pre-trained model using gap_sdk?

How can I realize the face recognition or object detection (using SSD) application using gap_sdk?

Thanking you!

Understanding runtimes for cifar10 and mnist examples

Hi

We are trying to evaluate the gap8 and are running the cifar10 and mnist examples.
The output of the cifar10 script is:

Layer0: 14207 Cycles, 4012 instruments
Layer1: 37964 Cycles, 10613 instruments
Layer2: 3077 Cycles, 1194 instruments

We would like the results in units of time. Are "cycles" in the result the number of clock cycles? If so, we should be able to extrapolate time by dividing by the clock frequency. How can we determine at what frequency the gap8 is running then?

Thanks.

nntool example problems

I'm using gap_sdk f23a8be with configs/gapoc_a_v2.sh.
I'm building examples/nntool/mnist with make clean all run MNIST_BITS=16.

Following problems occur:

  • Hyperflash fails with error in function load_jtag_hyper(). This can be fixed with:
diff --git a/tools/pulp_tools/pulp-debug-bridge/python/bridge/chips/gap_rev1.py b/tools/pulp_tools/pulp-debug-bridge/python/bridge/chips/gap_rev1.py
index e22272c..c79ddd4 100644
--- a/tools/pulp_tools/pulp-debug-bridge/python/bridge/chips/gap_rev1.py
+++ b/tools/pulp_tools/pulp-debug-bridge/python/bridge/chips/gap_rev1.py
@@ -409,7 +409,7 @@ class gap_debug_bridge(debug_bridge):
         return True
 
 
-    def load_jtag_hyper(self, binaries):
+    def load_jtag_hyper(self):
 
         if self.verbose:
             self.log(0, 'Loading binary through jtag_hyper')
  • Cluster fails with memory exception. In the generated kernel constructor MnistCNN_Construct() the pointers are not checked for NULL so the cluster is started as usual. I suggest this should be done in the constructor as it is done in the applications/WaterMeter/Mnist.c. The problem here is, that the stacks eat up too much heap, so the fix is:
diff --git a/examples/nntool/mnist/Mnist.c b/examples/nntool/mnist/Mnist.c
index 6bbdd2f..5cc3c41 100644
--- a/examples/nntool/mnist/Mnist.c
+++ b/examples/nntool/mnist/Mnist.c
@@ -20,7 +20,7 @@
 #endif
 
 
-#define STACK_SIZE      2048
+#define STACK_SIZE      1024
 #define MOUNT           1
 #define UNMOUNT         0
 #define CID             0
@@ -187,6 +187,7 @@ int main()
     printf("Graph constructor exited with an error\n");
     return 1;
   }
+  printf("Mem: %p %p\n", L1_Memory, Mnist_L2_Memory);
 
   printf("Call cluster\n");
   // Execute the function "RunCifar10" on the cluster.
  • Running on GVSOC fails (no output at all, on gapuino config it is working!). This can be fixed by adding the runner config to 'install/workstation/configs/config/gapoc_a.json':
  "runner": {
    "config": {
      "boot-mode": "rom_hyper",
      "flash_type": "hyper",
      "default_profile": "hyper"
    }
  },
  • Different results for same binary running on target vs. GVSOC!
    GVSOC recognizes correctly a '5' on image 'samples/5223_5.pgm', the gap8 recognizes '0'!
    I havent' found a fix for this.

Error when building mnist using nn tools

in the gap_sdk/examples/nntool/examples/mnist, im trying to compile and run it onto the gap8 but when i run 'make clean all run' im getting an error where it says 'no module named argcomplete' as shown below
image
I tried to install it using pip3 but it says its already installed but I still get the same error afterwards. how do i fix it?

Failed with example/pmsis/helloworld

Hi, I'm a newbie to gap8, I got a gapuino and I was just trying to get it working, but after I followed official sdk instruction, I ran into this issue, looks like target/gap8revc.tcl is missing, is there any extra steps to take before running examples?

Thanks for the help~

Launching execution with command:
openocd -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f interface/ftdi/gapuino_ftdi.cfg -f target/gap8revc.tcl -f tcl/jtag_boot.tcl -c 'gap8_jtag_load_binary_and_start "/gap_sdk/examples/pmsis/helloworld/BUILD/GAP8_V3/GCC_RISCV/test" elf'
Open On-Chip Debugger 0.10.0+dev-00015-gf04b0ae6 (2020-05-20-10:43)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:26: Error: Can't find target/gap8revc.tcl
in procedure 'script'
at file "embedded:startup.tcl", line 26
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:209: recipe for target 'run' failed
make: *** [run] Error 1

Problem using PLPBRIDGE

Hi,

I acquired the GAPuino board recently (end of November 2019) and I am in the process of familiarizing myself with the board and the applications within the SDK.(using Ubuntu 16.04 VM, USB 3.0)
I sourced /configs/gapuino_v2.sh and sourceme.sh.
The installation of the toolchain is successfully passed, however, by manipulating the Mnist application (/examples/autotiler/Mnist) I cannot change the inference input image :

origin declaration
#define IMG_DIR test_img
#define NUM_DIR 6
#define NUM_PIC 1578
my modifications
#define IMG_DIR test_img
#define NUM_DIR 2
#define NUM_PIC 1574

Then, I tested the Bridge connection with the program "test_bridge.c" ("examples/native/pulpos/bridge"). The program does not run, there is no display after "GAP8" of the script tools/runner/run_gapuino.sh. Even with the plpbridge command executed on another terminal, nothing happens after "Connecting to bridge". However, I get the following error:

$ plpbridge-rt --binary=~/gap_sdk/examples/native/p lpos/bridge/BUILD/GAP8_V2/GCC_RISCV --chip=gap

/home/osboxes/gap_sdk/install/workstation/bin/plpbridge-rt:25: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "/home/osboxes/gap_sdk/install/workstation/bin/plpbridge-rt", line 96, in
bridge.reqloop()
File "/home/osboxes/gap_sdk/install/workstation/python/bridge/rt_bridge.py", line 60, in reqloop
addr = self._get_binary_symbol_addr('__rt_debug_struct_ptr')
File "/home/osboxes/gap_sdk/install/workstation/python/bridge/rt_bridge.py", line 44, in _get_binary_symbol_addr
with open(binary, 'rb') as file:
IsADirectoryError: [Errno 21] Is a directory: '/home/osboxes/gap_sdk/examples/native/pulpos/bridge/BUILD/GAP8_V2/GCC_RISCV'

Does anyone have a solution to this problem?

Additional question: When running applications such as Hello_World and Mnist, I observed the following warning sometimes:
Warn: Haven't made progress in mpsse_flush () for 2014ms.
What does it mean?

Thanks in advance.

Hwce problem for WaterMeter application

Hi,
I am trying to make the WaterMeter example works but i have some issues :
When i do a "make", i have the error "make: *** [.../gap_sdk/applications/WaterMeter/BUILD/GAP8_V2/GCC_RISCV//.../gap_sdk/tools/autotiler_v2/generators/CNN/kernels/src/CNN_HwCE.o] Error 1" ('...' is for the gap_sdk localisation).

I think i have this problem because of CNN_HwCE.c. Some headers functions may not be up to date ? (I have "make" errors like "error: too few arguments to function 'hwce_gen_config0_set'
hwce_gen_config0_set("
).

Furthermore, i succed to make it works when i removing the line "PULP_APP_SRCS += $(MNIST_KER_PATH)/src/CNN_HwCE.c" from the Makefile.

Thanks for your help

FaceDetection failed

I have tested the CannyEdgeDetection application successfully.But the FaceDetection failed.

e2361edd9d576b3b5e29bee8c2c4716

There is also a problem when I run the FaceDetection on the gvsoc platform,

d92a7154733dee2a91187746f050881

What should I do?

nntool example fails

Making the NNTool Example fails with
Error: CNN_LinearReLU Kernel: S3_Linear_10x64x4x4, Can't find a matching basic kernel

Python Code for KWS using NNTool?

Hi,
I see that the documentation for the KWS example says to use TF2GAP8 tool to convert the trained CNN model to GAP8 files.
Is there a version of the same example that uses NNTool instead of using TF2GAP8 ? When will that code be released ?
Thanks

flash with openocd documentation

Hi!

The documentation how to flash an application on the hyperflash on the gap8 with openocd seems to be a bit outdated (https://github.com/GreenWaves-Technologies/gap_sdk/tree/master/tools/gap8-openocd-tools).

  • tcl_scripts folder doesn't exist (is now /tcl since dev 3.2)
  • gap_flasher_ctrl is not there anymore. (should be gap_flash_raw?)
  • if the application is made with make all, there is no *.raw image produced... which file should be used to flash
  • how does one acquire the image size ? Is this the actual size of the *.raw, *.bin etc?

I guess the general instructions should be a bit more clearer. Right now it is not clear that you have to run the openocd in one terminal and load the binaries in a other. Currently also instructions how to load binaries is also missing.

Would be nice if there would be something like 'make flash', as easy as 'make run', but maybe I missed it.

gap8-openocd-tools issue

Hi. I am attempting to enable hyperflash boot on the version 2 Gapuino board following the instructions here: https://github.com/GreenWaves-Technologies/gap_sdk/blob/master/tools/gap8-openocd-tools/README

After compiling openocd in the gap8-openocd directory, I attempted to run the first openocd example from the gap8-openocd-tools directory:

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/gap8revb.tcl -f ./tcl_scripts/jtag_boot.tcl

First, the path to the local tcl directory appears to be incorrect in the README. The command looks like it should be as shown below based on the current directory names:

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/gap8revb.tcl -f ./tcl/jtag_boot.tcl

With this fix to the command, I get the error below:

Open On-Chip Debugger 0.10.0+dev-00003-g5c5f57b-dirty (2020-02-29-14:41)
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 ''

Next, first part of the process to fuse for hyperflash boot says to run openocd with the arguments:

interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/gap8revb.tcl -f ./tcl_scripts/jtag_boot.tcl -f ./tcl_scripts/fuser.tcl -f ./tcl_scripts/fuser_flash.tcl

This also looks incorrect. There is a missing leading -f and the tcl directory is again incorrect. It looks like the full command should be:

openocd -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/gap8revb.tcl -f ./tcl/jtag_boot.tcl -f ./tcl/fuser.tcl -f ./tcl/fuser_flash.tcl

I get the same error running this as for the first command:

Open On-Chip Debugger 0.10.0+dev-00003-g5c5f57b-dirty (2020-02-29-14:41)
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 ''

The gapunio is connected and I am able to compile, load and run code examples using "make all run". My lsusb output is below.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Please let me know what the fix is.

Thank you!

Documentation for NNTools

Hi,

I plan to use a tensorflow model to deploy on gap8. I was hoping to use nntools for model conversion from tensorflow to gap8 format, but I could not find any documentation. Any help regarding the model conversion or nntools documentation is appreciated.

Thanks

Missing FlatBuffers Builder module

Builder module seems to be missing in gap_sdk/tools/nntool/flatbuffers/ when compiling gap_sdk/examples/nntool/mnist:

Traceback (most recent call last):
  File "/home/greenwaves/gap_sdk/tools/nntool/nntool", line 86, in <module>
    main()
  File "/home/greenwaves/gap_sdk/tools/nntool/nntool", line 76, in main
    mod = importlib.import_module('interpreter.nntool_shell')
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/greenwaves/gap_sdk/tools/nntool/interpreter/nntool_shell.py", line 27, in <module>
    from importer.importer import create_graph
  File "/home/greenwaves/gap_sdk/tools/nntool/importer/importer.py", line 9, in <module>
    from .tflite.new_tflite_graph_all import create_graph as create_tflite_graph
  File "/home/greenwaves/gap_sdk/tools/nntool/importer/tflite/new_tflite_graph_all.py", line 41, in <module>
    from .tflite_schema_head import\
  File "/home/greenwaves/gap_sdk/tools/nntool/importer/tflite/tflite_schema_head/ConcatenationOptions.py", line 5, in <module>
    import flatbuffers
  File "/home/greenwaves/gap_sdk/tools/nntool/flatbuffers/__init__.py", line 15, in <module>
    from .builder import Builder
ModuleNotFoundError: No module named 'flatbuffers.builder'
model_rules.mk:57: recipe for target 'BUILD_MODEL_8BIT/Mnist.json' failed
make: *** [BUILD_MODEL_8BIT/Mnist.json] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.