Open cg-laser opened 4 years ago
I'm having a similar issue and would love to see an answer!
As a side note, how did you downgrade your toolchain? I've downloaded GCC ARM None Eabi v9.2.1, and I tried pointing to it in several ways.
mbed config -G GCC_ARM_PATH ~/Documents/skole/master_thesis/arm_mbed/gcc-arm
-G
. MBED_GCC_ARM_PATH
, I'm still not sure which is used/bin
folder of that pathNone of these attempts seemed to change anything, though. I'm getting [Warning] @,: Compiler version mismatch: Have 6.3.1; expected version >= 9.0.0 and < 10.0.0
no matter what I do. Also, isn't it weird that it is requiring a version between 9 and 10? Most threads I've seen say only version 6 is supported.
For the record, I'm working on a different uTensor example, the one from this guide: https://www.hackster.io/news/simple-neural-network-on-mcus-a7cbd3dc108c
I'm guessing the underlying issue is the same though, and I didn't have any better luck trying this simple_cnn_tutorial
. My error message is slightly different:
mbed compile --target NRF52_DK --toolchain GCC_ARM -f finn@Finns-MacBook-Pro
[mbed] Working path "/Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor" (library)
[mbed] Program path "/Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor"
[Warning] @,: Compiler version mismatch: Have 6.3.1; expected version >= 9.0.0 and < 10.0.0
Building project my_uTensor (NRF52_DK, GCC_ARM)
Scan: my_uTensor
Compile [ 0.3%]: ESP8266.cpp
[Error] ctime@62,11: '::tm' has not been declared
[Error] ctime@64,11: '::clock' has not been declared
[Error] ctime@65,11: '::difftime' has not been declared
[Error] ctime@66,11: '::mktime' has not been declared
[Error] ctime@67,11: '::time' has not been declared
[Error] ctime@68,11: '::asctime' has not been declared
[Error] ctime@69,11: '::ctime' has not been declared
[Error] ctime@70,11: '::gmtime' has not been declared
[Error] ctime@71,11: '::localtime' has not been declared
[Error] ctime@72,11: '::strftime' has not been declared
[Error] time.h@29,32: 'tm' was not declared in this scope
[Error] time.h@29,36: expected primary-expression before 'const'
[Error] time.h@34,33: variable or field 'LocalTime' declared void
[Error] time.h@34,33: 'tm' was not declared in this scope
[Error] time.h@34,37: 't' was not declared in this scope
[Error] time.h@34,52: expected primary-expression before 'time'
[Error] time.h@39,30: variable or field 'GMTime' declared void
[Error] time.h@39,30: 'tm' was not declared in this scope
[Error] time.h@39,34: 't' was not declared in this scope
[Error] time.h@39,49: expected primary-expression before 'time'
[ERROR] In file included from ./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:19:0,
from ./mbed-os/platform/mbed_retarget.h:80,
from ./mbed-os/platform/platform.h:26,
from ./mbed-os/drivers/UARTSerial.h:21,
from ./mbed-os/components/wifi/esp8266-driver/ESP8266/ESP8266.h:23,
from ./mbed-os/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp:26:
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:62:11: error: '::tm' has not been declared
using ::tm;
^~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:64:11: error: '::clock' has not been declared
using ::clock;
^~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:65:11: error: '::difftime' has not been declared
using ::difftime;
^~~~~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:66:11: error: '::mktime' has not been declared
using ::mktime;
^~~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:67:11: error: '::time' has not been declared
using ::time;
^~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:68:11: error: '::asctime' has not been declared
using ::asctime;
^~~~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:69:11: error: '::ctime' has not been declared
using ::ctime;
^~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:70:11: error: '::gmtime' has not been declared
using ::gmtime;
^~~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:71:11: error: '::localtime' has not been declared
using ::localtime;
^~~~~~~~~
/usr/local/Cellar/arm-gcc-bin/6-2017-q2-update/arm-none-eabi/include/c++/6.3.1/ctime:72:11: error: '::strftime' has not been declared
using ::strftime;
^~~~~~~~
In file included from ./mbed-os/platform/mbed_retarget.h:80:0,
from ./mbed-os/platform/platform.h:26,
from ./mbed-os/drivers/UARTSerial.h:21,
from ./mbed-os/components/wifi/esp8266-driver/ESP8266/ESP8266.h:23,
from ./mbed-os/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp:26:
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:29:32: error: 'tm' was not declared in this scope
AWS_CORE_API time_t TimeGM(tm* const t);
^~
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:29:36: error: expected primary-expression before 'const'
AWS_CORE_API time_t TimeGM(tm* const t);
^~~~~
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:34:33: error: variable or field 'LocalTime' declared void
AWS_CORE_API void LocalTime(tm* t, std::time_t time);
^~
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:34:33: error: 'tm' was not declared in this scope
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:34:37: error: 't' was not declared in this scope
AWS_CORE_API void LocalTime(tm* t, std::time_t time);
^
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:34:52: error: expected primary-expression before 'time'
AWS_CORE_API void LocalTime(tm* t, std::time_t time);
^~~~
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:39:30: error: variable or field 'GMTime' declared void
AWS_CORE_API void GMTime(tm* t, std::time_t time);
^~
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:39:30: error: 'tm' was not declared in this scope
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:39:34: error: 't' was not declared in this scope
AWS_CORE_API void GMTime(tm* t, std::time_t time);
^
./venv/lib/python3.7/site-packages/tensorflow/include/external/aws/aws-cpp-sdk-core/include/aws/core/platform/time.h:39:49: error: expected primary-expression before 'time'
AWS_CORE_API void GMTime(tm* t, std::time_t time);
^~~~
[mbed] ERROR: "/Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor/venv/bin/python3" returned error.
Code: 1
Path: "/Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor"
Command: "/Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor/venv/bin/python3 -u /Users/finn/Documents/skole/master_thesis/arm_mbed/my_uTensor/mbed-os/tools/make.py -t GCC_ARM -m NRF52_DK --source . --build ./BUILD/NRF52_DK/GCC_ARM"
Tip: You could retry the last command with "-v" flag for verbose output
I can't get this example to work. I'm not sure if this is because of inconsistencies with newer dependencies but everything I tried was unsuccessful. This is what I tried so far:
The first error I get when following the example step by step is
which is because tensorflow 2.1.0 was installed by
pip install utensor_cgen==0.3.3.dev2
So I downgraded tensorflow to 1.13.2 but then I just run into the next error:
I get the same error also for python 3.7.3.
I then tried upgrading utensor_cgen to the latest release, but this also crashes maybe because it is not python2.7 compatible anymore?
With python3 I upgraded utensor_cgen to the latest version which also downgraded tensorflow to 1.13.1
Successfully installed graphviz-0.13.2 onnx-tf-1.2.1 tensorflow-1.13.1 toml-0.10.0 utensor-cgen-0.4.2
This allows to execute
utensor-cli convert cifar10_cnn.pb --output-nodes fully_connect_2/logits
without errors.However, the compilation of the mbed code then crashes with
Maybe this is because my compiler version is too high?
[Warning] @,: Compiler version mismatch: Have 9.2.1; expected version >= 6.0.0 and < 7.0.0
So I downgraded my GCC_ARM toolchain to 6.3.1 but I still get the same error.Any help would be greatly appreciated!