Open enzoniko opened 1 year ago
Hi,
Sorry for late reply, we don't have enough resources to answer all the tickets in real time, sorry about this. I saw you have closed this, but also noticed that you have send one request via our site, so the issue is not resolved, correct?
It's very hard to say what's happening on your end with the trace, all your steps seems correct. So I have quickly tested from scrach on my PC (just re-installed everything) with Ubuntu22, and it works fine. Here's my steps:
GAP8 examine target
RESET: jtag boot mode=3
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
gapy --target=gapuino_v3 --platform=board --work-dir=/home/yao/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS run --exec-prepare --exec --binary=/home/yao/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
Launching execution with command:
gap8-openocd -d0 -c 'gdb_port disabled; telnet_port disabled; tcl_port disabled' -f interface/ftdi/gapuino_ftdi.cfg -f target/gap8revb.tcl -f tcl/jtag_boot_entry.tcl -c 'gap8_jtag_load_binary_and_start "/home/yao/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test" elf 0x1c000080'
Open On-Chip Debugger 0.10.0+dev-gb84d97ec4 (2023-06-07-10:53)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
DEPRECATED! use 'adapter driver' not 'interface' DEPRECATED! use 'adapter speed' not 'adapter_khz' DEPRECATED! use 'adapter driver' not 'interface' TARGET create 0 GAP8 INIT TARGET GAP8 examine target Init jtag Initialising GAP8 JTAG TAP Loading binary through JTAG
*** PMSIS HelloWorld ***
Entering main controller [32 0] Hello World! Perf : 45844 cycles Timer : 49520 cycles Cluster master core entry [0 3] Hello World! [0 7] Hello World! [0 4] Hello World! [0 5] Hello World! [0 2] Hello World! [0 1] Hello World! [0 0] Hello World! [0 6] Hello World! Cluster master core exit Test success !
Suggestion:
Hi, thanks for the reply. I've managed to solve the helloworld issue, there was a comma wrong in the configuration file for the board I am using (gapuino.json), however it is quite inconsistent, some times it gets stuck loading the flash image.
I've made a guide for my colleagues to facilitate the setup of the SDK for our board (gap8 gapuino v1), this guide can be used to recreate the exact steps I've made to get to the current state that I am working on with the board. I'm gonna attach this guide here: GAP8.md . I don't know if you have access to the physical board, but with it you might be able to recreate the inconsistency.
Since I've got to make this board work for ML applications due to friday, I've ignored this inconsistency (that's why I closed the issue, even if it's not 100% solved) and started working on making the nntool and autotiler examples work as well. And I'm having some trouble with those examples now. Could you help me with those?
Sure, you can write your questions here? Or you want to have a mail channel?
BTW, in your GAP8.md, this is not necessary:
git clone https://github.com/GreenWaves-Technologies/gap8_openocd.git cd gap8_openocd ./bootstrap ./configure --program-prefix=gap8- --prefix=/usr --datarootdir=/usr/share/gap8-openocd make -j sudo make -j install
You can use make openocd.all
in sdk, it will do all the job. BUT, you need gcc-9 as I described in previous ticket.
Furthermore, are you sure that you are using GAPuino V1? Can you re-try everything with GAPuinoV3? I think they are compatible, and v3 has manythings corrected.
Sure, I could write my questions here, this way other people could use this in the future.
I'm gonna try to use the make openocd.all
after doing make all
with gcc-9, and try to use v3 (I'm sure I have the v1 though) maybe that solves the inconsistency?
If that works I will update my guide (the simpler the better).
After those tests I will try to execute the nntool and autotiler examples and keep you updated if I find those problems again.
Thanks for the replies.
I think there's a misleading info from our side... The label on GAPuino board, means the PCB version, and there are only 1 or 2 version. So they are almost all written as "Model 1.1". However, it doesn't mean GAPuino v1 in SDK... Sorry for that.
To make it clear, we have 3 versions of GAP8 chip internally, which corresponds to the V1 V2 V3 in SDK... All the GAPuino and GAP8 today we shipped, are all V3. That's why we removed other configs from sourceme.sh.
To make sure this, you can take a very close look on GAP8 chip itself, and on the left bottom, you should able to see "xxxxC" where the C is the version 3.
Okay, I'm sending pictures of the GAPuino that we have because I'm not sure I've identified the version correctly. It is from october 2019.
Okay, I've managed to re-install everything following the tip that the openocd installation is done by the make all
already.
I've also selected v3 in the sourceme.sh (however I'm only using gvsoc because I don't have access to the board right now).
I am trying to run the Neural Network examples (for now in gvsoc), but some of them fail.
basically after all the installation procedure, I install tensorflow and try to run the examples like this:
cd examples/gap8/nn/nntool/mnist
make clean all run platform=gvsoc
And the error is this one:
enzo@ubuntu:~/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/nn/nntool/mnist$ make clean all run platform=gvsoc
Building GAP8 mode with 8 bit quantization
script model/nntool_script
GEN ... /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators/CNN_Generator_Util.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators/CNN_Copy_Generators.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators/SSD_Generators.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Generators/BilinearResizes/ResizeGenerator.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Generators/DSP_Generators.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators_SQ8/CNN_Generators_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators_SQ8/RNN_Generators_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators_fp16/CNN_Generators_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators_fp16/RNN_Generators_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Generators_fp16/SSD_Generators_fp16.c
APP_SRCS... mnist.c BUILD_MODEL_SQ8BIT/mnistKernels.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/libs/gap_lib/img_io/ImgIO.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries/SSD_BasicKernels.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Generators/BilinearResizes/ResizeBasicKernels.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries/CNN_Copy.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_AT_Misc.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/CmplxFunctions.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/MatMulDSP.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/FFT_Library.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/MfccBasicKernels.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/PreProcessing.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/math_funcs.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/pulp_dsp/plp_cos_f32s_xpulpv2.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/pulp_dsp/plp_sin_f32s_xpulpv2.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/pulp_dsp/plp_common_tables.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Activation_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Activation_HWC_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Bias_Linear_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Conv_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_MatMul_Conv_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Pooling_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Conv_DW_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_Conv_DW_Red_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_MatAlgebra_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/CNN_SoftMax_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8/RNN_SQ8.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_Bias_Linear_Activation_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_Conv_BasicKernels_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_Conv_DW_BasicKernels_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_MatMul_Conv_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_MatAlgebra_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_Pooling_BasicKernels_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/CNN_SoftMax_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16/RNN_fp16.c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries/float_math_funcs.c
APP_CFLAGS... -gdwarf-2 -gstrict-dwarf -O3 -mno-memcpy -fno-tree-loop-distribute-patterns -I. -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/libs/gap_lib/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Autotiler -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Generators/BilinearResizes -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/DSP_Libraries -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16 -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_SQ8 -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/CNN_Libraries_fp16 -IBUILD_MODEL_SQ8BIT -DPERF -DAT_MODEL_PREFIX=mnist -DAT_INPUT_HEIGHT=28 -DAT_INPUT_WIDTH=28 -DAT_INPUT_COLORS=1 -DSTACK_SIZE=4096 -DSLAVE_STACK_SIZE=1024 -DAT_IMAGE=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/nn/nntool/mnist/samples/5223_5.pgm
rm -f -rf BUILD_MODEL_SQ8BIT
mkdir BUILD_MODEL_SQ8BIT
cp model/mnist.tflite BUILD_MODEL_SQ8BIT/mnist.tflite
echo "GENERATING NNTOOL STATE FILE"
GENERATING NNTOOL STATE FILE
nntool -s model/nntool_script BUILD_MODEL_SQ8BIT/mnist.tflite
settings - set log level to INFO
log_level - was: 'INFO'
now: 'INFO'
open - opening graph file BUILD_MODEL_SQ8BIT/mnist.tflite load_quantization = False
tflite - Importing TFLITE model version 3
nngraph - update graph dimensions
nngraph - update graph dimensions
nngraph - update graph dimensions
nngraph - update graph dimensions
adjust_order - adding transposes to correct tensor order for AT kernels
eliminate_transposes - found elimination for CONV_2D_0_2_trans_in0 upwards - 2 eliminated
eliminate_transposes - found elimination for CONV_2D_0_2_trans_in1 upwards - 1 eliminated
eliminate_transposes - found elimination for CONV_2D_0_2_trans_out0 downwards - 2 eliminated
eliminate_transposes - found elimination for DEPTHWISE_CONV_2D_0_0_trans_in0 upwards - 1 eliminated
eliminate_transposes - found elimination for DEPTHWISE_CONV_2D_0_0_trans_in1 upwards - 1 eliminated
eliminate_transposes - found elimination for DEPTHWISE_CONV_2D_0_0_trans_out0 downwards - 2 eliminated
eliminate_transposes - found elimination for MAX_POOL_2D_0_3_trans_out0 downwards - 1 eliminated
eliminate_transposes - eliminate transposes
nngraph - update graph dimensions
nngraph - update graph dimensions
eliminate_transposes - no transposes to eliminate found
nngraph - update graph dimensions
nngraph - update graph dimensions
eliminate_transposes - no further transpose sequences found
nngraph - adjusted order
nngraph - update graph dimensions
move_node_up - Node MAX_POOL_2D_0_1 can be moved
move_node_up - Node MAX_POOL_2D_0_3 can be moved
move_node_up - Moving node MAX_POOL_2D_0_1 between DEPTHWISE_CONV_2D_0_0 and DEPTHWISE_CONV_2D_0_0_activation
move_node_up - Moving node MAX_POOL_2D_0_3 between CONV_2D_0_2 and CONV_2D_0_2_activation
matcher - ++ fusion move_pooling_scale8 modified graph
fuse_gap_convs - fusing nodes DEPTHWISE_CONV_2D_0_0,MAX_POOL_2D_0_1,DEPTHWISE_CONV_2D_0_0_activation into DEPTHWISE_CONV_2D_0_0_fusion
fuse_gap_convs - fusing nodes CONV_2D_0_2,MAX_POOL_2D_0_3,CONV_2D_0_2_activation into CONV_2D_0_2_fusion
matcher - ++ fusion fuse_gap_convs modified graph
matcher - ++ fusion scaled_match_group modified graph
input_norm_func - was: ''
now: 'x: x/128-1'
No input files found
nngraph - update graph dimensions
inserted image formatter after node input_1 withformat bw8 and normalization offset_int8
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
graph_warm_construct - was: 0
now: 2
l3_ram_device - was: 'AT_MEM_L3_HRAM'
now: 'AT_MEM_L3_DEFAULTRAM'
l3_flash_device - was: 'AT_MEM_L3_HFLASH'
now: 'AT_MEM_L3_DEFAULTFLASH'
l3_ram_device - was: 'AT_MEM_L3_DEFAULTRAM'
now: 'AT_MEM_L3_DEFAULTRAM'
l3_flash_device - was: 'AT_MEM_L3_DEFAULTFLASH'
now: 'AT_MEM_L3_DEFAULTFLASH'
EXCEPTION of type 'GraphNotReadyException' occurred with message: '
The opened graph must be quantized to use this command. Run the aquant command.
'
To enable full traceback, run the following command: 'set debug true'
echo "GENERATING AUTOTILER MODEL"
GENERATING AUTOTILER MODEL
nntool -g -M BUILD_MODEL_SQ8BIT -m mnistModel.c -T BUILD_MODEL_SQ8BIT/tensors -H mnistInfo.h BUILD_MODEL_SQ8BIT/mnist.json
Traceback (most recent call last):
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/nntool/scripts/nntool", line 107, in
And this is what happened when I tried to run the helloworld example in the board using v3:
enzo@ubuntu:~/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld$ make clean all run platform=board
rm -f /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/flash.img
riscv32-unknown-elf-gcc -DCONFIG_GAPUINO -DRT_FC_STACK_SIZE=2048 -DPLATFORM_BOARD -DRT_IODEV=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -Driscv -DGAP -DGAP8 -DCHIP_VERSION=3 -mnativeomp -Dpulp -DCONFIG_GAP -DPULP_OS__ -MMD -MP -c helloworld.c -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -MD -MF /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.d -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.o
riscv32-unknown-elf-gcc -DCONFIG_GAPUINO -DRT_FC_STACK_SIZE=2048 -DPLATFORM_BOARD -DRT_IODEV=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -Driscv -DGAP -DGAP8 -DCHIP_VERSION=3 -mnativeomp -Dpulp -DCONFIG_GAP -DPULP_OS__ -MMD -MP -c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/gap8/rtos/pulp/pulp-os/kernel/conf.c -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -MD -MF /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.d -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.o
riscv32-unknown-elf-gcc -march=rv32imcxgap8 -mPE=8 -mFC=1 -MMD -MP -Wl,--gc-sections -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.o -L/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/lib/gap/gapuino -lpibsp -L/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/lib/gap -lrt -lrtio -lrt -lgcc -T/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/ld/link.gap8_rev2.ld -T/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h
riscv32-unknown-elf-objdump -d -h -S -t -w --show-raw-insn /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test > /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.s
riscv32-unknown-elf-size -B -x --common /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test > /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.size
riscv32-unknown-elf-nm -a -A -l -S --size-sort --special-syms /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test >> /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.size
gapy --target=gapuino_v3 --platform=board --work-dir=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS run --image --binary=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
gapy --target=gapuino_v3 --platform=board --work-dir=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS run --flash --binary=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
Flashing image with command:
gap8-openocd -d0 -c "gdb_port disabled; telnet_port disabled; tcl_port disabled" -c "script interface/ftdi/gapuino_ftdi.cfg; script target/gap8revb.tcl; script tcl/flash_image.tcl; script tcl/jtag_boot.tcl; gap_flash_raw_hyper /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/target.board.devices.flash.img 30752 /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/openocd_tools; exit;"
Open On-Chip Debugger 0.10.0+dev-gb84d97ec4 (2023-06-07-10:17)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
DEPRECATED! use 'adapter driver' not 'interface' DEPRECATED! use 'adapter speed' not 'adapter_khz' DEPRECATED! use 'adapter driver' not 'interface' TARGET create GAP8 INIT TARGET Error: libusb_open() failed with LIBUSB_ERROR_ACCESS Error: no device found Error: unable to open ftdi device with vid 0403, pid 6010, description '', serial '' at bus location '*'
Traceback (most recent call last):
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 162, in
The same thing now happens when using source configs/gapuino.json
, it really seems like I'm not detecting the board, I think it is related to the openocd installation, probably something with these steps:
#Finally, copy openocd udev rules and reload udev rules
sudo cp /usr/share/gap8-openocd/openocd/contrib/60-openocd.rules /etc/udev/rules.d
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo usermod -a -G dialout <username>
Okay, that was the problem, I had to copy openocd udev rules and reload udev rules
However, after using source sourceme.sh
, selecting v3 and running make clean all
I tried to run the helloworld example in the board and this is the error:
enzo@ubuntu:~/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld$ make clean all run platform=board
rm -f /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/flash.img
riscv32-unknown-elf-gcc -DCONFIG_GAPUINO -DRT_FC_STACK_SIZE=2048 -DPLATFORM_BOARD -DRT_IODEV=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -Driscv -DGAP -DGAP8 -DCHIP_VERSION=3 -mnativeomp -Dpulp -DCONFIG_GAP -DPULP_OS__ -MMD -MP -c helloworld.c -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -MD -MF /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.d -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.o
riscv32-unknown-elf-gcc -DCONFIG_GAPUINO -DRT_FC_STACK_SIZE=2048 -DPLATFORM_BOARD -DRT_IODEV=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -Driscv -DGAP -DGAP8 -DCHIP_VERSION=3 -mnativeomp -Dpulp -DCONFIG_GAP -DPULP_OS__ -MMD -MP -c /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/gap8/rtos/pulp/pulp-os/kernel/conf.c -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -MD -MF /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.d -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.o
riscv32-unknown-elf-gcc -march=rv32imcxgap8 -mPE=8 -mFC=1 -MMD -MP -Wl,--gc-sections -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/io -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/include -I/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/autotiler_v3/Emulation -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h -o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/helloworld.o /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/pulp-os/conf.o -L/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/lib/gap/gapuino -lpibsp -L/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/lib/gap -lrt -lrtio -lrt -lgcc -T/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/ld/link.gap8_rev2.ld -T/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/workstation/ld/gapuino.conf.ld -nostartfiles -nostdlib -include /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/install/GAP8_V3/include/rt/chips/gap8_revc/config.h
riscv32-unknown-elf-objdump -d -h -S -t -w --show-raw-insn /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test > /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.s
riscv32-unknown-elf-size -B -x --common /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test > /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.size
riscv32-unknown-elf-nm -a -A -l -S --size-sort --special-syms /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test >> /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test.size
gapy --target=gapuino_v3 --platform=board --work-dir=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS run --image --binary=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
gapy --target=gapuino_v3 --platform=board --work-dir=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS run --flash --binary=/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
Flashing image with command:
gap8-openocd -d0 -c "gdb_port disabled; telnet_port disabled; tcl_port disabled" -c "script interface/ftdi/gapuino_ftdi.cfg; script target/gap8revb.tcl; script tcl/flash_image.tcl; script tcl/jtag_boot.tcl; gap_flash_raw_hyper /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/target.board.devices.flash.img 30752 /home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/openocd_tools; exit;"
Open On-Chip Debugger 0.10.0+dev-gb84d97ec4 (2023-06-07-10:17)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
DEPRECATED! use 'adapter driver' not 'interface' DEPRECATED! use 'adapter speed' not 'adapter_khz' DEPRECATED! use 'adapter driver' not 'interface' TARGET create GAP8 INIT TARGET GAP8 examine target Init jtag Initialising GAP8 JTAG TAP Error: timed out while waiting for target halted
Traceback (most recent call last):
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 162, in
So I believe it is not compatible with my board unfortunately.
When I manually set the config to configs/gapuino.sh
and then run make clean all
some of the examples work, however I'm still having inconsistencies, and now I can't ignore them, most of the times the examples get stuck. If you have access to the board I have please consider testing it, I've followed those same steps (but this time I've let the SDK installation build openocd), I copied openocd udev rules and reloaded udev rules and installed TensorFlow.
Running the examples on gvsoc works perfectly for some examples (fails for some of them https://github.com/GreenWaves-Technologies/gap_sdk/issues/389#issuecomment-1581262206).
However when running on the board, most of the time they get stuck.
Is it because the board is too old?
Let's address them one by one:
your mnist issue on gvsoc, it's because of this issue in your log:
matcher - ++ fusion scaled_match_group modified graph
input_norm_func - was: ''
now: 'x: x/128-1'
No input files found
So the quantization cannot continue due to the input files missing. This happens when the images folder is created, but no images files were downloaded. Can you rm -rf images
, and retry?
board version
Seems indeed you have a very old evk, because I saw the USB-A connector on the board, which is replaced by micro usb in follow versions. Can you do a request on our website to switch the board? Because I cannot find those boards anymore... so cannot be sure the compatibility with these boards.
Hello, thanks for the answers.
1: Yeah that appears to solve the mnist problem on gvsoc, unfortunately I won't be able to test it on the board for now, but since all the other examples that run on gvsoc do not run on the board, there are no reasons to believe this one would.
Using this command (rm -rf images
) could be a solution whenever I find this error in other examples too?
2: The request on your website to switch the board involves any monetary value? Because then I would need to speak to my boss.
Also, since this is one of the first versions of the board, I understand the incompatibility issues, however, it is logical to assume that some version of the SDK (maybe one of the oldest) shouldn't have those problems, right? If so, could you recommend some version of the SDK I could downgrade to, that I could test?
1. "Using this command (rm -rf images) could be a solution whenever I find this error in other examples too?" Depends! depends on the example, some of them has this mechanism, but not all of them.
2. All works from my side on a new version board. and we are not sure about the old version status and compatibilities. We cannot give a version of SDK and it will also impact on other tools and features.
Okay, and about the board switch in your site, would it be paid? I work for a research laboratory in a public university in Brazil, and if this test was successfull we would probably buy more boards to use on projects. But because of these incompatibilites and issues we were not able to complete the test, therefore a switch to a new version of the board (preferably not paid) could motivate us (if everything worked out) to keep using your boards for our projects.
No, it's free. You just need to ship your board back to us once you received new boards. Let's bring this topic to the email channel (will be opened after your request via our website: https://greenwaves-technologies.com/contacts/)
Okay, thanks for all the help, I will take this topic to the email channel.
Hello, After managing to install gap_sdk successfully, I wanted to test my board with the helloworld example. After a
make all
with no errors, I got to the helloworld directory and attempted to run:make clean all run PMSIS_OS=freertos platform=gvsoc
and it ran perfectly. then I attempted to run:make clean all run PMSIS_OS=freertos platform=board
which failed, the error generated was:Flashing image with command: gap8-openocd -d0 -c "gdb_port disabled; telnet_port disabled; tcl_port disabled" -c "script interface/ftdi/gapuino_ftdi.cfg; script target/gap8revb.tcl; script tcl/flash_image.tcl; script tcl/jtag_boot.tcl; gap_flash_raw_hyper /home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/examples/gap8/basic/helloworld/BUILD/GAP8_V2/GCC_RISCV_FREERTOS/target.board.devices.flash.img 46112 /home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/utils/openocd_tools; exit;" Open On-Chip Debugger 0.10.0+dev-gb84d97ec4 (2023-06-04-13:03) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 0
DEPRECATED! use 'adapter driver' not 'interface' DEPRECATED! use 'adapter speed' not 'adapter_khz' DEPRECATED! use 'adapter driver' not 'interface' TARGET create GAP8 INIT TARGET GAP8 examine target Init jtag Initialising GAP8 JTAG TAP Error: timed out while waiting for target halted
Traceback (most recent call last): File "/home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 162, in
main()
File "/home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 152, in main
operationFunc(args, config, system)
File "/home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/run.py", line 189, in operationFunc
raise RuntimeError('Runner has failed with value: %d' % status)
RuntimeError: Runner has failed with value: -1
make: *** [/home/osboxes/gap_riscv_toolchain_ubuntu/gap_sdk/rtos/freeRTOS/vendors/gwt/rules/freeRTOS_rules.mk:442: flash_fs] Error 1
Can someone help me?