diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TFlite_Micro_Demo移植参考指南(Keil版).md b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TFlite_Micro_Demo移植参考指南(Keil版).md index c1c3c693..cdf46f70 100644 --- a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TFlite_Micro_Demo移植参考指南(Keil版).md +++ b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TFlite_Micro_Demo移植参考指南(Keil版).md @@ -1,27 +1,29 @@ # TensorFlow Lite Micro移植参考指南(Keil版) -作者: +**作者:** -日期: +Github ID: [Derekduke](https://github.com/Derekduke) E-mail: dkeji627@gmail.com -联系方式: +Github ID: [QingChuanWS](https://github.com/QingChuanWS) E-mail: bingshan45@163.com + +Github ID: [yangqings](https://github.com/yangqings) E-mail: yangqingsheng12@outlook.com ## 概述 本教程是基于STM32 NUCLEO-L496ZG(Cortex-M4, 80Mhz)开发板,在运行TencentOS tiny的基础上,使用Tensorflow Lite Micro框架和CMSIS-NN库(算子加速),在STM32L496ZG上实现了**行人检测模型**的推理。 -关于Tensorflow Lite Micro组件的详细介绍可以参考`TencentOS-tiny\components\tflite_micro`目录下的TFlite_Micro_Component_User_Guide.md文档。 +关于Tensorflow Lite Micro组件的详细介绍可以参考`TencentOS-tiny\components\ai\tflite_micro`目录下的TFlite_Micro_Component_User_Guide.md文档。 本例程中,传入神经网络的RGB图像大小为 18kb(96*96 * 2byte),在STM32L496平台消耗的内存资源(经过优化后)如下: - SRAM:168 Kbyte - Flash:314 Kbyte -理论上满足以b上内存要求的STM32 Cortex-M系列MCU可以参考本指南进行移植。 +理论上满足以上内存要求的STM32 Cortex-M系列MCU可以参考本指南进行移植。 ## 一、移植前的准备 -### 1. 准备目标硬件(开发板/传感器/模组) +#### 1. 准备目标硬件(开发板/传感器/模组) 需要准备如下硬件: @@ -35,24 +37,25 @@ -### 2.准备TencentOS tiny基础keil工程代码 +#### 2.准备TencentOS tiny基础keil工程代码 - 首先,参考TencentOS tiny基于keil的移植教程进行移植: https://github.com/Tencent/TencentOS-tiny/blob/master/doc/10.Porting_Manual_for_KEIL.md -- 值得注意的是,为了方便初始化MCU的外设,后续要继续使用STM32CubeMX软件,请确保安装了该软件; +- 为了方便初始化MCU的外设,后续要继续使用STM32CubeMX软件,请确保安装了该软件; - 移植成功后,工程可以进行线程任务切换,通过串口打印"hello world",基础keil工程代码准备完毕。 -### 3. 获取Tensorflow Lite Micro +#### 3. 获取Tensorflow Lite Micro -有两种方式获取tflite_micro源码: +有三种方式获取tflite_micro: -1. 从TencentOS tiny 代码仓库 `components/tflite_micro`目录获取; -2. 从Tensorflow代码仓库获取,TFlite_Micro的源码已经开源,github下载地址为:https://github.com/tensorflow/tensorflow ,TFlite_Micro的代码位于`tensorflow/tensorflow/lite/micro/`目录下。 +1. 从TencentOS tiny 代码仓库 `components\ai\tflite_micro`目录获取; +2. 以lib文件的形式使用tflite_micro组件,lib文件`TencentOS-tiny\components\ai\tflite_micro`的ARM_CortexM4_lib、ARM_CortexM7_lib和ARM_CortexM55_lib文件夹 +3. 从Tensorflow代码仓库获取,TFlite_Micro的源码已经开源,github下载地址为:https://github.com/tensorflow/tensorflow ,TFlite_Micro的代码位于`tensorflow\tensorflow\lite\micro\`目录下。 -如果没有tflite_micro开发经验,建议您以**第一种方式**获取tflite_micro源码,如果您希望自行获取最新tflite_micro源码,请参考`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md文档。 +如果没有tflite_micro开发经验,建议以**第一种**或者**第二种**方式获取tflite_micro,希望自行获取最新源码,或者编译lib文件,请参考`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md文档,本指南将直接使用TencentOS tiny 代码仓库内的tflite_micro组件。 ## 二、BSP准备 @@ -86,28 +89,67 @@
+#### 2.2 打开keil的Manage Project Items + +
+ +
+ +#### 2.3 在project中加入新的文件夹hal + +
+ +
+ + +#### 2.3 添加驱动代码 + +添加`lcd_2inch4.c`和`lcd_config.c`, + +
+ +
-#### 2.2 添加驱动代码 +添加头文件`lcd_2inch4.h`和`lcd_config.h`路径 -添加`lcd_2inch4.c`和`lcd_config.c`,添加头文件`lcd_2inch4.h`和`lcd_config.h`路径。 +
+ +
+
+ +
+外设驱动的头文件.h文件都在`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP\Hardware\Inc`路径下。 + ### 3. 摄像头驱动 - - #### 3.1 外设初始化 +进入`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP`目录,打开TencentOS_tiny.ioc工程,初始化DCMI外设,打开DCMI全局中断,并打开DMA通道,DMA的Direction设置为Peripheral To Memory。 + +
+ +
+ +
+ +
+ #### 3.2 添加驱动代码 +
+ +
+**在mcu_init函数重写DCMI帧中断回调函数:** -**在main函数重写DCMI帧中断回调函数:** +值得注意的是,代码需要写在CubeMx生成的注释语句内,当使用CubeMX重新配置外设并生成代码时,所添加的代码才不会被覆盖掉,如下所示,代码添加在/* USER CODE BEGIN 4 */ 和 /* USER CODE END 4 */注释语句之间: ```C /* USER CODE BEGIN 4 */ @@ -120,11 +162,32 @@ void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi) /* USER CODE END 4 */ ``` - - ### 4. LCD显示摄像头图像 -经过以上步骤,BSP就准备完毕了。 +本例程的任务函数在 + +`TencentOS-tiny\examples\tflitemicro_person_detection\tflitemicro_person_detection.c` + +```c +void task1(void *arg) +{ + while (1) { + if(frame_flag == 1){ + + if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI + LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT); + //display + frame_flag = 0; + if(HAL_DCMI_Start_DMA(&hdcmi,DCMI_MODE_CONTINUOUS,\ //restart DCMI + (uint32_t)camera_buffer ,\ + (OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT)/2)) + Error_Handler(); + osDelay(50); + } +} +``` + +经过以上步骤,如果能顺利地驱动摄像头,并在LCD实时显示图像,BSP就准备完毕了,如果使用的是不同的LCD或者Camera,请根据实际情况进行外设初始化和驱动的移植。 ## 三、Tensorflow Lite Micro移植 @@ -132,7 +195,7 @@ void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi) 由于NUCLEO-L496ZG芯片中的内核为ARM Cortex M4,所以本次我们可以直接使用ARM Cortex M4版本的tensorflow_lite_micro.lib库来简化tflite_micro搭建流程。 -#### 1.1 在project中加入新的文件夹tensorflow: +#### 1.1 在project中加入新的文件夹tensorflow
@@ -152,13 +215,13 @@ tensorflow_lite_micro.lib的路径为:`TencentOS-tiny\components\ai\tflite_mic 其余.cc文件均在当前目录下的`tflu_person_detection`文件夹中。 -#### 1.3 关闭Keil的MicroLib库: +#### 1.3 关闭Keil的MicroLib库
-#### 1.4 添加tflite_micro需要的头文件: +#### 1.4 添加tflite_micro需要的头文件
@@ -178,9 +241,12 @@ TencentOS-tiny\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow\lite\micro 其中宏`NUCLEO_STM32L496ZG`是指定Nucleo STM32L496的hlpuart1为系统printf函数的输出串口,具体定义在Nucleo STM32L496的BSP文件夹中的`mcu_init.c`中。 - ### 2. 编写Person_Detection 任务函数 +本例程的任务函数在 + +`TencentOS-tiny\examples\tflitemicro_person_detection\tflitemicro_person_detection.c`目录下 + #### 2.1 图像预处理
@@ -211,7 +277,7 @@ void input_convert(uint16_t* camera_buffer , uint8_t* model_buffer) } ``` -#### 3.2 行人检测线程任务函数 +#### 2.2 行人检测线程任务函数 ```c void task1(void *arg) @@ -245,8 +311,21 @@ void task2(void *arg) } ``` +#### 2.3 运行效果 +通过串行输出实时打印信息,移动摄像头,镜头没有对准行人时,输出如下: -## 四、Benchmark +
+ +
+当镜头对准行人时,输出如下: + +
+ +
+ +执行一帧图像推理,耗时约633 ms。 + +更多关于tflite_micro的介绍,请参考[tensorflow](https://tensorflow.google.cn/lite/microcontrollers?hl=zh_cn)官网以及`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvoptx deleted file mode 100644 index e3edfba5..00000000 --- a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvoptx +++ /dev/null @@ -1,1240 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp;*.cc - 0 - - - - 0 - 0 - - - - TencentOS_tiny - 0x4 - ARM-ADS - - 80000000 - - 1 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 18 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 6 - - - - - - - - - - - STLink\ST-LINKIII-KEIL_SWO.dll - - - - 0 - ARMRTXEVENTFLAGS - -L70 -Z18 -C0 -M0 -T1 - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - (105=-1,-1,-1,-1,0) - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32L496ZGTx$CMSIS\Flash\STM32L4xx_1024.FLM)) - - - 0 - ST-LINKIII-KEIL_SWO - -U0674FF525750877267153432 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32L496ZGTx$CMSIS\Flash\STM32L4xx_1024.FLM) - - - - - 0 - 0 - 573 - 1 -
134235804
- 0 - 0 - 0 - 0 - 0 - 1 - ..\..\..\..\kernel\core\tos_mmheap.c - - \\TencentOS_tiny\../../../../kernel/core/tos_mmheap.c\573 -
-
- - - 0 - 1 - k_mmheap_default_pool - - - - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - 1 - 0 - 0 - 2 - 10000000 - -
-
- - - Application/MDK-ARM - 0 - 0 - 0 - 0 - - 1 - 1 - 2 - 0 - 0 - 0 - startup_stm32l496xx.s - startup_stm32l496xx.s - 0 - 0 - - - - - Application/User - 0 - 0 - 0 - 0 - - 2 - 2 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\main.c - main.c - 0 - 0 - - - 2 - 3 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\gpio.c - gpio.c - 0 - 0 - - - 2 - 4 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\stm32l4xx_hal_msp.c - stm32l4xx_hal_msp.c - 0 - 0 - - - 2 - 5 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\stm32l4xx_it.c - stm32l4xx_it.c - 0 - 0 - - - 2 - 6 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\sys.c - sys.c - 0 - 0 - - - 2 - 7 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\usart.c - usart.c - 0 - 0 - - - 2 - 8 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\mcu_init.c - mcu_init.c - 0 - 0 - - - 2 - 9 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\dcmi.c - dcmi.c - 0 - 0 - - - 2 - 10 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\dma.c - dma.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\i2c.c - i2c.c - 0 - 0 - - - 2 - 12 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\spi.c - spi.c - 0 - 0 - - - 2 - 13 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\tim.c - tim.c - 0 - 0 - - - - - Drivers/STM32L4xx_HAL_Driver - 0 - 0 - 0 - 0 - - 3 - 14 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c - stm32l4xx_hal_uart.c - 0 - 0 - - - 3 - 15 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c - stm32l4xx_hal_uart_ex.c - 0 - 0 - - - 3 - 16 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c - stm32l4xx_hal.c - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c - stm32l4xx_hal_i2c.c - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c - stm32l4xx_hal_i2c_ex.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c - stm32l4xx_hal_rcc.c - 0 - 0 - - - 3 - 20 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c - stm32l4xx_hal_rcc_ex.c - 0 - 0 - - - 3 - 21 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c - stm32l4xx_hal_flash.c - 0 - 0 - - - 3 - 22 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c - stm32l4xx_hal_flash_ex.c - 0 - 0 - - - 3 - 23 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c - stm32l4xx_hal_flash_ramfunc.c - 0 - 0 - - - 3 - 24 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c - stm32l4xx_hal_gpio.c - 0 - 0 - - - 3 - 25 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c - stm32l4xx_hal_dma.c - 0 - 0 - - - 3 - 26 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma_ex.c - stm32l4xx_hal_dma_ex.c - 0 - 0 - - - 3 - 27 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c - stm32l4xx_hal_pwr.c - 0 - 0 - - - 3 - 28 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c - stm32l4xx_hal_pwr_ex.c - 0 - 0 - - - 3 - 29 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c - stm32l4xx_hal_cortex.c - 0 - 0 - - - 3 - 30 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_exti.c - stm32l4xx_hal_exti.c - 0 - 0 - - - 3 - 31 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c - stm32l4xx_hal_tim.c - 0 - 0 - - - 3 - 32 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim_ex.c - stm32l4xx_hal_tim_ex.c - 0 - 0 - - - 3 - 33 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dcmi.c - stm32l4xx_hal_dcmi.c - 0 - 0 - - - 3 - 34 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c - stm32l4xx_hal_spi.c - 0 - 0 - - - 3 - 35 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c - stm32l4xx_hal_spi_ex.c - 0 - 0 - - - - - Drivers/CMSIS - 0 - 0 - 0 - 0 - - 4 - 36 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\system_stm32l4xx.c - system_stm32l4xx.c - 0 - 0 - - - - - tos/arch - 0 - 0 - 0 - 0 - - 5 - 37 - 1 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c - tos_cpu.c - 0 - 0 - - - 5 - 38 - 1 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_c.c - port_c.c - 0 - 0 - - - 5 - 39 - 2 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S - port_s.S - 0 - 0 - - - - - tos/kernel - 0 - 0 - 0 - 0 - - 6 - 40 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_binary_heap.c - tos_binary_heap.c - 0 - 0 - - - 6 - 41 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_char_fifo.c - tos_char_fifo.c - 0 - 0 - - - 6 - 42 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_completion.c - tos_completion.c - 0 - 0 - - - 6 - 43 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_countdownlatch.c - tos_countdownlatch.c - 0 - 0 - - - 6 - 44 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_event.c - tos_event.c - 0 - 0 - - - 6 - 45 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_global.c - tos_global.c - 0 - 0 - - - 6 - 46 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mail_queue.c - tos_mail_queue.c - 0 - 0 - - - 6 - 47 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_message_queue.c - tos_message_queue.c - 0 - 0 - - - 6 - 48 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mmblk.c - tos_mmblk.c - 0 - 0 - - - 6 - 49 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mmheap.c - tos_mmheap.c - 0 - 0 - - - 6 - 50 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mutex.c - tos_mutex.c - 0 - 0 - - - 6 - 51 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_pend.c - tos_pend.c - 0 - 0 - - - 6 - 52 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_mail_queue.c - tos_priority_mail_queue.c - 0 - 0 - - - 6 - 53 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_message_queue.c - tos_priority_message_queue.c - 0 - 0 - - - 6 - 54 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_queue.c - tos_priority_queue.c - 0 - 0 - - - 6 - 55 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_ring_queue.c - tos_ring_queue.c - 0 - 0 - - - 6 - 56 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_robin.c - tos_robin.c - 0 - 0 - - - 6 - 57 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sched.c - tos_sched.c - 0 - 0 - - - 6 - 58 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sem.c - tos_sem.c - 0 - 0 - - - 6 - 59 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sys.c - tos_sys.c - 0 - 0 - - - 6 - 60 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_task.c - tos_task.c - 0 - 0 - - - 6 - 61 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_tick.c - tos_tick.c - 0 - 0 - - - 6 - 62 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_time.c - tos_time.c - 0 - 0 - - - 6 - 63 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_timer.c - tos_timer.c - 0 - 0 - - - - - tos/cmsis_os - 0 - 0 - 0 - 0 - - 7 - 64 - 1 - 0 - 0 - 0 - ..\..\..\..\osal\cmsis_os\cmsis_os.c - cmsis_os.c - 0 - 0 - - - - - hal - 0 - 0 - 0 - 0 - - 8 - 65 - 1 - 0 - 0 - 0 - ..\..\BSP\Hardware\Src\lcd_config.c - lcd_config.c - 0 - 0 - - - 8 - 66 - 1 - 0 - 0 - 0 - ..\..\BSP\Hardware\Src\lcd_2inch4.c - lcd_2inch4.c - 0 - 0 - - - 8 - 67 - 1 - 0 - 0 - 0 - ..\..\BSP\Hardware\Src\ov2640.c - ov2640.c - 0 - 0 - - - 8 - 68 - 1 - 0 - 0 - 0 - ..\..\BSP\Hardware\Src\sccb.c - sccb.c - 0 - 0 - - - 8 - 69 - 1 - 0 - 0 - 0 - ..\..\BSP\Hardware\Src\delay.c - delay.c - 0 - 0 - - - - - examples - 0 - 0 - 0 - 0 - - 9 - 70 - 1 - 0 - 0 - 0 - ..\..\..\..\examples\tflitemicro_person_detection\tflitemicro_person_detection.c - tflitemicro_person_detection.c - 0 - 0 - - - - - tensorflow - 1 - 0 - 0 - 0 - - 10 - 71 - 8 - 0 - 0 - 0 - .\tflu_person_detection\person_detect_model_data.cc - person_detect_model_data.cc - 0 - 0 - - - 10 - 72 - 8 - 0 - 0 - 0 - .\tflu_person_detection\model_settings.cc - model_settings.cc - 0 - 0 - - - 10 - 73 - 8 - 0 - 0 - 0 - .\tflu_person_detection\main_functions.cc - main_functions.cc - 0 - 0 - - - 10 - 74 - 8 - 0 - 0 - 0 - .\tflu_person_detection\image_provider.cc - image_provider.cc - 0 - 0 - - - 10 - 75 - 8 - 0 - 0 - 0 - .\tflu_person_detection\detection_responder.cc - detection_responder.cc - 0 - 0 - - - 10 - 76 - 1 - 0 - 0 - 0 - ..\..\..\..\components\ai\tflite_micro\KEIL\retarget.c - retarget.c - 0 - 0 - - - 10 - 77 - 4 - 0 - 0 - 0 - ..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow_lite_micro_M4.lib - tensorflow_lite_micro_M4.lib - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - -
diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvprojx index d221bdcc..21576550 100644 --- a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvprojx +++ b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/TencentOS_tiny.uvprojx @@ -16,8 +16,8 @@ STM32L496ZGTx STMicroelectronics - Keil.STM32L4xx_DFP.2.5.0 - https://www.keil.com/pack/ + Keil.STM32L4xx_DFP.2.4.0 + http://www.keil.com/pack/ IRAM(0x20000000-0x2004FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4") @@ -739,15 +739,20 @@ hal - lcd_config.c + delay.c 1 - ..\..\BSP\Hardware\Src\lcd_config.c + ..\..\BSP\Hardware\Src\delay.c lcd_2inch4.c 1 ..\..\BSP\Hardware\Src\lcd_2inch4.c + + lcd_config.c + 1 + ..\..\BSP\Hardware\Src\lcd_config.c + ov2640.c 1 @@ -758,11 +763,6 @@ 1 ..\..\BSP\Hardware\Src\sccb.c - - delay.c - 1 - ..\..\BSP\Hardware\Src\delay.c - diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add camera driver file.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add camera driver file.png new file mode 100644 index 00000000..f37e5f68 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add camera driver file.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add lcd driver file.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add lcd driver file.png new file mode 100644 index 00000000..4e290457 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_add lcd driver file.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi.png new file mode 100644 index 00000000..6289bb87 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi_2.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi_2.png new file mode 100644 index 00000000..483ccc24 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_cubemx_dcmi_2.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_lcd_path.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_lcd_path.png new file mode 100644 index 00000000..385a095e Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_lcd_path.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_path.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_path.png new file mode 100644 index 00000000..6a41ebf1 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_include_path.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_keil_manage_project.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_keil_manage_project.png new file mode 100644 index 00000000..3fb073c4 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_keil_manage_project.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_添加hal.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_添加hal.png new file mode 100644 index 00000000..75d35cb7 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/bsp_添加hal.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_no_person.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_no_person.png new file mode 100644 index 00000000..84805c4e Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_no_person.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_person.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_person.png new file mode 100644 index 00000000..b4fdf1e8 Binary files /dev/null and b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/reasult_person.png differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215009.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215009.png deleted file mode 100644 index cd55efce..00000000 Binary files a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215009.png and /dev/null differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215114.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215114.png deleted file mode 100644 index 9df03dad..00000000 Binary files a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215114.png and /dev/null differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215128.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215128.png deleted file mode 100644 index 58d108fa..00000000 Binary files a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215128.png and /dev/null differ diff --git a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215141.png b/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215141.png deleted file mode 100644 index 56d12fc7..00000000 Binary files a/board/NUCLEO_STM32L496ZG/KEIL/tflitemicro_person_detection/image/屏幕截图 2020-12-17 215141.png and /dev/null differ