add tflite example and fix bug
@@ -117,6 +117,11 @@
|
|||||||
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
||||||
</DebugOpt>
|
</DebugOpt>
|
||||||
<TargetDriverDllRegistry>
|
<TargetDriverDllRegistry>
|
||||||
|
<SetRegEntry>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Key>ST-LINKIII-KEIL_SWO</Key>
|
||||||
|
<Name>-U0667FF343339415043053749 -O206 -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)</Name>
|
||||||
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>UL2CM3</Key>
|
<Key>UL2CM3</Key>
|
||||||
@@ -168,7 +173,7 @@
|
|||||||
<pMultCmdsp></pMultCmdsp>
|
<pMultCmdsp></pMultCmdsp>
|
||||||
<DebugDescription>
|
<DebugDescription>
|
||||||
<Enable>1</Enable>
|
<Enable>1</Enable>
|
||||||
<EnableFlashSeq>1</EnableFlashSeq>
|
<EnableFlashSeq>0</EnableFlashSeq>
|
||||||
<EnableLog>0</EnableLog>
|
<EnableLog>0</EnableLog>
|
||||||
<Protocol>2</Protocol>
|
<Protocol>2</Protocol>
|
||||||
<DbgClock>10000000</DbgClock>
|
<DbgClock>10000000</DbgClock>
|
||||||
@@ -198,7 +203,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Application/User</GroupName>
|
<GroupName>Application/User</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -622,7 +627,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Drivers/CMSIS</GroupName>
|
<GroupName>Drivers/CMSIS</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -642,7 +647,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>tos/arch</GroupName>
|
<GroupName>tos/arch</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -982,7 +987,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>tos/cmsis_os</GroupName>
|
<GroupName>tos/cmsis_os</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -1002,7 +1007,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>hal</GroupName>
|
<GroupName>hal</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -1090,7 +1095,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>tensorflow</GroupName>
|
<GroupName>tensorflow</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
@@ -1146,7 +1151,7 @@
|
|||||||
<GroupNumber>10</GroupNumber>
|
<GroupNumber>10</GroupNumber>
|
||||||
<FileNumber>75</FileNumber>
|
<FileNumber>75</FileNumber>
|
||||||
<FileType>8</FileType>
|
<FileType>8</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\main_functions.cc</PathWithFileName>
|
<PathWithFileName>..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection\main_functions.cc</PathWithFileName>
|
||||||
|
@@ -0,0 +1,329 @@
|
|||||||
|
# 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\ai\tflite_micro`目录下的TFlite_Micro_Component_User_Guide.md文档。
|
||||||
|
|
||||||
|
本例程中,传入神经网络的RGB图像大小为 18kb(96*96 * 2byte),在STM32L496平台消耗的内存资源(经过优化后)如下:
|
||||||
|
|
||||||
|
- SRAM:168 Kbyte
|
||||||
|
- Flash:314 Kbyte
|
||||||
|
|
||||||
|
理论上满足以上内存要求的STM32 Cortex-M系列MCU可以参考本指南进行移植。
|
||||||
|
|
||||||
|
## 一、移植前的准备
|
||||||
|
|
||||||
|
#### 1. 准备目标硬件(开发板/传感器/模组)
|
||||||
|
|
||||||
|
需要准备如下硬件:
|
||||||
|
|
||||||
|
- 开发板:NUCLEO-L496ZG,MCU为STM32L496ZG;
|
||||||
|
- Camera:获取RGB图像,本例程使用OV2640摄像头;
|
||||||
|
- LCD:显示RGB图像,本例程使用2.4寸LCD(SPI通信);
|
||||||
|
|
||||||
|
硬件实物图如下:
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="image/all.jpg" width=50% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#### 2.准备TencentOS tiny基础keil工程代码
|
||||||
|
|
||||||
|
- 首先,参考TencentOS tiny基于keil的移植教程进行移植:
|
||||||
|
https://github.com/Tencent/TencentOS-tiny/blob/master/doc/10.Porting_Manual_for_KEIL.md
|
||||||
|
- 为了方便初始化MCU的外设,后续要继续使用STM32CubeMX软件,请确保安装了该软件;
|
||||||
|
|
||||||
|
- 移植成功后,工程可以进行线程任务切换,通过串口打印"hello world",基础keil工程代码准备完毕。
|
||||||
|
|
||||||
|
#### 3. 获取Tensorflow Lite Micro
|
||||||
|
|
||||||
|
有三种方式获取tflite_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 ,可根据google TFLite Micro官方教程获得Tensorflow Lite Micro的全部源码。
|
||||||
|
|
||||||
|
如果没有tflite_micro开发经验,建议以**第一种**或者**第二种**方式获取tflite_micro,希望自行获取最新源码,或者编译lib文件,请参考`TencentOS-tiny\components\tflite_micro`目录的TFlite_Micro_Component_User_Guide.md文档,本指南将直接使用TencentOS tiny 代码仓库内的tflite_micro组件。
|
||||||
|
|
||||||
|
## 二、BSP准备
|
||||||
|
|
||||||
|
### 1. 工程目录规划
|
||||||
|
|
||||||
|
以下是整个例程的目录规划:
|
||||||
|
|
||||||
|
| 一级目录 | 二级目录 | 三级目录 | 说明 |
|
||||||
|
| :-------: | :--------------------------: | :----------: | :----------------------------------------------------------: |
|
||||||
|
| arch | arm | | TencentOS tiny适配的IP核架构(含M核中断、调度、tick相关代码) |
|
||||||
|
| board | NUCLEO_STM32L496ZG | | 移植目标芯片的工程文件 |
|
||||||
|
| | | BSP | 板级支持包,外设驱动代码在Hardware目录 |
|
||||||
|
| component | ai | tflite_micro | tflite_micro源码 |
|
||||||
|
| examples | tflitemicro_person_detection | | 行人检测demo示例 |
|
||||||
|
| kernel | core | | TencentOS tiny内核源码 |
|
||||||
|
| | pm | | TencentOS tiny低功耗模块源码 |
|
||||||
|
| osal | cmsis_os | | TencentOS tiny提供的cmsis os 适配 |
|
||||||
|
|
||||||
|
完成TencentOS tiny基础keil工程准备工作后,在这个keil工程的基础上继续添加外设驱动代码。
|
||||||
|
|
||||||
|
### 2. LCD驱动
|
||||||
|
|
||||||
|
本例程选用一款2.4寸LCD屏幕,分辨率为 240*320, SPI 接口通信,内部控制芯片为IL9341。
|
||||||
|
|
||||||
|
开发者也可以使用其他LCD,自行完成LCD的驱动代码移植,方便调试摄像头,以及查看图像是否正常。
|
||||||
|
|
||||||
|
#### 2.1 SPI初始化
|
||||||
|
|
||||||
|
进入`TencentOS-tiny\board\NUCLEO_STM32L496ZG\BSP`目录,打开TencentOS_tiny.ioc工程,使用STM32CubeMX初始化MCU外设。
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/spi init.png" width=100% />
|
||||||
|
</div>
|
||||||
|
#### 2.2 打开keil的Manage Project Items
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_keil_manage_project.png" width=60% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#### 2.3 在project中加入新的文件夹hal
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_添加hal.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
#### 2.3 添加驱动代码
|
||||||
|
|
||||||
|
添加`lcd_2inch4.c`和`lcd_config.c`,
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_add lcd driver file.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
添加头文件`lcd_2inch4.h`和`lcd_config.h`路径
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_include_path.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_include_lcd_path.png" width=80% />
|
||||||
|
</div>
|
||||||
|
外设驱动的头文件.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。
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_cubemx_dcmi.png" width=100% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_cubemx_dcmi_2.png" width=100% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### 3.2 添加驱动代码
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/bsp_add camera driver file.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
**在mcu_init函数重写DCMI帧中断回调函数:**
|
||||||
|
|
||||||
|
值得注意的是,代码需要写在CubeMx生成的注释语句内,当使用CubeMX重新配置外设并生成代码时,所添加的代码才不会被覆盖掉,如下所示,代码添加在/* USER CODE BEGIN 4 */ 和 /* USER CODE END 4 */注释语句之间:
|
||||||
|
|
||||||
|
```C
|
||||||
|
/* USER CODE BEGIN 4 */
|
||||||
|
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
|
||||||
|
{
|
||||||
|
if(hdcmi->State == 2 && frame_flag != 1){
|
||||||
|
frame_flag = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* USER CODE END 4 */
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. LCD显示摄像头图像
|
||||||
|
|
||||||
|
本例程的任务函数在
|
||||||
|
|
||||||
|
`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移植
|
||||||
|
|
||||||
|
### 1. tflite_micro组件加入到keil工程
|
||||||
|
|
||||||
|
由于NUCLEO-L496ZG芯片中的内核为ARM Cortex M4,所以本次我们可以直接使用ARM Cortex M4版本的tensorflow_lite_micro.lib库来简化tflite_micro搭建流程。
|
||||||
|
|
||||||
|
#### 1.1 在project中加入新的文件夹tensorflow
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/tflu_tensorflow文件夹增加的内容.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#### 1.2 添加本次与行人检测demo有关的源文件
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/tflu_需要添加的文件.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
其中,retarget.c的路径为:`TencentOS-tiny\components\ai\tflite_micro\KEIL\retarget.c`
|
||||||
|
|
||||||
|
tensorflow_lite_micro.lib的路径为:`TencentOS-tiny\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow_lite_micro.lib`
|
||||||
|
|
||||||
|
其余.cc文件均在当前目录下的`tflu_person_detection`文件夹中。
|
||||||
|
|
||||||
|
#### 1.3 关闭Keil的MicroLib库
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/tflu_取消Microlib.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#### 1.4 添加tflite_micro需要的头文件
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/tflu_添加include.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
注:最下方的路径为:
|
||||||
|
|
||||||
|
```
|
||||||
|
TencentOS-tiny\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow\lite\micro\tools\make\downloads
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 1.5 调整优化等级和tflite_micro的交互信息输出串口:
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/tflu_STM32496宏.png" width=80% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
其中宏`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 图像预处理
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/RGB565.jpg" width=50% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
在本例程中,模型要求输入神经网络的图像为灰度图,为完成摄像头获取的RGB彩图到模型输入需要的灰度图转换,需从输入的RGB565像素格式中解析出R、G、B三通道的值,再根据心理学公式计算出单个像素点的灰度,具体代码如下:
|
||||||
|
|
||||||
|
```c
|
||||||
|
uint8_t rgb565_to_gray(uint16_t bg_color)
|
||||||
|
{
|
||||||
|
uint8_t bg_r = 0;
|
||||||
|
uint8_t bg_g = 0;
|
||||||
|
uint8_t bg_b = 0;
|
||||||
|
bg_r = ((bg_color>>11)&0xff)<<3;
|
||||||
|
bg_g = ((bg_color>>5)&0x3f)<<2;
|
||||||
|
bg_b = (bg_color&0x1f)<<2;
|
||||||
|
uint8_t gray = (bg_r*299 + bg_g*587 + bg_b*114 + 500) / 1000;
|
||||||
|
return gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
void input_convert(uint16_t* camera_buffer , uint8_t* model_buffer)
|
||||||
|
{
|
||||||
|
for(int i=0 ; i<OV2640_PIXEL_WIDTH*OV2640_PIXEL_HEIGHT ; i++)
|
||||||
|
{
|
||||||
|
model_buffer[i] = rgb565_to_gray(camera_buffer[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.2 行人检测线程任务函数
|
||||||
|
|
||||||
|
```c
|
||||||
|
void task1(void *arg)
|
||||||
|
{
|
||||||
|
while (1) {
|
||||||
|
if(frame_flag == 1){
|
||||||
|
printf("***person detection task\r\n");
|
||||||
|
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
||||||
|
input_convert(camera_buffer,model_buffer);//convert input
|
||||||
|
person_detect(model_buffer); //inference
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void task2(void *arg)
|
||||||
|
{
|
||||||
|
while (1) {
|
||||||
|
printf("***task2\r\n");
|
||||||
|
osDelay(50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2.3 运行效果
|
||||||
|
|
||||||
|
通过串行输出实时打印信息,移动摄像头,镜头没有对准行人时,输出如下:
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/reasult_no_person.png" width=70% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
当镜头对准行人时,输出如下:
|
||||||
|
|
||||||
|
<div align=center>
|
||||||
|
<img src="./image/reasult_person.png" width=70% />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
执行一帧图像推理,耗时约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
|
||||||
|
|
@@ -0,0 +1,848 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
|
||||||
|
|
||||||
|
<SchemaVersion>2.1</SchemaVersion>
|
||||||
|
|
||||||
|
<Header>### uVision Project, (C) Keil Software</Header>
|
||||||
|
|
||||||
|
<Targets>
|
||||||
|
<Target>
|
||||||
|
<TargetName>TencentOS_tiny</TargetName>
|
||||||
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
|
<pCCUsed>6140000::V6.14::ARMCLANG</pCCUsed>
|
||||||
|
<uAC6>1</uAC6>
|
||||||
|
<TargetOption>
|
||||||
|
<TargetCommonOption>
|
||||||
|
<Device>STM32L496ZGTx</Device>
|
||||||
|
<Vendor>STMicroelectronics</Vendor>
|
||||||
|
<PackID>Keil.STM32L4xx_DFP.2.5.0</PackID>
|
||||||
|
<PackURL>https://www.keil.com/pack/</PackURL>
|
||||||
|
<Cpu>IRAM(0x20000000-0x2004FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4")</Cpu>
|
||||||
|
<FlashUtilSpec></FlashUtilSpec>
|
||||||
|
<StartupFile></StartupFile>
|
||||||
|
<FlashDriverDll></FlashDriverDll>
|
||||||
|
<DeviceId></DeviceId>
|
||||||
|
<RegisterFile></RegisterFile>
|
||||||
|
<MemoryEnv></MemoryEnv>
|
||||||
|
<Cmp></Cmp>
|
||||||
|
<Asm></Asm>
|
||||||
|
<Linker></Linker>
|
||||||
|
<OHString></OHString>
|
||||||
|
<InfinionOptionDll></InfinionOptionDll>
|
||||||
|
<SLE66CMisc></SLE66CMisc>
|
||||||
|
<SLE66AMisc></SLE66AMisc>
|
||||||
|
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||||
|
<SFDFile>$$Device:STM32L496ZGTx$CMSIS\SVD\STM32L4x6.svd</SFDFile>
|
||||||
|
<bCustSvd>0</bCustSvd>
|
||||||
|
<UseEnv>0</UseEnv>
|
||||||
|
<BinPath></BinPath>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
<LibPath></LibPath>
|
||||||
|
<RegisterFilePath></RegisterFilePath>
|
||||||
|
<DBRegisterFilePath></DBRegisterFilePath>
|
||||||
|
<TargetStatus>
|
||||||
|
<Error>0</Error>
|
||||||
|
<ExitCodeStop>0</ExitCodeStop>
|
||||||
|
<ButtonStop>0</ButtonStop>
|
||||||
|
<NotGenerated>0</NotGenerated>
|
||||||
|
<InvalidFlash>1</InvalidFlash>
|
||||||
|
</TargetStatus>
|
||||||
|
<OutputDirectory>TencentOS_tiny\</OutputDirectory>
|
||||||
|
<OutputName>TencentOS_tiny</OutputName>
|
||||||
|
<CreateExecutable>1</CreateExecutable>
|
||||||
|
<CreateLib>0</CreateLib>
|
||||||
|
<CreateHexFile>1</CreateHexFile>
|
||||||
|
<DebugInformation>1</DebugInformation>
|
||||||
|
<BrowseInformation>1</BrowseInformation>
|
||||||
|
<ListingPath></ListingPath>
|
||||||
|
<HexFormatSelection>1</HexFormatSelection>
|
||||||
|
<Merge32K>0</Merge32K>
|
||||||
|
<CreateBatchFile>0</CreateBatchFile>
|
||||||
|
<BeforeCompile>
|
||||||
|
<RunUserProg1>0</RunUserProg1>
|
||||||
|
<RunUserProg2>0</RunUserProg2>
|
||||||
|
<UserProg1Name></UserProg1Name>
|
||||||
|
<UserProg2Name></UserProg2Name>
|
||||||
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
|
<nStopU1X>0</nStopU1X>
|
||||||
|
<nStopU2X>0</nStopU2X>
|
||||||
|
</BeforeCompile>
|
||||||
|
<BeforeMake>
|
||||||
|
<RunUserProg1>0</RunUserProg1>
|
||||||
|
<RunUserProg2>0</RunUserProg2>
|
||||||
|
<UserProg1Name></UserProg1Name>
|
||||||
|
<UserProg2Name></UserProg2Name>
|
||||||
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
|
<nStopB1X>0</nStopB1X>
|
||||||
|
<nStopB2X>0</nStopB2X>
|
||||||
|
</BeforeMake>
|
||||||
|
<AfterMake>
|
||||||
|
<RunUserProg1>0</RunUserProg1>
|
||||||
|
<RunUserProg2>0</RunUserProg2>
|
||||||
|
<UserProg1Name></UserProg1Name>
|
||||||
|
<UserProg2Name></UserProg2Name>
|
||||||
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
|
<nStopA1X>0</nStopA1X>
|
||||||
|
<nStopA2X>0</nStopA2X>
|
||||||
|
</AfterMake>
|
||||||
|
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||||
|
<SVCSIdString></SVCSIdString>
|
||||||
|
</TargetCommonOption>
|
||||||
|
<CommonProperty>
|
||||||
|
<UseCPPCompiler>0</UseCPPCompiler>
|
||||||
|
<RVCTCodeConst>0</RVCTCodeConst>
|
||||||
|
<RVCTZI>0</RVCTZI>
|
||||||
|
<RVCTOtherData>0</RVCTOtherData>
|
||||||
|
<ModuleSelection>0</ModuleSelection>
|
||||||
|
<IncludeInBuild>1</IncludeInBuild>
|
||||||
|
<AlwaysBuild>0</AlwaysBuild>
|
||||||
|
<GenerateAssemblyFile>0</GenerateAssemblyFile>
|
||||||
|
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||||
|
<PublicsOnly>0</PublicsOnly>
|
||||||
|
<StopOnExitCode>3</StopOnExitCode>
|
||||||
|
<CustomArgument></CustomArgument>
|
||||||
|
<IncludeLibraryModules></IncludeLibraryModules>
|
||||||
|
<ComprImg>0</ComprImg>
|
||||||
|
</CommonProperty>
|
||||||
|
<DllOption>
|
||||||
|
<SimDllName>SARMCM3.DLL</SimDllName>
|
||||||
|
<SimDllArguments>-REMAP -MPU</SimDllArguments>
|
||||||
|
<SimDlgDll>DCM.DLL</SimDlgDll>
|
||||||
|
<SimDlgDllArguments>-pCM4</SimDlgDllArguments>
|
||||||
|
<TargetDllName>SARMCM3.DLL</TargetDllName>
|
||||||
|
<TargetDllArguments>-MPU</TargetDllArguments>
|
||||||
|
<TargetDlgDll>TCM.DLL</TargetDlgDll>
|
||||||
|
<TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
|
||||||
|
</DllOption>
|
||||||
|
<DebugOption>
|
||||||
|
<OPTHX>
|
||||||
|
<HexSelection>1</HexSelection>
|
||||||
|
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||||
|
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||||
|
<HexOffset>0</HexOffset>
|
||||||
|
<Oh166RecLen>16</Oh166RecLen>
|
||||||
|
</OPTHX>
|
||||||
|
</DebugOption>
|
||||||
|
<Utilities>
|
||||||
|
<Flash1>
|
||||||
|
<UseTargetDll>1</UseTargetDll>
|
||||||
|
<UseExternalTool>0</UseExternalTool>
|
||||||
|
<RunIndependent>0</RunIndependent>
|
||||||
|
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
|
||||||
|
<Capability>1</Capability>
|
||||||
|
<DriverSelection>4107</DriverSelection>
|
||||||
|
</Flash1>
|
||||||
|
<bUseTDR>1</bUseTDR>
|
||||||
|
<Flash2>BIN\UL2CM3.DLL</Flash2>
|
||||||
|
<Flash3></Flash3>
|
||||||
|
<Flash4></Flash4>
|
||||||
|
<pFcarmOut></pFcarmOut>
|
||||||
|
<pFcarmGrp></pFcarmGrp>
|
||||||
|
<pFcArmRoot></pFcArmRoot>
|
||||||
|
<FcArmLst>0</FcArmLst>
|
||||||
|
</Utilities>
|
||||||
|
<TargetArmAds>
|
||||||
|
<ArmAdsMisc>
|
||||||
|
<GenerateListings>0</GenerateListings>
|
||||||
|
<asHll>1</asHll>
|
||||||
|
<asAsm>1</asAsm>
|
||||||
|
<asMacX>1</asMacX>
|
||||||
|
<asSyms>1</asSyms>
|
||||||
|
<asFals>1</asFals>
|
||||||
|
<asDbgD>1</asDbgD>
|
||||||
|
<asForm>1</asForm>
|
||||||
|
<ldLst>0</ldLst>
|
||||||
|
<ldmm>1</ldmm>
|
||||||
|
<ldXref>1</ldXref>
|
||||||
|
<BigEnd>0</BigEnd>
|
||||||
|
<AdsALst>1</AdsALst>
|
||||||
|
<AdsACrf>1</AdsACrf>
|
||||||
|
<AdsANop>0</AdsANop>
|
||||||
|
<AdsANot>0</AdsANot>
|
||||||
|
<AdsLLst>1</AdsLLst>
|
||||||
|
<AdsLmap>1</AdsLmap>
|
||||||
|
<AdsLcgr>1</AdsLcgr>
|
||||||
|
<AdsLsym>1</AdsLsym>
|
||||||
|
<AdsLszi>1</AdsLszi>
|
||||||
|
<AdsLtoi>1</AdsLtoi>
|
||||||
|
<AdsLsun>1</AdsLsun>
|
||||||
|
<AdsLven>1</AdsLven>
|
||||||
|
<AdsLsxf>1</AdsLsxf>
|
||||||
|
<RvctClst>0</RvctClst>
|
||||||
|
<GenPPlst>0</GenPPlst>
|
||||||
|
<AdsCpuType>"Cortex-M4"</AdsCpuType>
|
||||||
|
<RvctDeviceName></RvctDeviceName>
|
||||||
|
<mOS>0</mOS>
|
||||||
|
<uocRom>0</uocRom>
|
||||||
|
<uocRam>0</uocRam>
|
||||||
|
<hadIROM>1</hadIROM>
|
||||||
|
<hadIRAM>1</hadIRAM>
|
||||||
|
<hadXRAM>0</hadXRAM>
|
||||||
|
<uocXRam>0</uocXRam>
|
||||||
|
<RvdsVP>2</RvdsVP>
|
||||||
|
<RvdsMve>0</RvdsMve>
|
||||||
|
<RvdsCdeCp>0</RvdsCdeCp>
|
||||||
|
<hadIRAM2>0</hadIRAM2>
|
||||||
|
<hadIROM2>0</hadIROM2>
|
||||||
|
<StupSel>8</StupSel>
|
||||||
|
<useUlib>0</useUlib>
|
||||||
|
<EndSel>0</EndSel>
|
||||||
|
<uLtcg>0</uLtcg>
|
||||||
|
<nSecure>0</nSecure>
|
||||||
|
<RoSelD>3</RoSelD>
|
||||||
|
<RwSelD>3</RwSelD>
|
||||||
|
<CodeSel>0</CodeSel>
|
||||||
|
<OptFeed>0</OptFeed>
|
||||||
|
<NoZi1>0</NoZi1>
|
||||||
|
<NoZi2>0</NoZi2>
|
||||||
|
<NoZi3>0</NoZi3>
|
||||||
|
<NoZi4>0</NoZi4>
|
||||||
|
<NoZi5>0</NoZi5>
|
||||||
|
<Ro1Chk>0</Ro1Chk>
|
||||||
|
<Ro2Chk>0</Ro2Chk>
|
||||||
|
<Ro3Chk>0</Ro3Chk>
|
||||||
|
<Ir1Chk>1</Ir1Chk>
|
||||||
|
<Ir2Chk>0</Ir2Chk>
|
||||||
|
<Ra1Chk>0</Ra1Chk>
|
||||||
|
<Ra2Chk>0</Ra2Chk>
|
||||||
|
<Ra3Chk>0</Ra3Chk>
|
||||||
|
<Im1Chk>1</Im1Chk>
|
||||||
|
<Im2Chk>0</Im2Chk>
|
||||||
|
<OnChipMemories>
|
||||||
|
<Ocm1>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm1>
|
||||||
|
<Ocm2>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm2>
|
||||||
|
<Ocm3>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm3>
|
||||||
|
<Ocm4>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm4>
|
||||||
|
<Ocm5>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm5>
|
||||||
|
<Ocm6>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</Ocm6>
|
||||||
|
<IRAM>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x20000000</StartAddress>
|
||||||
|
<Size>0x50000</Size>
|
||||||
|
</IRAM>
|
||||||
|
<IROM>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x8000000</StartAddress>
|
||||||
|
<Size>0x100000</Size>
|
||||||
|
</IROM>
|
||||||
|
<XRAM>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</XRAM>
|
||||||
|
<OCR_RVCT1>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT1>
|
||||||
|
<OCR_RVCT2>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT2>
|
||||||
|
<OCR_RVCT3>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT3>
|
||||||
|
<OCR_RVCT4>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x8000000</StartAddress>
|
||||||
|
<Size>0x100000</Size>
|
||||||
|
</OCR_RVCT4>
|
||||||
|
<OCR_RVCT5>
|
||||||
|
<Type>1</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT5>
|
||||||
|
<OCR_RVCT6>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT6>
|
||||||
|
<OCR_RVCT7>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT7>
|
||||||
|
<OCR_RVCT8>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT8>
|
||||||
|
<OCR_RVCT9>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x20000000</StartAddress>
|
||||||
|
<Size>0x50000</Size>
|
||||||
|
</OCR_RVCT9>
|
||||||
|
<OCR_RVCT10>
|
||||||
|
<Type>0</Type>
|
||||||
|
<StartAddress>0x0</StartAddress>
|
||||||
|
<Size>0x0</Size>
|
||||||
|
</OCR_RVCT10>
|
||||||
|
</OnChipMemories>
|
||||||
|
<RvctStartVector></RvctStartVector>
|
||||||
|
</ArmAdsMisc>
|
||||||
|
<Cads>
|
||||||
|
<interw>1</interw>
|
||||||
|
<Optim>4</Optim>
|
||||||
|
<oTime>0</oTime>
|
||||||
|
<SplitLS>0</SplitLS>
|
||||||
|
<OneElfS>1</OneElfS>
|
||||||
|
<Strict>0</Strict>
|
||||||
|
<EnumInt>0</EnumInt>
|
||||||
|
<PlainCh>0</PlainCh>
|
||||||
|
<Ropi>0</Ropi>
|
||||||
|
<Rwpi>0</Rwpi>
|
||||||
|
<wLevel>3</wLevel>
|
||||||
|
<uThumb>0</uThumb>
|
||||||
|
<uSurpInc>0</uSurpInc>
|
||||||
|
<uC99>1</uC99>
|
||||||
|
<uGnu>0</uGnu>
|
||||||
|
<useXO>0</useXO>
|
||||||
|
<v6Lang>3</v6Lang>
|
||||||
|
<v6LangP>3</v6LangP>
|
||||||
|
<vShortEn>1</vShortEn>
|
||||||
|
<vShortWch>1</vShortWch>
|
||||||
|
<v6Lto>0</v6Lto>
|
||||||
|
<v6WtE>0</v6WtE>
|
||||||
|
<v6Rtti>0</v6Rtti>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define>USE_HAL_DRIVER,STM32L496xx,NUCLEO_STM32L496ZG</Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath>..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\examples\hello_world;..\..\TOS_CONFIG;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\BSP\Hardware\Inc;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\flatbuffers\include;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\gemmlowp;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\kissfft;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\third_party\ruy;..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow\lite\micro\tools\make\downloads;..\..\..\..\examples\tflitemicro_person_detection\tflu_person_detection;..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no;..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no\micro_features</IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Cads>
|
||||||
|
<Aads>
|
||||||
|
<interw>1</interw>
|
||||||
|
<Ropi>0</Ropi>
|
||||||
|
<Rwpi>0</Rwpi>
|
||||||
|
<thumb>0</thumb>
|
||||||
|
<SplitLS>0</SplitLS>
|
||||||
|
<SwStkChk>0</SwStkChk>
|
||||||
|
<NoWarn>0</NoWarn>
|
||||||
|
<uSurpInc>0</uSurpInc>
|
||||||
|
<useXO>0</useXO>
|
||||||
|
<ClangAsOpt>4</ClangAsOpt>
|
||||||
|
<VariousControls>
|
||||||
|
<MiscControls></MiscControls>
|
||||||
|
<Define></Define>
|
||||||
|
<Undefine></Undefine>
|
||||||
|
<IncludePath></IncludePath>
|
||||||
|
</VariousControls>
|
||||||
|
</Aads>
|
||||||
|
<LDads>
|
||||||
|
<umfTarg>1</umfTarg>
|
||||||
|
<Ropi>0</Ropi>
|
||||||
|
<Rwpi>0</Rwpi>
|
||||||
|
<noStLib>0</noStLib>
|
||||||
|
<RepFail>1</RepFail>
|
||||||
|
<useFile>0</useFile>
|
||||||
|
<TextAddressRange>0x08000000</TextAddressRange>
|
||||||
|
<DataAddressRange>0x20000000</DataAddressRange>
|
||||||
|
<pXoBase></pXoBase>
|
||||||
|
<ScatterFile></ScatterFile>
|
||||||
|
<IncludeLibs></IncludeLibs>
|
||||||
|
<IncludeLibsPath></IncludeLibsPath>
|
||||||
|
<Misc></Misc>
|
||||||
|
<LinkerInputFile></LinkerInputFile>
|
||||||
|
<DisabledWarnings></DisabledWarnings>
|
||||||
|
</LDads>
|
||||||
|
</TargetArmAds>
|
||||||
|
</TargetOption>
|
||||||
|
<Groups>
|
||||||
|
<Group>
|
||||||
|
<GroupName>Application/MDK-ARM</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>startup_stm32l496xx.s</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>startup_stm32l496xx.s</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>Application/User</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>main.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\main.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>gpio.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\gpio.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_msp.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\stm32l4xx_hal_msp.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_it.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\stm32l4xx_it.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>sys.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\sys.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>usart.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\usart.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>mcu_init.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\mcu_init.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>dcmi.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\dcmi.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>dma.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\dma.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>i2c.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\i2c.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>spi.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\spi.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tim.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\tim.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>Drivers/STM32L4xx_HAL_Driver</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_uart.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_uart_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_i2c.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_i2c_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_rcc.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_rcc_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_flash.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_flash_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_flash_ramfunc.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_gpio.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_dma.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_dma_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_pwr.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_pwr_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_cortex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_exti.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_exti.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_tim.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_tim_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_dcmi.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dcmi.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_spi.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>stm32l4xx_hal_spi_ex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>Drivers/CMSIS</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>system_stm32l4xx.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Src\system_stm32l4xx.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>tos/arch</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_cpu.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>port_c.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_c.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>port_s.S</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>tos/kernel</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_binary_heap.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_binary_heap.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_char_fifo.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_char_fifo.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_completion.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_completion.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_countdownlatch.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_countdownlatch.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_event.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_event.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_global.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_global.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_mail_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_mail_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_message_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_message_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_mmblk.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_mmblk.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_mmheap.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_mmheap.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_mutex.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_mutex.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_pend.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_pend.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_priority_mail_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_priority_mail_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_priority_message_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_priority_message_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_priority_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_priority_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_ring_queue.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_ring_queue.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_robin.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_robin.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_sched.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_sched.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_sem.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_sem.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_sys.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_sys.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_task.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_task.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_tick.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_tick.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_time.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_time.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tos_timer.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\kernel\core\tos_timer.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>tos/cmsis_os</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>cmsis_os.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\osal\cmsis_os\cmsis_os.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>hal</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>delay.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Hardware\Src\delay.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>lcd_2inch4.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Hardware\Src\lcd_2inch4.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>lcd_config.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Hardware\Src\lcd_config.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>ov2640.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Hardware\Src\ov2640.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>sccb.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\BSP\Hardware\Src\sccb.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>examples</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>tflitemicro_speech_detection.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\examples\tflitemicro_speech_detection\tflitemicro_speech_detection.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>tensorflow</GroupName>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>retarget.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\..\..\components\ai\tflite_micro\KEIL\retarget.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>tensorflow_lite_micro_M4.lib</FileName>
|
||||||
|
<FileType>4</FileType>
|
||||||
|
<FilePath>..\..\..\..\components\ai\tflite_micro\ARM_CortexM4_lib\tensorflow_lite_micro_M4.lib</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>model.cc</FileName>
|
||||||
|
<FileType>8</FileType>
|
||||||
|
<FilePath>..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no\micro_features\model.cc</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>no_micro_features_data.cc</FileName>
|
||||||
|
<FileType>8</FileType>
|
||||||
|
<FilePath>..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no\micro_features\no_micro_features_data.cc</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>yes_micro_features_data.cc</FileName>
|
||||||
|
<FileType>8</FileType>
|
||||||
|
<FilePath>..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no\micro_features\yes_micro_features_data.cc</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>micro_speech.cc</FileName>
|
||||||
|
<FileType>8</FileType>
|
||||||
|
<FilePath>..\..\..\..\examples\tflitemicro_speech_detection\tflu_speech_yes_or_no\micro_speech.cc</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
</Group>
|
||||||
|
<Group>
|
||||||
|
<GroupName>::CMSIS</GroupName>
|
||||||
|
</Group>
|
||||||
|
</Groups>
|
||||||
|
</Target>
|
||||||
|
</Targets>
|
||||||
|
|
||||||
|
<RTE>
|
||||||
|
<apis/>
|
||||||
|
<components>
|
||||||
|
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
|
||||||
|
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
|
||||||
|
<targetInfos>
|
||||||
|
<targetInfo name="TencentOS_tiny"/>
|
||||||
|
</targetInfos>
|
||||||
|
</component>
|
||||||
|
</components>
|
||||||
|
<files/>
|
||||||
|
</RTE>
|
||||||
|
|
||||||
|
<LayerInfo>
|
||||||
|
<Layers>
|
||||||
|
<Layer>
|
||||||
|
<LayName><Project Info></LayName>
|
||||||
|
<LayDesc></LayDesc>
|
||||||
|
<LayUrl></LayUrl>
|
||||||
|
<LayKeys></LayKeys>
|
||||||
|
<LayCat></LayCat>
|
||||||
|
<LayLic></LayLic>
|
||||||
|
<LayTarg>0</LayTarg>
|
||||||
|
<LayPrjMark>1</LayPrjMark>
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
|
</LayerInfo>
|
||||||
|
|
||||||
|
</Project>
|
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 188 KiB |
After Width: | Height: | Size: 204 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 535 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 215 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 82 KiB |
@@ -0,0 +1,450 @@
|
|||||||
|
;*******************************************************************************
|
||||||
|
;* File Name : startup_stm32l496xx.s
|
||||||
|
;* Author : MCD Application Team
|
||||||
|
;* Description : STM32L496xx Ultra Low Power devices vector table for MDK-ARM toolchain.
|
||||||
|
;* This module performs:
|
||||||
|
;* - Set the initial SP
|
||||||
|
;* - Set the initial PC == Reset_Handler
|
||||||
|
;* - Set the vector table entries with the exceptions ISR address
|
||||||
|
;* - Branches to __main in the C library (which eventually
|
||||||
|
;* calls main()).
|
||||||
|
;* After Reset the Cortex-M4 processor is in Thread mode,
|
||||||
|
;* priority is Privileged, and the Stack is set to Main.
|
||||||
|
;* <<< Use Configuration Wizard in Context Menu >>>
|
||||||
|
;*******************************************************************************
|
||||||
|
;*
|
||||||
|
;* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||||
|
;* All rights reserved.</center></h2>
|
||||||
|
;*
|
||||||
|
;* This software component is licensed by ST under BSD 3-Clause license,
|
||||||
|
;* the "License"; You may not use this file except in compliance with the
|
||||||
|
;* License. You may obtain a copy of the License at:
|
||||||
|
;* opensource.org/licenses/BSD-3-Clause
|
||||||
|
;*
|
||||||
|
;*******************************************************************************
|
||||||
|
;
|
||||||
|
; Amount of memory (in bytes) allocated for Stack
|
||||||
|
; Tailor this value to your application needs
|
||||||
|
; <h> Stack Configuration
|
||||||
|
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
|
||||||
|
Stack_Size EQU 0x400
|
||||||
|
|
||||||
|
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||||
|
Stack_Mem SPACE Stack_Size
|
||||||
|
__initial_sp
|
||||||
|
|
||||||
|
|
||||||
|
; <h> Heap Configuration
|
||||||
|
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||||
|
; </h>
|
||||||
|
|
||||||
|
Heap_Size EQU 0x200
|
||||||
|
|
||||||
|
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||||
|
__heap_base
|
||||||
|
Heap_Mem SPACE Heap_Size
|
||||||
|
__heap_limit
|
||||||
|
|
||||||
|
PRESERVE8
|
||||||
|
THUMB
|
||||||
|
|
||||||
|
|
||||||
|
; Vector Table Mapped to Address 0 at Reset
|
||||||
|
AREA RESET, DATA, READONLY
|
||||||
|
EXPORT __Vectors
|
||||||
|
EXPORT __Vectors_End
|
||||||
|
EXPORT __Vectors_Size
|
||||||
|
|
||||||
|
__Vectors DCD __initial_sp ; Top of Stack
|
||||||
|
DCD Reset_Handler ; Reset Handler
|
||||||
|
DCD NMI_Handler ; NMI Handler
|
||||||
|
DCD HardFault_Handler ; Hard Fault Handler
|
||||||
|
DCD MemManage_Handler ; MPU Fault Handler
|
||||||
|
DCD BusFault_Handler ; Bus Fault Handler
|
||||||
|
DCD UsageFault_Handler ; Usage Fault Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD SVC_Handler ; SVCall Handler
|
||||||
|
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD PendSV_Handler ; PendSV Handler
|
||||||
|
DCD SysTick_Handler ; SysTick Handler
|
||||||
|
|
||||||
|
; External Interrupts
|
||||||
|
DCD WWDG_IRQHandler ; Window WatchDog
|
||||||
|
DCD PVD_PVM_IRQHandler ; PVD/PVM1/PVM2/PVM3/PVM4 through EXTI Line detection
|
||||||
|
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
|
||||||
|
DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
|
||||||
|
DCD FLASH_IRQHandler ; FLASH
|
||||||
|
DCD RCC_IRQHandler ; RCC
|
||||||
|
DCD EXTI0_IRQHandler ; EXTI Line0
|
||||||
|
DCD EXTI1_IRQHandler ; EXTI Line1
|
||||||
|
DCD EXTI2_IRQHandler ; EXTI Line2
|
||||||
|
DCD EXTI3_IRQHandler ; EXTI Line3
|
||||||
|
DCD EXTI4_IRQHandler ; EXTI Line4
|
||||||
|
DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
|
||||||
|
DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
|
||||||
|
DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
|
||||||
|
DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
|
||||||
|
DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
|
||||||
|
DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
|
||||||
|
DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
|
||||||
|
DCD ADC1_2_IRQHandler ; ADC1, ADC2
|
||||||
|
DCD CAN1_TX_IRQHandler ; CAN1 TX
|
||||||
|
DCD CAN1_RX0_IRQHandler ; CAN1 RX0
|
||||||
|
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
|
||||||
|
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
|
||||||
|
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
|
||||||
|
DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15
|
||||||
|
DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16
|
||||||
|
DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Commutation and TIM17
|
||||||
|
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
|
||||||
|
DCD TIM2_IRQHandler ; TIM2
|
||||||
|
DCD TIM3_IRQHandler ; TIM3
|
||||||
|
DCD TIM4_IRQHandler ; TIM4
|
||||||
|
DCD I2C1_EV_IRQHandler ; I2C1 Event
|
||||||
|
DCD I2C1_ER_IRQHandler ; I2C1 Error
|
||||||
|
DCD I2C2_EV_IRQHandler ; I2C2 Event
|
||||||
|
DCD I2C2_ER_IRQHandler ; I2C2 Error
|
||||||
|
DCD SPI1_IRQHandler ; SPI1
|
||||||
|
DCD SPI2_IRQHandler ; SPI2
|
||||||
|
DCD USART1_IRQHandler ; USART1
|
||||||
|
DCD USART2_IRQHandler ; USART2
|
||||||
|
DCD USART3_IRQHandler ; USART3
|
||||||
|
DCD EXTI15_10_IRQHandler ; External Line[15:10]
|
||||||
|
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
|
||||||
|
DCD DFSDM1_FLT3_IRQHandler ; DFSDM1 Filter 3 global Interrupt
|
||||||
|
DCD TIM8_BRK_IRQHandler ; TIM8 Break Interrupt
|
||||||
|
DCD TIM8_UP_IRQHandler ; TIM8 Update Interrupt
|
||||||
|
DCD TIM8_TRG_COM_IRQHandler ; TIM8 Trigger and Commutation Interrupt
|
||||||
|
DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare Interrupt
|
||||||
|
DCD ADC3_IRQHandler ; ADC3 global Interrupt
|
||||||
|
DCD FMC_IRQHandler ; FMC
|
||||||
|
DCD SDMMC1_IRQHandler ; SDMMC1
|
||||||
|
DCD TIM5_IRQHandler ; TIM5
|
||||||
|
DCD SPI3_IRQHandler ; SPI3
|
||||||
|
DCD UART4_IRQHandler ; UART4
|
||||||
|
DCD UART5_IRQHandler ; UART5
|
||||||
|
DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
|
||||||
|
DCD TIM7_IRQHandler ; TIM7
|
||||||
|
DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1
|
||||||
|
DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2
|
||||||
|
DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3
|
||||||
|
DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4
|
||||||
|
DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5
|
||||||
|
DCD DFSDM1_FLT0_IRQHandler ; DFSDM1 Filter 0 global Interrupt
|
||||||
|
DCD DFSDM1_FLT1_IRQHandler ; DFSDM1 Filter 1 global Interrupt
|
||||||
|
DCD DFSDM1_FLT2_IRQHandler ; DFSDM1 Filter 2 global Interrupt
|
||||||
|
DCD COMP_IRQHandler ; COMP Interrupt
|
||||||
|
DCD LPTIM1_IRQHandler ; LP TIM1 interrupt
|
||||||
|
DCD LPTIM2_IRQHandler ; LP TIM2 interrupt
|
||||||
|
DCD OTG_FS_IRQHandler ; USB OTG FS
|
||||||
|
DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6
|
||||||
|
DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7
|
||||||
|
DCD LPUART1_IRQHandler ; LP UART1 interrupt
|
||||||
|
DCD QUADSPI_IRQHandler ; Quad SPI global interrupt
|
||||||
|
DCD I2C3_EV_IRQHandler ; I2C3 event
|
||||||
|
DCD I2C3_ER_IRQHandler ; I2C3 error
|
||||||
|
DCD SAI1_IRQHandler ; Serial Audio Interface 1 global interrupt
|
||||||
|
DCD SAI2_IRQHandler ; Serial Audio Interface 2 global interrupt
|
||||||
|
DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt
|
||||||
|
DCD TSC_IRQHandler ; Touch Sense Controller global interrupt
|
||||||
|
DCD LCD_IRQHandler ; LCD global interrupt
|
||||||
|
DCD 0 ; Reserved
|
||||||
|
DCD RNG_IRQHandler ; RNG global interrupt
|
||||||
|
DCD FPU_IRQHandler ; FPU
|
||||||
|
DCD CRS_IRQHandler ; CRS error
|
||||||
|
DCD I2C4_EV_IRQHandler ; I2C4 event
|
||||||
|
DCD I2C4_ER_IRQHandler ; I2C4 error
|
||||||
|
DCD DCMI_IRQHandler ; DCMI global interrupt
|
||||||
|
DCD CAN2_TX_IRQHandler ; CAN2 TX
|
||||||
|
DCD CAN2_RX0_IRQHandler ; CAN2 RX0
|
||||||
|
DCD CAN2_RX1_IRQHandler ; CAN2 RX1
|
||||||
|
DCD CAN2_SCE_IRQHandler ; CAN2 SCE
|
||||||
|
DCD DMA2D_IRQHandler ; DMA2D global interrupt
|
||||||
|
|
||||||
|
__Vectors_End
|
||||||
|
|
||||||
|
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||||
|
|
||||||
|
AREA |.text|, CODE, READONLY
|
||||||
|
|
||||||
|
; Reset handler
|
||||||
|
Reset_Handler PROC
|
||||||
|
EXPORT Reset_Handler [WEAK]
|
||||||
|
IMPORT SystemInit
|
||||||
|
IMPORT __main
|
||||||
|
|
||||||
|
LDR R0, =SystemInit
|
||||||
|
BLX R0
|
||||||
|
LDR R0, =__main
|
||||||
|
BX R0
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
; Dummy Exception Handlers (infinite loops which can be modified)
|
||||||
|
|
||||||
|
NMI_Handler PROC
|
||||||
|
EXPORT NMI_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
HardFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT HardFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
MemManage_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT MemManage_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
BusFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT BusFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
UsageFault_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT UsageFault_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
SVC_Handler PROC
|
||||||
|
EXPORT SVC_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
DebugMon_Handler\
|
||||||
|
PROC
|
||||||
|
EXPORT DebugMon_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
PendSV_Handler PROC
|
||||||
|
EXPORT PendSV_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
SysTick_Handler PROC
|
||||||
|
EXPORT SysTick_Handler [WEAK]
|
||||||
|
B .
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
Default_Handler PROC
|
||||||
|
|
||||||
|
EXPORT WWDG_IRQHandler [WEAK]
|
||||||
|
EXPORT PVD_PVM_IRQHandler [WEAK]
|
||||||
|
EXPORT TAMP_STAMP_IRQHandler [WEAK]
|
||||||
|
EXPORT RTC_WKUP_IRQHandler [WEAK]
|
||||||
|
EXPORT FLASH_IRQHandler [WEAK]
|
||||||
|
EXPORT RCC_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI0_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI1_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI2_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI3_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI4_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel1_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel2_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel3_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel4_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel5_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel6_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA1_Channel7_IRQHandler [WEAK]
|
||||||
|
EXPORT ADC1_2_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_TX_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_RX0_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_RX1_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN1_SCE_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI9_5_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_BRK_TIM15_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_UP_TIM16_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_TRG_COM_TIM17_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM1_CC_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM2_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM3_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM4_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C1_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C1_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C2_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C2_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT SPI1_IRQHandler [WEAK]
|
||||||
|
EXPORT SPI2_IRQHandler [WEAK]
|
||||||
|
EXPORT USART1_IRQHandler [WEAK]
|
||||||
|
EXPORT USART2_IRQHandler [WEAK]
|
||||||
|
EXPORT USART3_IRQHandler [WEAK]
|
||||||
|
EXPORT EXTI15_10_IRQHandler [WEAK]
|
||||||
|
EXPORT RTC_Alarm_IRQHandler [WEAK]
|
||||||
|
EXPORT DFSDM1_FLT3_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM8_BRK_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM8_UP_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM8_TRG_COM_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM8_CC_IRQHandler [WEAK]
|
||||||
|
EXPORT ADC3_IRQHandler [WEAK]
|
||||||
|
EXPORT FMC_IRQHandler [WEAK]
|
||||||
|
EXPORT SDMMC1_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM5_IRQHandler [WEAK]
|
||||||
|
EXPORT SPI3_IRQHandler [WEAK]
|
||||||
|
EXPORT UART4_IRQHandler [WEAK]
|
||||||
|
EXPORT UART5_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM6_DAC_IRQHandler [WEAK]
|
||||||
|
EXPORT TIM7_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel1_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel2_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel3_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel4_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel5_IRQHandler [WEAK]
|
||||||
|
EXPORT DFSDM1_FLT0_IRQHandler [WEAK]
|
||||||
|
EXPORT DFSDM1_FLT1_IRQHandler [WEAK]
|
||||||
|
EXPORT DFSDM1_FLT2_IRQHandler [WEAK]
|
||||||
|
EXPORT COMP_IRQHandler [WEAK]
|
||||||
|
EXPORT LPTIM1_IRQHandler [WEAK]
|
||||||
|
EXPORT LPTIM2_IRQHandler [WEAK]
|
||||||
|
EXPORT OTG_FS_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel6_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2_Channel7_IRQHandler [WEAK]
|
||||||
|
EXPORT LPUART1_IRQHandler [WEAK]
|
||||||
|
EXPORT QUADSPI_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C3_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C3_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT SAI1_IRQHandler [WEAK]
|
||||||
|
EXPORT SAI2_IRQHandler [WEAK]
|
||||||
|
EXPORT SWPMI1_IRQHandler [WEAK]
|
||||||
|
EXPORT TSC_IRQHandler [WEAK]
|
||||||
|
EXPORT LCD_IRQHandler [WEAK]
|
||||||
|
EXPORT RNG_IRQHandler [WEAK]
|
||||||
|
EXPORT FPU_IRQHandler [WEAK]
|
||||||
|
EXPORT CRS_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C4_EV_IRQHandler [WEAK]
|
||||||
|
EXPORT I2C4_ER_IRQHandler [WEAK]
|
||||||
|
EXPORT DCMI_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN2_TX_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN2_RX0_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN2_RX1_IRQHandler [WEAK]
|
||||||
|
EXPORT CAN2_SCE_IRQHandler [WEAK]
|
||||||
|
EXPORT DMA2D_IRQHandler [WEAK]
|
||||||
|
|
||||||
|
WWDG_IRQHandler
|
||||||
|
PVD_PVM_IRQHandler
|
||||||
|
TAMP_STAMP_IRQHandler
|
||||||
|
RTC_WKUP_IRQHandler
|
||||||
|
FLASH_IRQHandler
|
||||||
|
RCC_IRQHandler
|
||||||
|
EXTI0_IRQHandler
|
||||||
|
EXTI1_IRQHandler
|
||||||
|
EXTI2_IRQHandler
|
||||||
|
EXTI3_IRQHandler
|
||||||
|
EXTI4_IRQHandler
|
||||||
|
DMA1_Channel1_IRQHandler
|
||||||
|
DMA1_Channel2_IRQHandler
|
||||||
|
DMA1_Channel3_IRQHandler
|
||||||
|
DMA1_Channel4_IRQHandler
|
||||||
|
DMA1_Channel5_IRQHandler
|
||||||
|
DMA1_Channel6_IRQHandler
|
||||||
|
DMA1_Channel7_IRQHandler
|
||||||
|
ADC1_2_IRQHandler
|
||||||
|
CAN1_TX_IRQHandler
|
||||||
|
CAN1_RX0_IRQHandler
|
||||||
|
CAN1_RX1_IRQHandler
|
||||||
|
CAN1_SCE_IRQHandler
|
||||||
|
EXTI9_5_IRQHandler
|
||||||
|
TIM1_BRK_TIM15_IRQHandler
|
||||||
|
TIM1_UP_TIM16_IRQHandler
|
||||||
|
TIM1_TRG_COM_TIM17_IRQHandler
|
||||||
|
TIM1_CC_IRQHandler
|
||||||
|
TIM2_IRQHandler
|
||||||
|
TIM3_IRQHandler
|
||||||
|
TIM4_IRQHandler
|
||||||
|
I2C1_EV_IRQHandler
|
||||||
|
I2C1_ER_IRQHandler
|
||||||
|
I2C2_EV_IRQHandler
|
||||||
|
I2C2_ER_IRQHandler
|
||||||
|
SPI1_IRQHandler
|
||||||
|
SPI2_IRQHandler
|
||||||
|
USART1_IRQHandler
|
||||||
|
USART2_IRQHandler
|
||||||
|
USART3_IRQHandler
|
||||||
|
EXTI15_10_IRQHandler
|
||||||
|
RTC_Alarm_IRQHandler
|
||||||
|
DFSDM1_FLT3_IRQHandler
|
||||||
|
TIM8_BRK_IRQHandler
|
||||||
|
TIM8_UP_IRQHandler
|
||||||
|
TIM8_TRG_COM_IRQHandler
|
||||||
|
TIM8_CC_IRQHandler
|
||||||
|
ADC3_IRQHandler
|
||||||
|
FMC_IRQHandler
|
||||||
|
SDMMC1_IRQHandler
|
||||||
|
TIM5_IRQHandler
|
||||||
|
SPI3_IRQHandler
|
||||||
|
UART4_IRQHandler
|
||||||
|
UART5_IRQHandler
|
||||||
|
TIM6_DAC_IRQHandler
|
||||||
|
TIM7_IRQHandler
|
||||||
|
DMA2_Channel1_IRQHandler
|
||||||
|
DMA2_Channel2_IRQHandler
|
||||||
|
DMA2_Channel3_IRQHandler
|
||||||
|
DMA2_Channel4_IRQHandler
|
||||||
|
DMA2_Channel5_IRQHandler
|
||||||
|
DFSDM1_FLT0_IRQHandler
|
||||||
|
DFSDM1_FLT1_IRQHandler
|
||||||
|
DFSDM1_FLT2_IRQHandler
|
||||||
|
COMP_IRQHandler
|
||||||
|
LPTIM1_IRQHandler
|
||||||
|
LPTIM2_IRQHandler
|
||||||
|
OTG_FS_IRQHandler
|
||||||
|
DMA2_Channel6_IRQHandler
|
||||||
|
DMA2_Channel7_IRQHandler
|
||||||
|
LPUART1_IRQHandler
|
||||||
|
QUADSPI_IRQHandler
|
||||||
|
I2C3_EV_IRQHandler
|
||||||
|
I2C3_ER_IRQHandler
|
||||||
|
SAI1_IRQHandler
|
||||||
|
SAI2_IRQHandler
|
||||||
|
SWPMI1_IRQHandler
|
||||||
|
TSC_IRQHandler
|
||||||
|
LCD_IRQHandler
|
||||||
|
RNG_IRQHandler
|
||||||
|
FPU_IRQHandler
|
||||||
|
CRS_IRQHandler
|
||||||
|
I2C4_EV_IRQHandler
|
||||||
|
I2C4_ER_IRQHandler
|
||||||
|
DCMI_IRQHandler
|
||||||
|
CAN2_TX_IRQHandler
|
||||||
|
CAN2_RX0_IRQHandler
|
||||||
|
CAN2_RX1_IRQHandler
|
||||||
|
CAN2_SCE_IRQHandler
|
||||||
|
DMA2D_IRQHandler
|
||||||
|
|
||||||
|
B .
|
||||||
|
|
||||||
|
ENDP
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
;*******************************************************************************
|
||||||
|
; User Stack and Heap initialization
|
||||||
|
;*******************************************************************************
|
||||||
|
IF :DEF:__MICROLIB
|
||||||
|
|
||||||
|
EXPORT __initial_sp
|
||||||
|
EXPORT __heap_base
|
||||||
|
EXPORT __heap_limit
|
||||||
|
|
||||||
|
ELSE
|
||||||
|
|
||||||
|
IMPORT __use_two_region_memory
|
||||||
|
EXPORT __user_initial_stackheap
|
||||||
|
|
||||||
|
__user_initial_stackheap
|
||||||
|
|
||||||
|
LDR R0, = Heap_Mem
|
||||||
|
LDR R1, =(Stack_Mem + Stack_Size)
|
||||||
|
LDR R2, = (Heap_Mem + Heap_Size)
|
||||||
|
LDR R3, = Stack_Mem
|
||||||
|
BX LR
|
||||||
|
|
||||||
|
ALIGN
|
||||||
|
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****
|
@@ -20,11 +20,11 @@ limitations under the License.
|
|||||||
|
|
||||||
// Initializes all data needed for the example. The name is important, and needs
|
// Initializes all data needed for the example. The name is important, and needs
|
||||||
// to be setup() for Arduino compatibility.
|
// to be setup() for Arduino compatibility.
|
||||||
extern "C" void person_detect_init();
|
//extern "C" void person_detect_init();
|
||||||
|
|
||||||
// Runs one iteration of data gathering and inference. This should be called
|
// Runs one iteration of data gathering and inference. This should be called
|
||||||
// repeatedly from the application code. The name needs to be loop() for Arduino
|
// repeatedly from the application code. The name needs to be loop() for Arduino
|
||||||
// compatibility.
|
// compatibility.
|
||||||
extern "C" int person_detect(uint8_t * hardware_input);
|
//extern "C" int person_detect(uint8_t * hardware_input);
|
||||||
|
|
||||||
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
||||||
|
@@ -54,6 +54,7 @@ void task1(void *arg)
|
|||||||
printf("*person_detect_task\r\n");
|
printf("*person_detect_task\r\n");
|
||||||
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
||||||
input_convert(camera_buffer,model_buffer);
|
input_convert(camera_buffer,model_buffer);
|
||||||
|
extern void person_detect(uint8_t*);
|
||||||
person_detect(model_buffer);
|
person_detect(model_buffer);
|
||||||
LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
||||||
|
|
||||||
@@ -87,7 +88,7 @@ void application_entry(void *arg)
|
|||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
extern void person_detect_init(void);
|
||||||
person_detect_init();
|
person_detect_init();
|
||||||
|
|
||||||
printf("***Start person detection task! \r\n");
|
printf("***Start person detection task! \r\n");
|
||||||
|
@@ -45,7 +45,7 @@ static uint8_t tensor_arena[kTensorArenaSize];
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// The name of this function is important for Arduino compatibility.
|
// The name of this function is important for Arduino compatibility.
|
||||||
void person_detect_init() {
|
extern "C" void person_detect_init() {
|
||||||
// Set up logging. Google style is to avoid globals or statics because of
|
// Set up logging. Google style is to avoid globals or statics because of
|
||||||
// lifetime uncertainty, but since this has a trivial destructor it's okay.
|
// lifetime uncertainty, but since this has a trivial destructor it's okay.
|
||||||
// NOLINTNEXTLINE(runtime-global-variables)
|
// NOLINTNEXTLINE(runtime-global-variables)
|
||||||
@@ -96,7 +96,7 @@ void person_detect_init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The name of this function is important for Arduino compatibility.
|
// The name of this function is important for Arduino compatibility.
|
||||||
int person_detect(uint8_t * hardware_input) {
|
extern "C" int person_detect(uint8_t * hardware_input) {
|
||||||
// Get image from provider.
|
// Get image from provider.
|
||||||
if (kTfLiteOk != GetImage(error_reporter, kNumCols, kNumRows, kNumChannels,
|
if (kTfLiteOk != GetImage(error_reporter, kNumCols, kNumRows, kNumChannels,
|
||||||
input->data.int8, hardware_input)) {
|
input->data.int8, hardware_input)) {
|
||||||
|
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* @file tflitemicro_person_detection.c
|
||||||
|
* @author Derekduke (dkeji627@gmail.com); QingChuanWS (bingshan45@163.com); yangqings (yangqingsheng12@outlook.com)
|
||||||
|
* @brief Person detection example based on TencentOS-Tiny and TFlite_Micro.
|
||||||
|
* @version 0.1
|
||||||
|
* @date 2021-01-05
|
||||||
|
* @copyright Copyright (c) 2021
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "cmsis_os.h"
|
||||||
|
#include "mcu_init.h"
|
||||||
|
#include "micro_speech.h"
|
||||||
|
|
||||||
|
uint8_t tensor_flag = 0;
|
||||||
|
|
||||||
|
#define TASK1_STK_SIZE 1024
|
||||||
|
void task1(void *arg);
|
||||||
|
osThreadDef(task1, osPriorityNormal, 1, TASK1_STK_SIZE);
|
||||||
|
|
||||||
|
#define TASK2_STK_SIZE 1024
|
||||||
|
void task2(void *arg);
|
||||||
|
osThreadDef(task2, osPriorityNormal, 1, TASK2_STK_SIZE);
|
||||||
|
|
||||||
|
void task1(void *arg)
|
||||||
|
{
|
||||||
|
while (1) {
|
||||||
|
printf("***task1\r\n");
|
||||||
|
osDelay(1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void task2(void *arg)
|
||||||
|
{
|
||||||
|
uint8_t* data = NULL;//you can input your own data
|
||||||
|
extern void speech_run(uint8_t*);
|
||||||
|
speech_run(data);
|
||||||
|
while (1) {
|
||||||
|
printf("***task2\r\n");
|
||||||
|
osDelay(2000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void application_entry(void *arg)
|
||||||
|
{
|
||||||
|
extern void speech_init(void);
|
||||||
|
speech_init();
|
||||||
|
printf("***Start speech detection task! \r\n");
|
||||||
|
osThreadCreate(osThread(task1), NULL); // Create task1
|
||||||
|
osThreadCreate(osThread(task2), NULL); // Create task2
|
||||||
|
}
|
||||||
|
|
@@ -0,0 +1,27 @@
|
|||||||
|
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
// This is a standard TensorFlow Lite FlatBuffer model file that has been
|
||||||
|
// converted into a C data array, so it can be easily compiled into a binary
|
||||||
|
// for devices that don't have a file system. It was created using the command:
|
||||||
|
// xxd -i model.tflite > model.cc
|
||||||
|
|
||||||
|
#ifndef TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_MODEL_H_
|
||||||
|
#define TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_MODEL_H_
|
||||||
|
|
||||||
|
extern const unsigned char g_model[];
|
||||||
|
extern const int g_model_len;
|
||||||
|
|
||||||
|
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_MODEL_H_
|
@@ -0,0 +1,188 @@
|
|||||||
|
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "no_micro_features_data.h"
|
||||||
|
|
||||||
|
// Golden test values for the expected spectrogram from a "no" sample file
|
||||||
|
// speech_commands_test_set_v0.02/no/f9643d42_nohash_4.wav.
|
||||||
|
|
||||||
|
const int g_no_micro_f9643d42_nohash_4_width = 40;
|
||||||
|
const int g_no_micro_f9643d42_nohash_4_height = 49;
|
||||||
|
const signed char g_no_micro_f9643d42_nohash_4_data[] = {
|
||||||
|
103, 78, 64, 76, 75, 54, 53, 67, 77, 60, 56, 70,
|
||||||
|
76, 71, 68, 58, 74, 32, 23, -2, -18, 11, 13, 15,
|
||||||
|
9, 20, 5, -7, -18, -2, -10, -18, -10, -12, 9, 7,
|
||||||
|
-33, -12, -4, -18, 57, 17, 55, 62, 70, 45, 61, 37,
|
||||||
|
67, 52, 48, 47, 55, 46, 57, 47, 73, 17, 27, 20,
|
||||||
|
19, 8, 15, -6, -1, 10, -12, -29, -6, -23, -18, -3,
|
||||||
|
-1, 5, 3, -4, -12, -8, -1, -14, 65, 48, 58, 43,
|
||||||
|
48, 19, 39, 39, 57, 57, 58, 55, 67, 58, 49, 50,
|
||||||
|
70, 27, 9, 16, 37, 4, 25, 4, 11, 9, 7, -33,
|
||||||
|
-7, -12, 3, -6, -29, -7, -7, -18, -12, -18, -2, -1,
|
||||||
|
0, 31, 60, -8, 51, 59, 70, 40, 71, 57, 52, 38,
|
||||||
|
66, 48, 17, 6, 59, 8, 15, 7, 18, 4, 18, -23,
|
||||||
|
-8, -4, -3, -12, -3, -26, 1, 10, 2, -29, -29, -37,
|
||||||
|
-7, -4, 6, -33, 67, 44, 59, -4, 64, 51, 68, 55,
|
||||||
|
74, 9, 40, 15, 57, 33, 60, 18, 40, 25, 27, -20,
|
||||||
|
25, -16, 6, 17, -10, -12, -23, -43, -23, -23, -29, -37,
|
||||||
|
-4, -16, -16, -60, -20, -23, -10, -29, -12, 15, 12, -37,
|
||||||
|
27, 15, 61, 44, 50, 8, 48, 22, 49, -18, 46, 33,
|
||||||
|
42, 34, 46, -8, 4, -18, -43, -43, -10, 1, -10, -16,
|
||||||
|
-10, -77, -16, -33, 11, -26, -23, -37, 0, -8, -16, -29,
|
||||||
|
42, 40, 68, 24, 47, 46, 53, -128, 30, 2, 42, 21,
|
||||||
|
21, -4, 43, 2, 43, 5, 32, -26, 7, -37, -43, -23,
|
||||||
|
-2, -8, 2, -37, -50, -60, -1, -7, -33, -77, -6, -18,
|
||||||
|
-16, -50, -12, -33, 53, 8, 52, 18, 51, 35, 69, 26,
|
||||||
|
44, 8, 27, -128, 21, -33, 17, -14, 38, -128, -14, -18,
|
||||||
|
17, -20, -14, -37, 8, -60, -33, -33, -33, -43, -12, -29,
|
||||||
|
-12, -128, -33, -60, -26, -77, -26, -50, 57, 29, 11, 30,
|
||||||
|
53, -10, 45, 15, 18, -10, 42, 2, 31, -29, 10, -4,
|
||||||
|
42, -37, -50, -128, -4, -43, -20, -77, -14, -26, -33, -128,
|
||||||
|
-12, -43, -8, -33, -33, -60, -43, -77, -12, -60, -26, -50,
|
||||||
|
40, -23, 36, 35, 50, -2, 37, 27, 26, -77, 49, -7,
|
||||||
|
28, -43, 6, 11, 41, -37, 33, -26, -14, -12, -6, -33,
|
||||||
|
-16, -26, -20, -77, -14, -43, -8, -50, -14, -37, -26, -77,
|
||||||
|
-26, -77, -14, -29, 50, -60, 25, -26, 57, 38, 51, 1,
|
||||||
|
50, 1, 53, -18, 30, -23, 11, -128, 18, -43, 20, -26,
|
||||||
|
-10, -26, -12, -128, -50, -60, -37, -77, -20, -43, -50, -128,
|
||||||
|
-77, -128, -77, -128, -33, -77, -20, -60, 53, -10, -37, -128,
|
||||||
|
10, -128, 60, 18, -8, 13, 37, -37, 8, -128, 3, -77,
|
||||||
|
32, -29, 14, 10, -12, -77, -37, -77, -37, -60, -23, -128,
|
||||||
|
-43, -50, -16, -77, -6, -33, 0, -60, -43, -128, -16, -60,
|
||||||
|
20, -2, 51, 19, 43, 2, 63, 20, 60, -4, 42, -50,
|
||||||
|
4, -128, 2, -3, 32, -33, -26, -128, -18, -128, -33, -43,
|
||||||
|
-7, -60, -50, -77, -29, -77, -23, -128, -16, -26, -23, -60,
|
||||||
|
-37, -77, -37, -128, -1, -33, 39, 48, 60, 5, 8, -128,
|
||||||
|
44, 11, 4, 0, 13, -77, -2, -20, 33, -128, -33, -77,
|
||||||
|
-8, -128, -14, -128, -33, -18, -12, -77, -16, -128, -37, -128,
|
||||||
|
-12, -77, -60, -128, -23, -60, -23, -128, 36, -50, 46, -128,
|
||||||
|
66, 39, 18, -14, -12, -77, -20, -6, 24, -128, 28, -26,
|
||||||
|
21, -77, -6, -33, 1, -128, -43, -128, -1, -50, -37, -128,
|
||||||
|
-50, -128, -33, -128, -18, -128, -60, -8, -7, -60, -60, -128,
|
||||||
|
-6, -29, 20, -1, 73, 40, -43, -14, 33, -43, 33, -3,
|
||||||
|
15, -29, 29, -43, 20, -60, -29, -128, -20, -26, 4, -77,
|
||||||
|
-16, -60, -33, -50, -29, -128, -60, -128, -77, -128, -37, -50,
|
||||||
|
0, -77, -33, -128, 39, 8, 47, 10, 62, 16, 2, 1,
|
||||||
|
10, 7, 4, -7, 6, -128, -77, -50, 19, -77, -77, -128,
|
||||||
|
-77, -128, -50, -128, -60, -60, -33, -50, -37, -128, -128, -128,
|
||||||
|
-60, -128, -37, -60, -18, -128, -33, -77, 37, 23, 29, -128,
|
||||||
|
-128, -128, -16, -128, -16, -33, 21, -20, -8, -60, -2, -60,
|
||||||
|
11, -128, -50, -128, -50, -128, -29, -77, -16, -128, -26, -128,
|
||||||
|
-50, -77, -43, -128, -128, -128, -50, -128, -33, -128, -33, -50,
|
||||||
|
-23, -128, 24, -128, -128, -77, 4, -23, 32, -128, 1, -26,
|
||||||
|
-14, -128, 10, -77, -4, -128, 1, -50, -8, -77, -77, -77,
|
||||||
|
-23, -128, -50, -43, -33, -128, -43, -128, -128, -128, -43, -128,
|
||||||
|
-50, -128, -128, -128, 44, 15, 14, -128, 9, -128, 21, 0,
|
||||||
|
29, -7, 18, -7, -7, -128, -33, -50, 14, -60, -60, -128,
|
||||||
|
-60, -128, -37, -128, -43, -128, -20, -128, -50, -128, -43, -77,
|
||||||
|
-26, -128, -60, -50, -60, -128, -77, -128, -3, -128, 14, -77,
|
||||||
|
-26, 11, 47, -77, -7, -77, 45, -43, -12, 14, 37, -60,
|
||||||
|
22, -4, 5, -77, -14, -128, -10, -60, 22, -77, -12, -60,
|
||||||
|
-50, -128, -60, -128, -60, -128, -43, -128, -50, -128, -77, -50,
|
||||||
|
27, -37, 33, -128, 4, -29, -4, -50, -20, -128, 6, -37,
|
||||||
|
-33, -128, -50, -128, 34, 15, -43, -128, -20, -50, -3, -37,
|
||||||
|
-37, -77, -77, -128, -43, -128, -128, -128, 4, -26, -26, 27,
|
||||||
|
0, -128, -29, -60, 35, -26, 23, -128, -29, -77, 19, 14,
|
||||||
|
28, -128, -16, -7, 31, -1, 17, 11, 60, 44, 8, 11,
|
||||||
|
18, -128, -33, -60, -1, -128, -43, -128, -23, -128, -128, -128,
|
||||||
|
59, 43, 35, 61, 37, -77, -77, -50, 116, 88, 98, 69,
|
||||||
|
78, 53, 78, 40, 48, 7, 29, -18, -2, -14, 5, 12,
|
||||||
|
65, 35, 31, -12, 33, -2, -6, -1, 44, -29, -14, -60,
|
||||||
|
-4, -43, -37, -128, 29, 18, 38, 51, 8, -128, -12, -37,
|
||||||
|
115, 91, 113, 77, 89, 36, 60, 44, 49, 36, 27, 31,
|
||||||
|
63, 30, 62, 14, 55, 49, 42, 0, 45, 17, -23, 1,
|
||||||
|
30, -37, -50, -77, -8, -60, 9, -60, -12, -50, 13, 4,
|
||||||
|
23, -6, 28, 13, 107, 78, 101, 73, 89, 46, 63, 17,
|
||||||
|
34, -43, -6, 30, 67, 40, 77, 21, 53, 39, 38, 12,
|
||||||
|
-6, 5, 28, -2, 18, -43, 0, -128, -29, -77, 18, -128,
|
||||||
|
-2, -77, 39, 35, 38, 35, 50, 29, 100, 70, 94, 69,
|
||||||
|
86, 50, 45, 38, 45, 12, 58, 64, 74, 36, 77, 45,
|
||||||
|
78, 62, 8, -60, 38, 6, 21, 7, 8, -37, -1, -20,
|
||||||
|
48, -37, 8, -10, 8, 13, 45, 39, 38, 22, 49, 25,
|
||||||
|
94, 63, 87, 66, 84, -128, 29, 20, 55, 51, 80, 36,
|
||||||
|
62, 30, 81, 72, 68, 37, 51, 27, 54, 22, 16, -29,
|
||||||
|
4, 9, 57, 15, 35, -43, -77, -20, 4, 6, 37, -1,
|
||||||
|
40, 31, 47, 14, 89, 68, 96, 83, 111, 96, 115, 87,
|
||||||
|
99, 76, 105, 84, 105, 86, 113, 91, 108, 87, 110, 78,
|
||||||
|
80, 46, 22, 74, 88, 72, 103, 86, 80, 68, 48, 24,
|
||||||
|
68, 48, 55, 36, 108, 90, 90, 63, 83, 63, 87, 64,
|
||||||
|
90, 92, 113, 88, 102, 79, 109, 83, 100, 89, 109, 60,
|
||||||
|
56, 21, 75, 62, 81, 45, 63, 73, 93, 65, 94, 80,
|
||||||
|
89, 81, 73, 3, 43, 60, 102, 70, 84, 67, 99, 74,
|
||||||
|
78, 57, 79, 50, 93, 82, 98, 56, 77, 70, 91, 71,
|
||||||
|
85, 82, 86, 13, 45, -18, 48, 40, 53, 28, 85, 60,
|
||||||
|
65, 52, 86, 78, 76, 46, 73, 19, 35, 54, 75, 40,
|
||||||
|
71, 60, 82, 37, 69, 42, 62, 40, 96, 70, 85, 77,
|
||||||
|
70, 68, 103, 84, 94, 69, 81, -128, -128, -128, -43, -37,
|
||||||
|
40, 2, 48, 45, 76, 37, 65, 16, 43, 18, 58, 20,
|
||||||
|
27, 12, 71, 31, 53, 44, 88, 47, 50, 33, 39, 8,
|
||||||
|
89, 57, 88, 69, 72, 63, 100, 68, 81, -77, -10, -128,
|
||||||
|
-128, -128, -128, -128, 13, -77, 8, 27, 60, 28, 41, -128,
|
||||||
|
-37, -128, 28, -43, -18, -128, 47, -37, 45, 27, 51, -29,
|
||||||
|
15, 39, 52, 30, 49, -33, 65, 15, 76, 71, 90, 19,
|
||||||
|
46, -128, -16, -128, -128, -128, -128, -128, -128, -128, -18, -128,
|
||||||
|
-20, -128, 32, -128, 21, -33, 45, -128, -128, -128, -12, -128,
|
||||||
|
-6, -14, 43, -128, -128, -128, -128, -128, 52, -18, 69, -43,
|
||||||
|
78, 55, 42, -128, -29, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, 14, -128, -16, -128, -128, -128, 7, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, 12, -128, -128, -128, -128, -16,
|
||||||
|
59, -50, 35, -128, 42, 0, 47, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -33, -128, -23, -128,
|
||||||
|
-128, -128, -23, -128, -128, -128, -128, -128, -128, -128, -33, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -8, -128, 36, -50, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -37, -128, -128, -60, -10, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, 21, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-12, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -77, -128, -128, -128, -29, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-29, -128, -128, -128, -128, -128, -128, -128, -128, -128, -50, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128,
|
||||||
|
};
|
@@ -0,0 +1,23 @@
|
|||||||
|
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
#ifndef TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_NO_MICRO_FEATURES_DATA_H_
|
||||||
|
#define TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_NO_MICRO_FEATURES_DATA_H_
|
||||||
|
|
||||||
|
extern const int g_no_micro_f9643d42_nohash_4_width;
|
||||||
|
extern const int g_no_micro_f9643d42_nohash_4_height;
|
||||||
|
extern const signed char g_no_micro_f9643d42_nohash_4_data[];
|
||||||
|
|
||||||
|
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_NO_MICRO_FEATURES_DATA_H_
|
@@ -0,0 +1,188 @@
|
|||||||
|
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "yes_micro_features_data.h"
|
||||||
|
|
||||||
|
// Golden test values for the expected spectrogram from a "yes" sample file
|
||||||
|
// speech_commands_test_set_v0.02/yes/f2e59fea_nohash_1.wav.
|
||||||
|
|
||||||
|
const int g_yes_micro_f2e59fea_nohash_1_width = 40;
|
||||||
|
const int g_yes_micro_f2e59fea_nohash_1_height = 49;
|
||||||
|
const signed char g_yes_micro_f2e59fea_nohash_1_data[] = {
|
||||||
|
116, 98, 118, 95, 106, 85, 101, 81, 67, -18, -33, -12,
|
||||||
|
-26, -128, 9, 34, 56, 45, 9, -12, 5, 30, 23, 28,
|
||||||
|
0, -18, 0, -128, -60, -50, -50, -37, -60, -60, -50, -26,
|
||||||
|
-33, -50, -33, -50, 83, 61, 81, 55, 76, 61, 73, 64,
|
||||||
|
38, -8, -37, -20, -18, -20, 48, 29, 52, 41, 55, 18,
|
||||||
|
25, 37, 44, 37, 8, 15, -6, -60, -128, -50, -37, -37,
|
||||||
|
-18, -37, -26, -29, -37, -60, -50, -60, 95, 59, 52, -4,
|
||||||
|
54, -18, 68, 43, 31, -18, -26, -33, -37, -29, 33, 7,
|
||||||
|
-3, 8, 26, 24, 36, 6, 36, 23, 14, 8, -29, -37,
|
||||||
|
-37, -37, -50, -50, -26, -8, -26, -37, -18, -37, -60, -77,
|
||||||
|
50, 48, 83, 44, 56, -128, -33, -60, 1, -26, -60, -43,
|
||||||
|
-14, -23, -18, -43, -26, -33, 13, -77, -43, -77, -33, -37,
|
||||||
|
16, -12, -37, -50, -50, -77, -20, -43, -60, -128, -60, -77,
|
||||||
|
-37, -77, -60, -128, 37, -10, 65, -7, 28, -128, 10, -77,
|
||||||
|
-37, -128, -77, -128, -77, -43, -128, -128, -77, -128, -128, -128,
|
||||||
|
-128, -128, -14, -128, -43, -50, -37, -77, -128, -128, -77, -43,
|
||||||
|
-29, -43, -20, -60, -37, -43, -50, -128, -77, -128, -18, -128,
|
||||||
|
-60, -128, -128, -128, -77, -128, -77, -128, -128, -128, -60, -37,
|
||||||
|
-20, -128, -60, -128, -128, -128, -60, -128, -77, -60, -128, -50,
|
||||||
|
-60, -128, -77, -128, -50, -60, -37, -60, -50, -77, -77, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -37, -128,
|
||||||
|
-128, -128, -128, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -77, -60, -128, -128, -50, -128, -50, -128,
|
||||||
|
-50, -128, -77, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -77, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-77, -128, -77, -128, -77, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -77, -128, -128, -128,
|
||||||
|
-128, -77, -50, -128, -128, -77, -77, -128, -128, -128, -50, -128,
|
||||||
|
85, 43, 65, 53, 69, 60, 45, 3, 46, -12, 9, -23,
|
||||||
|
32, -1, -128, -128, -128, -128, -1, 37, 38, 33, 43, 36,
|
||||||
|
58, 70, 68, 39, 6, 10, 32, 6, 8, -23, -77, -128,
|
||||||
|
-29, -128, -77, -128, 101, 87, 102, 91, 110, 88, 101, 83,
|
||||||
|
110, 95, 111, 83, 81, 84, 106, 90, 93, 82, 98, 91,
|
||||||
|
108, 95, 118, 97, 118, 97, 116, 96, 113, 90, 110, 96,
|
||||||
|
107, 85, 94, 66, 69, 36, 29, 0, 100, 60, 105, 68,
|
||||||
|
92, 93, 113, 92, 107, 85, 107, 83, 104, 91, 105, 85,
|
||||||
|
112, 88, 101, 80, 101, 79, 96, 80, 98, 80, 105, 83,
|
||||||
|
98, 81, 103, 71, 100, 79, 83, 78, 91, 47, 50, 13,
|
||||||
|
108, 81, 93, 78, 98, 76, 105, 76, 98, 40, 77, 72,
|
||||||
|
81, 62, 93, 77, 96, 80, 98, 61, 97, 69, 88, 61,
|
||||||
|
71, 56, 98, 68, 97, 72, 89, 51, 81, 61, 88, 75,
|
||||||
|
86, 56, 48, 13, 71, 22, 84, 66, 76, -7, 48, 61,
|
||||||
|
77, 62, 91, 65, 95, 74, 88, 59, 75, 58, 83, 55,
|
||||||
|
87, 55, 76, 43, 76, -3, 56, 60, 79, 57, 71, 54,
|
||||||
|
82, 33, 74, 71, 91, 45, 18, -7, 61, 56, 77, 41,
|
||||||
|
73, 42, 82, 49, 59, 63, 82, 65, 66, 38, 83, 34,
|
||||||
|
48, -8, 46, 20, 54, 33, 54, 6, 48, 16, 60, 37,
|
||||||
|
58, 22, 58, 14, 65, 53, 75, -4, 42, 16, 16, -50,
|
||||||
|
22, -128, 80, 54, 43, -50, 42, -128, -10, -77, 28, -29,
|
||||||
|
68, 43, 73, 2, 25, -60, 47, 14, 45, 7, 66, 4,
|
||||||
|
62, 37, 71, 7, 46, -10, 44, 22, 55, 53, 57, -29,
|
||||||
|
26, -10, -3, -128, 38, -128, 46, -10, 16, -128, -10, -26,
|
||||||
|
60, -7, 65, 38, 70, -60, 35, -8, 42, -29, 6, -128,
|
||||||
|
34, -128, 36, -60, 44, -12, -2, -128, -7, -60, -60, -128,
|
||||||
|
-23, -128, 31, -33, 22, -77, -37, -43, -128, -128, 3, -128,
|
||||||
|
-23, -128, 17, -77, 43, -77, -7, -128, -20, -128, 17, -43,
|
||||||
|
32, -128, -43, -128, -128, -77, 21, -128, -50, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -37, -128, -16, -128, -50, -26, -6, -128,
|
||||||
|
-128, -128, -128, -128, -23, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -16, -128, 36, -7, 16, -128, -128, -128, -128, -128,
|
||||||
|
-77, -128, -37, -128, -50, -128, -128, -128, -128, -128, -18, -128,
|
||||||
|
11, -128, -16, -77, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -26, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -20, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -50, -128, -77, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -77, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -1, -18, 5, -128,
|
||||||
|
40, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, 4, -128, 63, 66, 75, -128,
|
||||||
|
70, 60, 34, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
87, 86, 95, 76, 91, 62, 72, -6, -50, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, 64, 83, 104, 70,
|
||||||
|
98, 90, 111, 89, 109, 80, 71, -128, -128, -128, -128, -128,
|
||||||
|
-20, -6, 27, 33, 86, 88, 108, 75, 108, 76, 98, 64,
|
||||||
|
75, 61, 71, 66, 85, -1, -77, -128, 46, 61, 92, 69,
|
||||||
|
100, 93, 113, 80, 108, 93, 113, 91, 110, 80, 85, 15,
|
||||||
|
-33, -128, 12, -50, 34, 50, 70, 55, 84, 72, 108, 81,
|
||||||
|
111, 88, 100, 80, 84, 73, 97, 86, 99, 65, 85, 43,
|
||||||
|
96, 78, 107, 94, 118, 98, 115, 92, 118, 94, 111, 93,
|
||||||
|
111, 86, 99, 52, 32, -16, 48, 31, 81, 74, 85, 64,
|
||||||
|
78, 64, 98, 70, 110, 92, 96, 73, 100, 72, 94, 73,
|
||||||
|
98, 76, 85, 67, 101, 83, 101, 83, 112, 89, 98, 85,
|
||||||
|
105, 78, 98, 72, 102, 80, 95, 23, 19, -8, 52, 57,
|
||||||
|
103, 91, 95, 65, 74, 8, 77, 49, 96, 76, 100, 87,
|
||||||
|
105, 81, 94, 62, 94, 78, 81, 72, 99, 82, 101, 78,
|
||||||
|
108, 65, 82, 70, 100, 63, 79, 58, 80, 59, 87, 48,
|
||||||
|
50, 57, 93, 67, 86, 80, 103, 56, 77, 31, 81, 57,
|
||||||
|
62, 41, 96, 85, 91, 71, 101, 76, 89, 78, 95, 76,
|
||||||
|
96, 79, 103, 81, 103, 48, 70, 57, 88, 66, 84, 11,
|
||||||
|
85, 67, 104, 37, 38, 67, 90, 54, 81, 62, 90, 52,
|
||||||
|
78, -60, 54, -8, 68, 40, 55, 8, 77, 52, 66, 31,
|
||||||
|
55, 13, 60, 26, 69, 42, 63, -29, 57, -128, -3, -128,
|
||||||
|
3, -128, -29, -60, 52, -43, 63, 56, 86, 75, 95, 75,
|
||||||
|
85, 63, 82, 10, 50, -128, 31, -77, 0, -77, -23, -128,
|
||||||
|
12, -77, 51, -3, 58, -14, 44, 0, 48, 4, 53, 47,
|
||||||
|
28, -128, -128, -128, -37, -128, -3, -128, 49, 61, 100, 90,
|
||||||
|
117, 88, 107, 94, 112, 64, 96, 83, -128, -128, 7, -128,
|
||||||
|
-77, -128, -23, -128, -23, -128, 16, -37, 65, -8, 48, 20,
|
||||||
|
14, -77, 57, -18, -43, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
24, 12, 74, 76, 105, 76, 99, 80, 108, 79, 103, 85,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
42, -128, -8, -128, -50, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -60, -128, -128, 5, 73, 53, 93, 70, 101, 73,
|
||||||
|
94, 57, 86, 66, -18, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -50, -128, 36, -128, -128, -128, -128, -128, -20, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 23, 37,
|
||||||
|
75, 54, 97, 70, 83, 52, 85, 65, 7, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -43, -128, 23, -128, -43, -128,
|
||||||
|
-33, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -26, -37, 65, 33, 76, 37, 73, 50, 77, 47,
|
||||||
|
-12, -128, -128, -128, -128, -128, -128, -128, -128, -128, -7, -14,
|
||||||
|
-4, -128, -14, -128, 18, -60, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -26, -60, 71, 42, 68, 53,
|
||||||
|
81, 49, 73, 36, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -18, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, 15, -26,
|
||||||
|
44, -18, 59, 39, 57, 20, 62, 26, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, 49, -128, 30, 8, 69, 27, 62, 38,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -43, -128, 28, -37, 48, -10,
|
||||||
|
48, 11, 74, 37, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-77, -128, 11, -128, -7, -60, -77, -4, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -8, -128, -50, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
|
||||||
|
-128, -128, -128, -128,
|
||||||
|
};
|
@@ -0,0 +1,23 @@
|
|||||||
|
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
#ifndef TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_YES_MICRO_FEATURES_DATA_H_
|
||||||
|
#define TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_YES_MICRO_FEATURES_DATA_H_
|
||||||
|
|
||||||
|
extern const int g_yes_micro_f2e59fea_nohash_1_width;
|
||||||
|
extern const int g_yes_micro_f2e59fea_nohash_1_height;
|
||||||
|
extern const signed char g_yes_micro_f2e59fea_nohash_1_data[];
|
||||||
|
|
||||||
|
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_MICRO_SPEECH_MICRO_FEATURES_YES_MICRO_FEATURES_DATA_H_
|
@@ -0,0 +1,116 @@
|
|||||||
|
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "model.h"
|
||||||
|
#include "no_micro_features_data.h"
|
||||||
|
#include "yes_micro_features_data.h"
|
||||||
|
#include "micro_speech.h"
|
||||||
|
#include "tensorflow/lite/micro/micro_error_reporter.h"
|
||||||
|
#include "tensorflow/lite/micro/micro_interpreter.h"
|
||||||
|
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
||||||
|
#include "tensorflow/lite/schema/schema_generated.h"
|
||||||
|
#include "tensorflow/lite/version.h"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
tflite::MicroErrorReporter micro_error_reporter;
|
||||||
|
tflite::MicroMutableOpResolver<4> micro_op_resolver;
|
||||||
|
const tflite::Model* model = nullptr;
|
||||||
|
tflite::MicroInterpreter* interpreter = nullptr;
|
||||||
|
TfLiteTensor* model_input = nullptr;
|
||||||
|
|
||||||
|
// In order to use optimized tensorflow lite kernels, a signed int8_t quantized
|
||||||
|
// model is preferred over the legacy unsigned model format. This means that
|
||||||
|
// throughout this project, input images must be converted from unisgned to
|
||||||
|
// signed format. The easiest and quickest way to convert from unsigned to
|
||||||
|
// signed 8-bit integers is to subtract 128 from the unsigned value to get a
|
||||||
|
// signed value.
|
||||||
|
|
||||||
|
// An area of memory to use for input, output, and intermediate arrays.
|
||||||
|
// Create an area of memory to use for input, output, and intermediate arrays.
|
||||||
|
const int tensor_arena_size = 10 * 1024;
|
||||||
|
uint8_t tensor_arena[tensor_arena_size];
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
//TF_LITE_MICRO_TESTS_BEGIN
|
||||||
|
|
||||||
|
//TF_LITE_MICRO_TEST(TestInvoke) {
|
||||||
|
extern "C" void speech_init(int8_t* input_data){
|
||||||
|
// Set up logging.
|
||||||
|
|
||||||
|
|
||||||
|
// Map the model into a usable data structure. This doesn't involve any
|
||||||
|
// copying or parsing, it's a very lightweight operation.
|
||||||
|
const tflite::Model* model = ::tflite::GetModel(g_model);
|
||||||
|
|
||||||
|
static tflite::MicroMutableOpResolver<4> micro_op_resolver;
|
||||||
|
micro_op_resolver.AddDepthwiseConv2D();
|
||||||
|
micro_op_resolver.AddFullyConnected();
|
||||||
|
micro_op_resolver.AddReshape();
|
||||||
|
micro_op_resolver.AddSoftmax();
|
||||||
|
|
||||||
|
// Build an interpreter to run the model with.
|
||||||
|
static tflite::MicroInterpreter static_interpreter(model, micro_op_resolver, tensor_arena,
|
||||||
|
tensor_arena_size,
|
||||||
|
µ_error_reporter);
|
||||||
|
interpreter = &static_interpreter;
|
||||||
|
interpreter->AllocateTensors();
|
||||||
|
|
||||||
|
// Get information about the memory area to use for the model's input.
|
||||||
|
model_input = interpreter->input(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" void speech_run(int8_t* input_data){
|
||||||
|
// Copy a spectrogram created from a .wav audio file of someone saying "Yes",
|
||||||
|
// into the memory area used for the input.
|
||||||
|
const int8_t* yes_features_data = g_yes_micro_f2e59fea_nohash_1_data;
|
||||||
|
//const int8_t* yes_features_data = input_data; //input your own speech data
|
||||||
|
for (size_t i = 0; i < model_input->bytes; ++i) {
|
||||||
|
model_input->data.int8[i] = yes_features_data[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run the model on this input and make sure it succeeds.
|
||||||
|
TfLiteStatus invoke_status = interpreter->Invoke();
|
||||||
|
TfLiteTensor* output = interpreter->output(0);
|
||||||
|
const int kSilenceIndex = 0;
|
||||||
|
const int kUnknownIndex = 1;
|
||||||
|
const int kYesIndex = 2;
|
||||||
|
const int kNoIndex = 3;
|
||||||
|
|
||||||
|
// Make sure that the expected "Yes" score is higher than the other classes.
|
||||||
|
uint8_t silence_score = output->data.uint8[kSilenceIndex] + 128;
|
||||||
|
uint8_t unknown_score = output->data.uint8[kUnknownIndex] + 128;
|
||||||
|
uint8_t yes_score = output->data.int8[kYesIndex] + 128;
|
||||||
|
uint8_t no_score = output->data.int8[kNoIndex] + 128;
|
||||||
|
|
||||||
|
// Run the model on this "No" input.
|
||||||
|
invoke_status = interpreter->Invoke();
|
||||||
|
if (invoke_status != kTfLiteOk) {
|
||||||
|
TF_LITE_REPORT_ERROR(µ_error_reporter, "Invoke failed\n");
|
||||||
|
}
|
||||||
|
// TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, invoke_status);
|
||||||
|
|
||||||
|
// Get the output from the model, and make sure it's the expected size and
|
||||||
|
// type.
|
||||||
|
output = interpreter->output(0);
|
||||||
|
silence_score = output->data.int8[kSilenceIndex] + 128;
|
||||||
|
unknown_score = output->data.int8[kUnknownIndex] + 128;
|
||||||
|
yes_score = output->data.int8[kYesIndex] + 128;
|
||||||
|
no_score = output->data.int8[kNoIndex] + 128;
|
||||||
|
printf("speech test-> silence: %d unknown_score: %d yes_score: %d no_score: %d\n" , silence_score,unknown_score,yes_score,no_score);
|
||||||
|
|
||||||
|
TF_LITE_REPORT_ERROR(µ_error_reporter, "Ran successfully\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TF_LITE_MICRO_TESTS_END
|
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef TENSORFLOW_LITE_MICRO_EXAMPLES_SPEECH_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
||||||
|
#define TENSORFLOW_LITE_MICRO_EXAMPLES_SPEECH_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|
||||||
|
// Initializes all data needed for the example. The name is important, and needs
|
||||||
|
// to be setup() for Arduino compatibility.
|
||||||
|
|
||||||
|
#include "tensorflow/lite/c/common.h"
|
||||||
|
/*
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
void speech_init(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
void speech_run(uint8_t*);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
// Runs one iteration of data gathering and inference. This should be called
|
||||||
|
// repeatedly from the application code. The name needs to be loop() for Arduino
|
||||||
|
// compatibility.
|
||||||
|
//extern "C" int person_detect();
|
||||||
|
|
||||||
|
#endif // TENSORFLOW_LITE_MICRO_EXAMPLES_PERSON_DETECTION_EXPERIMENTAL_MAIN_FUNCTIONS_H_
|