注意:如果没有一个硬件板子,谈何学习TinyML,当然,实验中不烧录到F746NG也是可以跑的,图形驱动不兼容而已.
默认的工程有点问题,需要稍微修改,文件地址:tensorflow/lite/micro/examples/hello_world/disco_f746ng/Makefile.inc
由于我没有F746NG DISCO实测,所以这个就算注释不要也关系不大,他只关乎于显示.
# Settings for the Discovery STM32F746NG board.
ifeq ($(TARGET),$(filter $(TARGET),disco_f746ng))
hello_world_MBED_PROJECT_FILES += \
BSP_DISCO_F746NG.lib \
LCD_DISCO_F746NG.lib
endif
编译项目:
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=mbed OPTIMIZED_KERNEL_DIR=cmsis_nn generate_hello_world_mbed_project
接下来记得安装Mbed CLI和对应的交叉编译工具(根据TFLite,对版本有要求.),然后其他安装官方指导编译就能过,编译时候很多WARNING是有用的.
其中一个比较迷人错误是__SXTB16_RORn定义找不到,这个定义明明在头文件有,后来方法是用/root/tensorflow/tensorflow/lite/micro/tools/make/downloads/cmsis/CMSIS/Core/Include/cmsis_gcc.h的文件覆盖/root/tensorflow/tensorflow/lite/micro/tools/make/gen/mbed_cortex-m4_default/prj/hello_world/mbed/mbed-os/cmsis/TARGET_CORTEX_M/cmsis_gcc.h的文件.
编译成功如图:
再把bin粘贴到识别出来的Mbed U盘里面就可以跑了,通过串口工具能看到输出.
有屏幕的话应该已经看到内容了.
I am trying for a long time to talk to you. I really loved your fake seeder python software.
I want to discuss some things with you. Please let’s Have a conversation over email.
Thank you, I am from Bangladesh. Translating into Chinese for your comfort.
我想和你说话很久了。我真的很喜欢你的假播种机 python 软件。
我想和你讨论一些事情。请让我们通过电子邮件进行对话。
谢谢,我来自孟加拉国。为了您的舒适,翻译成中文。
@Mohammad Fahim If you’re interested, I can send you a test code, but it’s not perfect yet, because some PT sites will be judged as cheating.