QuickLogic-Corp / arnold-sdk

Repo to support evaluations using Salinas board
Apache License 2.0
0 stars 0 forks source link

build errors in person detection #3

Closed tcal-x closed 4 years ago

tcal-x commented 4 years ago
$ cd tflu-apps/person-detection/
$ make clean
$ make 
...
...
'/opt/riscv/bin/riscv32-unknown-elf-g++' -std=c++11 -DTF_LITE_STATIC_MEMORY -DNDEBUG -O3 -D__riscv__z -march=rv32imfcxpulpv2  -mfdiv -fdata-sections -ffunction-sections -MMD -MP -DTF_LITE_MCU_DEBUG_LOG -DTF_LITE_USE_GLOBAL_CMATH_FUNCTIONS -DTF_LITE_USE_GLOBAL_MAX -DTF_LITE_USE_GLOBAL_MIN -fpermissive -fno-rtti -fno-exceptions --std=gnu++11 -Itensorflow/lite/micro/quicklogic-arnold -I/home/tim/quicklogic/arnold-sdk/pulp-builder/install/include -I/home/tim/quicklogic/arnold-sdk/pulp-builder/hal/include -I/home/tim/quicklogic/arnold-sdk/pulp-builder/archi/include -I/home/tim/quicklogic/arnold-sdk/pulp-builder/install/include/archi/chips/arnold -I. -I./third_party/gemmlowp -I./third_party/flatbuffers/include -I./third_party/ruy  -c tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc -o tensorflow/lite/micro/quicklogic-arnold/programFPGA.o
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc: In function 'void programFPGA(const char*)':
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:62:7: error: 'sprintf' was not declared in this scope
       sprintf(rx_buffer,"LoAd %s\n",design);
       ^~~~~~~
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:63:22: error: 'NULL' was not declared in this scope
       rt_event_alloc(NULL,4);
                      ^~~~
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:63:22: note: suggested alternative: 'N_FLL'
       rt_event_alloc(NULL,4);
                      ^~~~
                      N_FLL
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:63:7: error: 'rt_event_alloc' was not declared in this scope
       rt_event_alloc(NULL,4);
       ^~~~~~~~~~~~~~
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:64:7: error: 'rt_uart_conf_t' was not declared in this scope
       rt_uart_conf_t conf;
       ^~~~~~~~~~~~~~
tensorflow/lite/micro/quicklogic-arnold/programFPGA.cc:64:7: note: suggested alternative: 'timer_conf_set'
       rt_uart_conf_t conf;
       ^~~~~~~~~~~~~~
       timer_conf_set
tcal-x commented 4 years ago

The tensorflow submodule is at 224fd9873557a2e2d8a8fd9f1c6d3e7d2128ccdc.

Should I check out master instead?

gmartin102 commented 4 years ago

This looks like some of the pulp libraries have not been built. Check that the pulp-builder directory and the pulp-builder/install exists. regardless you make want to rerun the arnold-sdk/patch/patch.bash script and then run pulp-builder/scripts/build-runtime to create the appropriate libraries.

tcal-x commented 4 years ago

Thanks Greg, I'll look into this after my morning meetings.

tcal-x commented 4 years ago

Yep, it seems I had trouble with the pulp-builder build --- prettytable:

plpflags gen --input=arnold@config_file=chips/arnold/arnold.json  --config=platform=board  --config=**/rt/type=pulp-rt --output-dir=/home/tim/quicklogic/arnold-sdk/pulp-builder/build/pulp-rt/arnold --makefile=/home/tim/quicklogic/arnold-sdk/pulp-builder/build/pulp-rt/arnold/config.mk  --property=fc/archi  --property=pe/archi  --property=pulp_chip  --property=pulp_chip_family  --property=cluster/version  --property=host/archi  --property=fc_itc/version  --property=udma/hyper/version  --property=udma/cpi/version  --property=udma/i2c/version  --property=soc/fll/version  --property=udma/i2s/version  --property=udma/uart/version  --property=event_unit/version  --property=perf_counters  --property=fll/version  --property=soc/spi_master  --property=soc/apb_uart  --property=padframe/version  --property=udma/spim/version  --property=gpio/version  --property=udma/archi  --property=udma/version  --property=soc_eu/version  --property=compiler  --property=rtc/version  --property=udma/mram/version  --lib=rt  --lib=omp  --lib=rtio  --lib=bench
Traceback (most recent call last):
  File "/home/tim/quicklogic/arnold-sdk/pulp-builder/install/ws/bin/plpflags", line 8, in <module>
    import plptree
  File "/home/tim/quicklogic/arnold-sdk/pulp-builder/install/ws/python/plptree.py", line 25, in <module>
    import Regmap as regmap
  File "/home/tim/quicklogic/arnold-sdk/pulp-builder/install/ws/python/Regmap.py", line 21, in <module>
    from prettytable import PrettyTable
ModuleNotFoundError: No module named 'prettytable'
tcal-x commented 4 years ago

My install.log had this:

---------------install prettytable
Requirement already satisfied: prettytable in /home/tim/.local/lib/python3.8/site-packages (1.0.1)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from prettytable) (45.2.0)
Requirement already satisfied: wcwidth in /usr/lib/python3/dist-packages (from prettytable) (0.1.8)

I'm guessing it's some issue with Python virtual environments, or Python 2 vs 3. I'm somewhat new to this area.

tcal-x commented 4 years ago

I redid a few things, reinstalled python2 and pip, and now it seems to work. At least, make gets me to a message ft2232: ftdi_stream_inout has failed, which probably means it's trying to talk to the board, which I haven't yet hooked up. So in other words, it appears to be compiling correctly.

gmartin102 commented 4 years ago

ftdi_stream errors is indicative of not having the olimex JTAG connected or not mapped to the VM if you your using one. Also issues with the udev stuff can cause this which results in the driver not connected correctly