Coder Social home page Coder Social logo

Comments (15)

Yaooooo avatar Yaooooo commented on September 25, 2024

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:

  1. Install the SDK: just clone, source sourceme.sh (chose 3-GAPUINO_V3) and make all
    • I got one issue in install, is the openocd install need gcc/g++ 9, but in ubuntu 22, it's gcc-11 by default. So I have installed the gcc-9, which resolve my install issue.
  2. Then I just do make all run in helloworld, and it works as expected:
    yao@yao ~/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld (master)$make all run
    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 --image --binary=/home/yao/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/test
    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 --flash --binary=/home/yao/projects/sdk/gap_sdk_github/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/yao/projects/sdk/gap_sdk_github/examples/gap8/basic/helloworld/BUILD/GAP8_V3/GCC_RISCV_PULPOS/target.board.devices.flash.img 30752 /home/yao/projects/sdk/gap_sdk_github/utils/openocd_tools; exit;"
    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
GAP8 INIT TARGET
GAP8 examine target
Init jtag
Initialising GAP8 JTAG TAP

begining flash session (hyperflash)

load flasher to L2 memory
Loading binary through JTAG
[Flahser]: Hyperflash flasher is ready
Instruct flasher to begin flash per se
device struct address is 470047192
going to wait on addr GAP_RDY
loading image to flash - addr 469784844 - copied 30752 / 30752 Bytes - 100.00 %[Flahser]: flasher is done
flasher is done, exiting

flasher is done!


Reset CONFREG to 0

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:

  1. Can you open a fresh terminal and reconfigure the env, then give it a try? Sometimes, we have some env issue when a terminal is configured several times.
  2. Can you try to run this manually? (Of course, please change the path to yours accordingly)
    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'

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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?

from gap_sdk.

Yaooooo avatar Yaooooo commented on September 25, 2024

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.

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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.

from gap_sdk.

Yaooooo avatar Yaooooo commented on September 25, 2024

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.

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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.
WhatsApp Image 2023-06-07 at 13 21 28
WhatsApp Image 2023-06-07 at 13 21 28 (1)

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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
main()
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/nntool/scripts/nntool", line 89, in main
mod.generate_code(args)
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/nntool/nntool/interpreter/generator.py", line 72, in generate_code
nntool_shell.load_state_file(args.graph_file)
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/tools/nntool/nntool/interpreter/nntool_shell_base.py", line 374, in load_state_file
with open(filepath) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'BUILD_MODEL_SQ8BIT/mnist.json'
make: *** [../common/model_rules.mk:56: BUILD_MODEL_SQ8BIT/mnistModel.c] Error 1

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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 -D__PLATFORM_BOARD__ -D__RT_IODEV__=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -D__riscv__ -D__GAP__ -D__GAP8__ -DCHIP_VERSION=3 -mnativeomp -D__pulp__ -DCONFIG_GAP -D__PULP_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 -D__PLATFORM_BOARD__ -D__RT_IODEV__=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -D__riscv__ -D__GAP__ -D__GAP8__ -DCHIP_VERSION=3 -mnativeomp -D__pulp__ -DCONFIG_GAP -D__PULP_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
main()
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 152, in main
operationFunc(args, config, system)
File "/home/enzo/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/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/rules/pulp_rules.mk:246: flash_fs] Error 1

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>

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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 -D__PLATFORM_BOARD__ -D__RT_IODEV__=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -D__riscv__ -D__GAP__ -D__GAP8__ -DCHIP_VERSION=3 -mnativeomp -D__pulp__ -DCONFIG_GAP -D__PULP_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 -D__PLATFORM_BOARD__ -D__RT_IODEV__=2 -fno-jump-tables -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -mchip=gap8 -mPE=8 -mFC=1 -D__riscv__ -D__GAP__ -D__GAP8__ -DCHIP_VERSION=3 -mnativeomp -D__pulp__ -DCONFIG_GAP -D__PULP_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
main()
File "/home/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/gapy/gapy", line 152, in main
operationFunc(args, config, system)
File "/home/enzo/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/enzo/gap_riscv_toolchain_ubuntu/gap_sdk/utils/rules/pulp_rules.mk:246: flash_fs] Error 1

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 #389 (comment)).

However when running on the board, most of the time they get stuck.

Is it because the board is too old?

from gap_sdk.

Yaooooo avatar Yaooooo commented on September 25, 2024

Let's address them one by one:

  1. 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?

  1. 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.

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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?

from gap_sdk.

Yaooooo avatar Yaooooo commented on September 25, 2024

"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.

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.

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

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.

from gap_sdk.

Yaooooo avatar Yaooooo commented on September 25, 2024

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/)

from gap_sdk.

enzoniko avatar enzoniko commented on September 25, 2024

Okay, thanks for all the help, I will take this topic to the email channel.

from gap_sdk.

Related Issues (20)

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.