Hey guys.
I have a STM32F746 Disco board and I just tried to follow a beginners tutorial from TensorFlow Lite for this board: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/examples/hello_world/README.md#deploy-to-STM32F746
When I follow this tutorial until I’m supposed to compile it, then I get the following compilation errors:
$ sudo mbed compile -m DISCO_F746NG -t GCC_ARM -v [mbed] Working path "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed" (library) [mbed] Program path "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed" [mbed] Exec "/usr/bin/python -u /home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/make.py -t GCC_ARM -m DISCO_F746NG --source . --build ./BUILD/DISCO_F746NG/GCC_ARM -v" in "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed" [Warning] @,: Compiler version mismatch: Have 4.9.3; expected version >= 9.0.0 and < 10.0.0 Building project mbed (DISCO_F746NG, GCC_ARM) Scan: mbed Macros: -DDEVICE_CRC=1 -DTARGET_STM32F746xG -DDEVICE_I2C_ASYNCH=1 -DDEVICE_EMAC=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -D__FPU_PRESENT=1 -DDEVICE_PORTOUT=1 -DDEVICE_PORTINOUT=1 -D__MBED_CMSIS_RTOS_CM -DTARGET_DISCO_F746NG -DCOMPONENT_FLASHIAP=1 -DTARGET_STM32F7 -DDEVICE_MPU=1 -DDEVICE_SERIAL_ASYNCH=1 -D__CMSIS_RTOS -DTARGET_N25Q128A -DTOOLCHAIN_GCC -DDEVICE_CAN=1 -DARM_MATH_CM7 -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M7 -DDEVICE_RTC=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_QSPI=1 -DTARGET_M7 -DCOMPONENT_PSA_SRV_IMPL=1 -DEXTRA_IDLE_STACK_REQUIRED -DDEVICE_LPTICKER=1 -DDEVICE_PWMOUT=1 -DDEVICE_SPI_ASYNCH=1 -DMBED_TICKLESS -DUSE_FULL_LL_DRIVER -DCOMPONENT_QSPIF=1 -DTARGET_CORTEX -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -DDEVICE_USBDEVICE=1 -DDEVICE_STDIO_MESSAGES=1 -D__CORTEX_M7 -DTARGET_FAMILY_STM32 -DUSE_HAL_DRIVER -DTARGET_FF_ARDUINO -DHSE_VALUE=25000000 -DTARGET_RELEASE -DTARGET_STM -DTARGET_NAME=DISCO_F746NG -DDEVICE_SERIAL_FC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -DDEVICE_TRNG=1 -DTARGET_LIKE_MBED -DTARGET_RTOS_M4_M7 -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DDEVICE_RESET_REASON=1 -DDEVICE_SPI=1 -DCOMPONENT_NSPE=1 -DDEVICE_INTERRUPTIN=1 -DMBED_BUILD_TIMESTAMP=1589099111.94 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DDEVICE_PORTIN=1 -DSTM32F746xx Compile [ 6.2%]: AnalogIn.cpp Compile: /usr/bin/arm-none-eabi-g++ -c -std=gnu++14 -fno-rtti -Wvla -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -ffunction-sections -fdata-sections -funsigned-char -MMD -fomit-frame-pointer -Os -g -DMBED_TRAP_ERRORS_ENABLED=1 -DMBED_MINIMAL_PRINTF -mcpu=cortex-m7 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -DMBED_ROM_START=0x8000000 -DMBED_ROM_SIZE=0x100000 -DMBED_ROM1_START=0x200000 -DMBED_ROM1_SIZE=0x100000 -DMBED_RAM_START=0x20010000 -DMBED_RAM_SIZE=0x40000 -DMBED_RAM1_START=0x20000000 -DMBED_RAM1_SIZE=0x10000 -DDEVICE_CRC=1 -DTARGET_STM32F746xG -DDEVICE_I2C_ASYNCH=1 -DDEVICE_EMAC=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -D__FPU_PRESENT=1 -DDEVICE_PORTOUT=1 -DDEVICE_PORTINOUT=1 -D__MBED_CMSIS_RTOS_CM -DTARGET_DISCO_F746NG -DCOMPONENT_FLASHIAP=1 -DTARGET_STM32F7 -DDEVICE_MPU=1 -DDEVICE_SERIAL_ASYNCH=1 -D__CMSIS_RTOS -DTARGET_N25Q128A -DTOOLCHAIN_GCC -DDEVICE_CAN=1 -DARM_MATH_CM7 -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M7 -DDEVICE_RTC=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_QSPI=1 -DTARGET_M7 -DCOMPONENT_PSA_SRV_IMPL=1 -DEXTRA_IDLE_STACK_REQUIRED -DDEVICE_LPTICKER=1 -DDEVICE_PWMOUT=1 -DDEVICE_SPI_ASYNCH=1 -DMBED_TICKLESS -DUSE_FULL_LL_DRIVER -DCOMPONENT_QSPIF=1 -DTARGET_CORTEX -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -DDEVICE_USBDEVICE=1 -DDEVICE_STDIO_MESSAGES=1 -D__CORTEX_M7 -DTARGET_FAMILY_STM32 -DUSE_HAL_DRIVER -DTARGET_FF_ARDUINO -DHSE_VALUE=25000000 -DTARGET_RELEASE -DTARGET_STM -DTARGET_NAME=DISCO_F746NG -DDEVICE_SERIAL_FC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -DDEVICE_TRNG=1 -DTARGET_LIKE_MBED -DTARGET_RTOS_M4_M7 -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DDEVICE_RESET_REASON=1 -DDEVICE_SPI=1 -DCOMPONENT_NSPE=1 -DDEVICE_INTERRUPTIN=1 -DMBED_BUILD_TIMESTAMP=1589099111.94 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DDEVICE_PORTIN=1 -DSTM32F746xx @./BUILD/DISCO_F746NG/GCC_ARM/.includes_263b06d2a7f3abbd697a3b06e7c1cd39.txt -include ./BUILD/DISCO_F746NG/GCC_ARM/mbed_config.h -MD -MF BUILD/DISCO_F746NG/GCC_ARM/mbed-os/drivers/source/AnalogIn.d -o BUILD/DISCO_F746NG/GCC_ARM/mbed-os/drivers/source/AnalogIn.o ./mbed-os/drivers/source/AnalogIn.cpp [Error] mstd_type_traits@210,12: 'std::is_trivially_copyable' has not been declared [Error] mstd_type_traits@227,12: 'std::is_trivially_constructible' has not been declared [Error] mstd_type_traits@228,12: 'std::is_trivially_default_constructible' has not been declared [Error] mstd_type_traits@229,12: 'std::is_trivially_copy_constructible' has not been declared [Error] mstd_type_traits@230,12: 'std::is_trivially_move_constructible' has not been declared [Error] mstd_type_traits@231,12: 'std::is_trivially_assignable' has not been declared [Error] mstd_type_traits@232,12: 'std::is_trivially_copy_assignable' has not been declared [Error] mstd_type_traits@233,12: 'std::is_trivially_move_assignable' has not been declared [DEBUG] Return: 1 [DEBUG] Output: In file included from ./mbed-os/platform/mbed_atomic.h:883:0, [DEBUG] Output: from ./mbed-os/platform/SingletonPtr.h:24, [DEBUG] Output: from ./mbed-os/drivers/AnalogIn.h:25, [DEBUG] Output: from ./mbed-os/drivers/source/AnalogIn.cpp:18: [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:210:12: error: 'std::is_trivially_copyable' has not been declared [DEBUG] Output: using std::is_trivially_copyable; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:227:12: error: 'std::is_trivially_constructible' has not been declared [DEBUG] Output: using std::is_trivially_constructible; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:228:12: error: 'std::is_trivially_default_constructible' has not been declared [DEBUG] Output: using std::is_trivially_default_constructible; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:229:12: error: 'std::is_trivially_copy_constructible' has not been declared [DEBUG] Output: using std::is_trivially_copy_constructible; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:230:12: error: 'std::is_trivially_move_constructible' has not been declared [DEBUG] Output: using std::is_trivially_move_constructible; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:231:12: error: 'std::is_trivially_assignable' has not been declared [DEBUG] Output: using std::is_trivially_assignable; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:232:12: error: 'std::is_trivially_copy_assignable' has not been declared [DEBUG] Output: using std::is_trivially_copy_assignable; [DEBUG] Output: ^ [DEBUG] Output: ./mbed-os/platform/cxxsupport/mstd_type_traits:233:12: error: 'std::is_trivially_move_assignable' has not been declared [DEBUG] Output: using std::is_trivially_move_assignable; [DEBUG] Output: ^ Traceback (most recent call last): File "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/make.py", line 76, in wrapped_build_project *args, **kwargs File "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/build_api.py", line 618, in build_project objects = toolchain.compile_sources(resources, sorted(resources.get_file_paths(FileType.INC_DIR))) File "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/toolchains/mbed_toolchain.py", line 418, in compile_sources return self._compile_sources(resources, inc_dirs=inc_dirs) File "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/toolchains/mbed_toolchain.py", line 495, in _compile_sources return self.compile_queue(queue, objects) File "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/toolchains/mbed_toolchain.py", line 566, in compile_queue raise ToolException(err) ToolException: In file included from ./mbed-os/platform/mbed_atomic.h:883:0, from ./mbed-os/platform/SingletonPtr.h:24, from ./mbed-os/drivers/AnalogIn.h:25, from ./mbed-os/drivers/source/AnalogIn.cpp:18: ./mbed-os/platform/cxxsupport/mstd_type_traits:210:12: error: 'std::is_trivially_copyable' has not been declared using std::is_trivially_copyable; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:227:12: error: 'std::is_trivially_constructible' has not been declared using std::is_trivially_constructible; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:228:12: error: 'std::is_trivially_default_constructible' has not been declared using std::is_trivially_default_constructible; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:229:12: error: 'std::is_trivially_copy_constructible' has not been declared using std::is_trivially_copy_constructible; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:230:12: error: 'std::is_trivially_move_constructible' has not been declared using std::is_trivially_move_constructible; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:231:12: error: 'std::is_trivially_assignable' has not been declared using std::is_trivially_assignable; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:232:12: error: 'std::is_trivially_copy_assignable' has not been declared using std::is_trivially_copy_assignable; ^ ./mbed-os/platform/cxxsupport/mstd_type_traits:233:12: error: 'std::is_trivially_move_assignable' has not been declared using std::is_trivially_move_assignable; ^ [mbed] ERROR: "/usr/bin/python" returned error. Code: 1 Path: "/home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed" Command: "/usr/bin/python -u /home/SMT32F7/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4/prj/hello_world/mbed/mbed-os/tools/make.py -t GCC_ARM -m DISCO_F746NG --source . --build ./BUILD/DISCO_F746NG/GCC_ARM -v" ---
I’m using the GCC 6.5.0. Does anyone of you know how to fix this?