refactor(knowing apps): yolov2 json parser

This commit is contained in:
yangtuo250 2021-12-07 07:42:25 +00:00
parent 235dcb761c
commit d368db9e76
33 changed files with 53022 additions and 248 deletions

View File

@ -2,7 +2,8 @@ config FACE_DETECT
bool "enable apps/face detect"
depends on BOARD_K210_EVB
depends on DRV_USING_OV2640
depends on USING_KPU_POSTPROCESSING
depends on USING_KPU_PROCESSING
depends on USING_YOLOV2
depends on USING_YOLOV2_JSONPARSER
select LIB_USING_CJSON
default n

View File

@ -1,24 +1,14 @@
#include <transform.h>
#ifdef LIB_USING_CJSON
#include <cJSON.h>
#include "cJSON.h"
#ifdef USING_YOLOV2_JSONPARSER
#include <json_parser.h>
#endif
#include "region_layer.h"
#define ANCHOR_NUM 5
#define STACK_SIZE (128 * 1024)
#define JSON_FILE_PATH "/kmodel/detect.json"
#define JSON_BUFFER_SIZE (4 * 1024)
static dmac_channel_number_t dma_ch = DMAC_CHANNEL_MAX;
// params from json
static float anchor[ANCHOR_NUM * 2] = {};
static int net_output_shape[3] = {};
static int net_input_size[2] = {};
static int sensor_output_size[2] = {};
static char kmodel_path[127] = "";
static int kmodel_size = 0;
static float obj_thresh[20] = {};
static float nms_thresh = 0.0;
static char labels[20][32] = {};
static int class_num = 0;
#define THREAD_PRIORITY_FACE_D (11)
static pthread_t facetid = 0;
@ -40,164 +30,34 @@ volatile uint32_t g_ai_done_flag;
static void ai_done(void *ctx) { g_ai_done_flag = 1; }
static void param_parse()
{
int fin;
char buffer[JSON_BUFFER_SIZE] = "";
// char *buffer;
// if (NULL != (buffer = (char*)malloc(JSON_BUFFER_SIZE * sizeof(char)))) {
// memset(buffer, 0, JSON_BUFFER_SIZE * sizeof(char));
// } else {
// printf("Json buffer malloc failed!");
// exit(-1);
// }
int array_size;
cJSON *json_obj;
cJSON *json_item;
cJSON *json_array_item;
fin = open(JSON_FILE_PATH, O_RDONLY);
if (!fin) {
printf("Error open file %s", JSON_FILE_PATH);
exit(-1);
}
read(fin, buffer, sizeof(buffer));
close(fin);
// read json string
json_obj = cJSON_Parse(buffer);
// free(buffer);
char *json_print_str = cJSON_Print(json_obj);
printf("Json file content: \n%s\n", json_print_str);
cJSON_free(json_print_str);
// get anchors
json_item = cJSON_GetObjectItem(json_obj, "anchors");
array_size = cJSON_GetArraySize(json_item);
if (ANCHOR_NUM * 2 != array_size) {
printf("Expect anchor size: %d, got %d in json file", ANCHOR_NUM * 2, array_size);
exit(-1);
} else {
printf("Got %d anchors from json file\n", ANCHOR_NUM);
}
for (int i = 0; i < ANCHOR_NUM * 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
anchor[i] = json_array_item->valuedouble;
printf("%d: %f\n", i, anchor[i]);
}
// net_input_size
json_item = cJSON_GetObjectItem(json_obj, "net_input_size");
array_size = cJSON_GetArraySize(json_item);
if (2 != array_size) {
printf("Expect net_input_size: %d, got %d in json file", 2, array_size);
exit(-1);
} else {
printf("Got %d net_input_size from json file\n", 2);
}
for (int i = 0; i < 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
net_input_size[i] = json_array_item->valueint;
printf("%d: %d\n", i, net_input_size[i]);
}
// net_output_shape
json_item = cJSON_GetObjectItem(json_obj, "net_output_shape");
array_size = cJSON_GetArraySize(json_item);
if (3 != array_size) {
printf("Expect net_output_shape: %d, got %d in json file", 3, array_size);
exit(-1);
} else {
printf("Got %d net_output_shape from json file\n", 3);
}
for (int i = 0; i < 3; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
net_output_shape[i] = json_array_item->valueint;
printf("%d: %d\n", i, net_output_shape[i]);
}
// sensor_output_size
json_item = cJSON_GetObjectItem(json_obj, "sensor_output_size");
array_size = cJSON_GetArraySize(json_item);
if (2 != array_size) {
printf("Expect sensor_output_size: %d, got %d in json file", 2, array_size);
exit(-1);
} else {
printf("Got %d sensor_output_size from json file\n", 2);
}
for (int i = 0; i < 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
sensor_output_size[i] = json_array_item->valueint;
printf("%d: %d\n", i, sensor_output_size[i]);
}
// kmodel_path
json_item = cJSON_GetObjectItem(json_obj, "kmodel_path");
memcpy(kmodel_path, json_item->valuestring, strlen(json_item->valuestring));
printf("Got kmodel_path: %s\n", kmodel_path);
// kmodel_size
json_item = cJSON_GetObjectItem(json_obj, "kmodel_size");
kmodel_size = json_item->valueint;
printf("Got kmodel_size: %d\n", kmodel_size);
// labels
json_item = cJSON_GetObjectItem(json_obj, "labels");
class_num = cJSON_GetArraySize(json_item);
if (0 >= class_num) {
printf("No labels!");
exit(-1);
} else {
printf("Got %d labels\n", class_num);
}
for (int i = 0; i < class_num; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
memcpy(labels[i], json_array_item->valuestring, strlen(json_array_item->valuestring));
printf("%d: %s\n", i, labels[i]);
}
// obj_thresh
json_item = cJSON_GetObjectItem(json_obj, "obj_thresh");
array_size = cJSON_GetArraySize(json_item);
if (class_num != array_size) {
printf("label number and thresh number mismatch! label number : %d, obj thresh number %d", class_num, array_size);
exit(-1);
} else {
printf("Got %d obj_thresh\n", array_size);
}
for (int i = 0; i < array_size; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
obj_thresh[i] = json_array_item->valuedouble;
printf("%d: %f\n", i, obj_thresh[i]);
}
// nms_thresh
json_item = cJSON_GetObjectItem(json_obj, "nms_thresh");
nms_thresh = json_item->valuedouble;
printf("Got nms_thresh: %f\n", nms_thresh);
cJSON_Delete(json_obj);
return;
}
void face_detect()
{
int ret = 0;
int result = 0;
int size = 0;
param_parse();
yolov2_params_t detect_params = param_parse(JSON_FILE_PATH);
g_fd = open("/dev/ov2640", O_RDONLY);
if (g_fd < 0) {
printf("open ov2640 fail !!");
return;
}
_ioctl_set_dvp_reso set_dvp_reso = {sensor_output_size[1], sensor_output_size[0]};
_ioctl_set_dvp_reso set_dvp_reso = {detect_params.sensor_output_size[1], detect_params.sensor_output_size[0]};
ioctl(g_fd, IOCTRL_CAMERA_SET_DVP_RESO, &set_dvp_reso);
showbuffer = (unsigned char *)rt_malloc_align(sensor_output_size[0] * sensor_output_size[1] * 2,64);
showbuffer =
(unsigned char *)rt_malloc_align(detect_params.sensor_output_size[0] * detect_params.sensor_output_size[1] * 2, 64);
if (NULL == showbuffer) {
close(g_fd);
printf("showbuffer apply memory fail !!");
return;
}
kpurgbbuffer = (unsigned char *)rt_malloc_align(net_input_size[0] * net_input_size[1] * 3,64);
kpurgbbuffer = (unsigned char *)rt_malloc_align(detect_params.net_input_size[0] * detect_params.net_input_size[1] * 3, 64);
if (NULL == kpurgbbuffer) {
close(g_fd);
rt_free_align(showbuffer);
printf("kpurgbbuffer apply memory fail !!");
return;
}
model_data = (unsigned char *)malloc(kmodel_size + 255);
model_data = (unsigned char *)malloc(detect_params.kmodel_size + 255);
if (NULL == model_data) {
rt_free_align(showbuffer);
rt_free_align(kpurgbbuffer);
@ -205,15 +65,15 @@ void face_detect()
printf("model_data apply memory fail !!");
return;
}
memset(model_data, 0, kmodel_size + 255);
memset(showbuffer, 0, sensor_output_size[0] * sensor_output_size[1] * 2);
memset(kpurgbbuffer, 0, net_input_size[0] * net_input_size[1] * 3);
memset(model_data, 0, detect_params.kmodel_size + 255);
memset(showbuffer, 0, detect_params.sensor_output_size[0] * detect_params.sensor_output_size[1] * 2);
memset(kpurgbbuffer, 0, detect_params.net_input_size[0] * detect_params.net_input_size[1] * 3);
shoot_para_t.pdata = (unsigned int *)(showbuffer);
shoot_para_t.length = (size_t)(sensor_output_size[0] * sensor_output_size[1] * 2);
shoot_para_t.length = (size_t)(detect_params.sensor_output_size[0] * detect_params.sensor_output_size[1] * 2);
/*
load memory
*/
kmodel_fd = open(kmodel_path, O_RDONLY);
kmodel_fd = open(detect_params.kmodel_path, O_RDONLY);
if (kmodel_fd < 0) {
printf("open kmodel fail");
close(g_fd);
@ -222,8 +82,8 @@ void face_detect()
free(model_data);
return;
} else {
size = read(kmodel_fd, model_data, kmodel_size);
if (size != kmodel_size) {
size = read(kmodel_fd, model_data, detect_params.kmodel_size);
if (size != detect_params.kmodel_size) {
printf("read kmodel error size %d\n", size);
close(g_fd);
close(kmodel_fd);
@ -237,8 +97,9 @@ void face_detect()
}
}
unsigned char *model_data_align = (unsigned char *)(((unsigned int)model_data + 255) & (~255));
dvp_set_ai_addr((uint32_t)kpurgbbuffer, (uint32_t)(kpurgbbuffer + net_input_size[0] * net_input_size[1]),
(uint32_t)(kpurgbbuffer + net_input_size[0] * net_input_size[1] * 2));
dvp_set_ai_addr((uint32_t)kpurgbbuffer,
(uint32_t)(kpurgbbuffer + detect_params.net_input_size[0] * detect_params.net_input_size[1]),
(uint32_t)(kpurgbbuffer + detect_params.net_input_size[0] * detect_params.net_input_size[1] * 2));
if (kpu_load_kmodel(&face_detect_task, model_data_align) != 0) {
printf("\nmodel init error\n");
close(g_fd);
@ -249,14 +110,15 @@ void face_detect()
return;
}
face_detect_rl.anchor_number = ANCHOR_NUM;
face_detect_rl.anchor = anchor;
face_detect_rl.threshold = malloc(class_num * sizeof(float));
for (int idx = 0; idx < class_num; idx++) {
face_detect_rl.threshold[idx] = obj_thresh[idx];
face_detect_rl.anchor = detect_params.anchor;
face_detect_rl.threshold = malloc(detect_params.class_num * sizeof(float));
for (int idx = 0; idx < detect_params.class_num; idx++) {
face_detect_rl.threshold[idx] = detect_params.obj_thresh[idx];
}
face_detect_rl.nms_value = nms_thresh;
result = region_layer_init(&face_detect_rl, net_output_shape[0], net_output_shape[1], net_output_shape[2],
net_input_size[1], net_input_size[0]);
face_detect_rl.nms_value = detect_params.nms_thresh;
result =
region_layer_init(&face_detect_rl, detect_params.net_output_shape[0], detect_params.net_output_shape[1],
detect_params.net_output_shape[2], detect_params.net_input_size[1], detect_params.net_input_size[0]);
printf("region_layer_init result %d \n\r", result);
size_t stack_size = STACK_SIZE;
pthread_attr_t attr; /* 线程属性 */
@ -267,7 +129,7 @@ void face_detect()
pthread_attr_setstacksize(&attr, stack_size);
/* 创建线程 1, 属性为 attr入口函数是 thread_entry入口函数参数是 1 */
result = pthread_create(&facetid, &attr, thread_face_detcet_entry, NULL);
result = pthread_create(&facetid, &attr, thread_face_detcet_entry, &detect_params);
if (0 == result) {
printf("thread_face_detcet_entry successfully!\n");
} else {
@ -281,6 +143,7 @@ MSH_CMD_EXPORT(face_detect, face detect task);
static void *thread_face_detcet_entry(void *parameter)
{
yolov2_params_t detect_params = *(yolov2_params_t *)parameter;
extern void lcd_draw_picture(uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, uint32_t * ptr);
printf("thread_face_detcet_entry start!\n");
int ret = 0;
@ -296,8 +159,7 @@ static void *thread_face_detcet_entry(void *parameter)
pthread_exit(NULL);
return NULL;
}
if (dmalock_sync_take(&dma_ch, 2000))
{
if (dmalock_sync_take(&dma_ch, 2000)) {
printf("Fail to take DMA channel");
}
kpu_run_kmodel(&face_detect_task, kpurgbbuffer, DMAC_CHANNEL5, ai_done, NULL);
@ -309,18 +171,21 @@ static void *thread_face_detcet_entry(void *parameter)
kpu_get_output(&face_detect_task, 0, (uint8_t **)&output, &output_size);
face_detect_rl.input = output;
region_layer_run(&face_detect_rl, &face_detect_info);
/* display result */
/* display result */
for (int face_cnt = 0; face_cnt < face_detect_info.obj_number; face_cnt++) {
draw_edge((uint32_t *)showbuffer, &face_detect_info, face_cnt, 0xF800, (uint16_t)sensor_output_size[1],
(uint16_t)sensor_output_size[0]);
draw_edge((uint32_t *)showbuffer, &face_detect_info, face_cnt, 0xF800,
(uint16_t)detect_params.sensor_output_size[1], (uint16_t)detect_params.sensor_output_size[0]);
// printf("%d: (%d, %d, %d, %d) cls: %s conf: %f\t", face_cnt, face_detect_info.obj[face_cnt].x1,
// face_detect_info.obj[face_cnt].y1, face_detect_info.obj[face_cnt].x2, face_detect_info.obj[face_cnt].y2,
// labels[face_detect_info.obj[face_cnt].class_id], face_detect_info.obj[face_cnt].prob);
// face_detect_info.obj[face_cnt].y1, face_detect_info.obj[face_cnt].x2,
// face_detect_info.obj[face_cnt].y2, detect_params.labels[face_detect_info.obj[face_cnt].class_id],
// face_detect_info.obj[face_cnt].prob);
}
#ifdef BSP_USING_LCD
lcd_draw_picture(0, 0, (uint16_t)sensor_output_size[1], (uint16_t)sensor_output_size[0], (uint32_t *)showbuffer);
//lcd_show_image(0, 0, (uint16_t)sensor_output_size[1], (uint16_t)sensor_output_size[0], (unsigned int *)showbuffer);
lcd_draw_picture(0, 0, (uint16_t)detect_params.sensor_output_size[1], (uint16_t)detect_params.sensor_output_size[0],
(uint32_t *)showbuffer);
// lcd_show_image(0, 0, (uint16_t)detect_params.sensor_output_size[1], (uint16_t)detect_params.sensor_output_size[0],
// (unsigned int *)showbuffer);
#endif
usleep(500);
if (1 == if_exit) {
@ -348,32 +213,32 @@ void face_detect_delete()
MSH_CMD_EXPORT(face_detect_delete, face detect task delete);
#endif
void kmodel_load(unsigned char *model_data)
{
int kmodel_fd = 0;
int size = 0;
kmodel_fd = open(kmodel_path, O_RDONLY);
// void kmodel_load(unsigned char *model_data)
// {
// int kmodel_fd = 0;
// int size = 0;
// kmodel_fd = open(detect_params.kmodel_path, O_RDONLY);
model_data = (unsigned char *)malloc(kmodel_size + 255);
if (NULL == model_data) {
printf("model_data apply memory fail !!");
return;
}
memset(model_data, 0, kmodel_size + 255);
// model_data = (unsigned char *)malloc(detect_params.kmodel_size + 255);
// if (NULL == model_data) {
// printf("model_data apply memory fail !!");
// return;
// }
// memset(model_data, 0, detect_params.kmodel_size + 255);
if (kmodel_fd >= 0) {
size = read(kmodel_fd, model_data, kmodel_size);
if (size != kmodel_size) {
printf("read kmodel error size %d\n", size);
// if (kmodel_fd >= 0) {
// size = read(kmodel_fd, model_data, detect_params.kmodel_size);
// if (size != detect_params.kmodel_size) {
// printf("read kmodel error size %d\n", size);
} else {
printf("read kmodel success");
}
} else {
free(model_data);
printf("open kmodel fail");
}
}
#ifdef __RT_THREAD_H__
MSH_CMD_EXPORT(kmodel_load, kmodel load memory);
#endif
// } else {
// printf("read kmodel success");
// }
// } else {
// free(model_data);
// printf("open kmodel fail");
// }
// }
// #ifdef __RT_THREAD_H__
// MSH_CMD_EXPORT(kmodel_load, kmodel load memory);
// #endif

View File

@ -2,7 +2,7 @@ config HELMET_DETECT
bool "enable apps/helmet detect"
depends on BOARD_K210_EVB
depends on DRV_USING_OV2640
depends on USING_KPU_POSTPROCESSING
depends on USING_KPU_PROCESSING
depends on USING_YOLOV2
select LIB_USING_CJSON
default n

View File

@ -2,7 +2,7 @@ config INSTRUSION_DETECT
bool "enable apps/instrusion detect"
depends on BOARD_K210_EVB
depends on DRV_USING_OV2640
depends on USING_KPU_POSTPROCESSING
depends on USING_KPU_PROCESSING
depends on USING_YOLOV2
select LIB_USING_CJSON
default n

View File

@ -4,9 +4,9 @@ menuconfig SUPPORT_KNOWING_FRAMEWORK
if SUPPORT_KNOWING_FRAMEWORK
source "$APP_DIR/Framework/knowing/tensorflow-lite/Kconfig"
source "$APP_DIR/Framework/knowing/kpu-postprocessing/Kconfig"
source "$APP_DIR/Framework/knowing/filter/Kconfig"
source "$APP_DIR/Framework/knowing/ota/Kconfig"
source "$APP_DIR/Framework/knowing/image_processing/Kconfig"
source "$APP_DIR/Framework/knowing/cmsis_5/Kconfig"
source "$APP_DIR/Framework/knowing/kpu/Kconfig"
endif

View File

@ -1,6 +0,0 @@
menuconfig USING_KPU_POSTPROCESSING
bool "kpu model postprocessing"
default y
if USING_KPU_POSTPROCESSING
source "$APP_DIR/Framework/knowing/kpu-postprocessing/yolov2/Kconfig"
endif

View File

@ -0,0 +1,7 @@
menuconfig USING_KPU_PROCESSING
bool "kpu model processing"
default y
if USING_KPU_PROCESSING
source "$APP_DIR/Framework/knowing/kpu/yolov2/Kconfig"
source "$APP_DIR/Framework/knowing/kpu/yolov2_json/Kconfig"
endif

View File

@ -1,6 +1,6 @@
menuconfig USING_YOLOV2
bool "yolov2 region layer"
depends on USING_KPU_POSTPROCESSING
depends on USING_KPU_PROCESSING
default n

View File

@ -0,0 +1,7 @@
menuconfig USING_YOLOV2_JSONPARSER
bool "yolov2 model json parser"
depends on USING_KPU_PROCESSING
default n

View File

@ -0,0 +1,10 @@
from building import *
import os
cwd = GetCurrentDir()
src = Glob('*.c')
group = DefineGroup('yolov2_json', src, depend = ['USING_YOLOV2_JSONPARSER', 'LIB_USING_CJSON'], CPPPATH = [cwd])
Return('group')

View File

@ -0,0 +1,138 @@
#include "json_parser.h"
#include <fcntl.h>
#include "cJSON.h"
yolov2_params_t param_parse(char *json_file_path)
{
yolov2_params_t params_return;
int fin;
char buffer[JSON_BUFFER_SIZE] = "";
// char *buffer;
// if (NULL != (buffer = (char*)malloc(JSON_BUFFER_SIZE * sizeof(char)))) {
// memset(buffer, 0, JSON_BUFFER_SIZE * sizeof(char));
// } else {
// printf("Json buffer malloc failed!");
// exit(-1);
// }
int array_size;
cJSON *json_obj;
cJSON *json_item;
cJSON *json_array_item;
fin = open(json_file_path, O_RDONLY);
if (!fin) {
printf("Error open file %s", json_file_path);
exit(-1);
}
read(fin, buffer, sizeof(buffer));
close(fin);
// read json string
json_obj = cJSON_Parse(buffer);
// free(buffer);
char *json_print_str = cJSON_Print(json_obj);
printf("Json file content: \n%s\n", json_print_str);
cJSON_free(json_print_str);
// get anchors
json_item = cJSON_GetObjectItem(json_obj, "anchors");
array_size = cJSON_GetArraySize(json_item);
if (ANCHOR_NUM * 2 != array_size) {
printf("Expect anchor size: %d, got %d in json file", ANCHOR_NUM * 2, array_size);
exit(-1);
} else {
printf("Got %d anchors from json file\n", ANCHOR_NUM);
}
for (int i = 0; i < ANCHOR_NUM * 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
params_return.anchor[i] = json_array_item->valuedouble;
printf("%d: %f\n", i, params_return.anchor[i]);
}
// net_input_size
json_item = cJSON_GetObjectItem(json_obj, "net_input_size");
array_size = cJSON_GetArraySize(json_item);
if (2 != array_size) {
printf("Expect net_input_size: %d, got %d in json file", 2, array_size);
exit(-1);
} else {
printf("Got %d net_input_size from json file\n", 2);
}
for (int i = 0; i < 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
params_return.net_input_size[i] = json_array_item->valueint;
printf("%d: %d\n", i, params_return.net_input_size[i]);
}
// net_output_shape
json_item = cJSON_GetObjectItem(json_obj, "net_output_shape");
array_size = cJSON_GetArraySize(json_item);
if (3 != array_size) {
printf("Expect net_output_shape: %d, got %d in json file", 3, array_size);
exit(-1);
} else {
printf("Got %d net_output_shape from json file\n", 3);
}
for (int i = 0; i < 3; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
params_return.net_output_shape[i] = json_array_item->valueint;
printf("%d: %d\n", i, params_return.net_output_shape[i]);
}
// sensor_output_size
json_item = cJSON_GetObjectItem(json_obj, "sensor_output_size");
array_size = cJSON_GetArraySize(json_item);
if (2 != array_size) {
printf("Expect sensor_output_size: %d, got %d in json file", 2, array_size);
exit(-1);
} else {
printf("Got %d sensor_output_size from json file\n", 2);
}
for (int i = 0; i < 2; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
params_return.sensor_output_size[i] = json_array_item->valueint;
printf("%d: %d\n", i, params_return.sensor_output_size[i]);
}
// kmodel_path
json_item = cJSON_GetObjectItem(json_obj, "kmodel_path");
memcpy(params_return.kmodel_path, json_item->valuestring, strlen(json_item->valuestring));
printf("Got kmodel_path: %s\n", params_return.kmodel_path);
// kmodel_size
json_item = cJSON_GetObjectItem(json_obj, "kmodel_size");
params_return.kmodel_size = json_item->valueint;
printf("Got kmodel_size: %d\n", params_return.kmodel_size);
// labels
json_item = cJSON_GetObjectItem(json_obj, "labels");
params_return.class_num = cJSON_GetArraySize(json_item);
if (0 >= params_return.class_num) {
printf("No labels!");
exit(-1);
} else {
printf("Got %d labels\n", params_return.class_num);
}
for (int i = 0; i < params_return.class_num; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
memcpy(params_return.labels[i], json_array_item->valuestring, strlen(json_array_item->valuestring));
printf("%d: %s\n", i, params_return.labels[i]);
}
// obj_thresh
json_item = cJSON_GetObjectItem(json_obj, "obj_thresh");
array_size = cJSON_GetArraySize(json_item);
if (params_return.class_num != array_size) {
printf("label number and thresh number mismatch! label number : %d, obj thresh number %d", params_return.class_num,
array_size);
exit(-1);
} else {
printf("Got %d obj_thresh\n", array_size);
}
for (int i = 0; i < array_size; i++) {
json_array_item = cJSON_GetArrayItem(json_item, i);
params_return.obj_thresh[i] = json_array_item->valuedouble;
printf("%d: %f\n", i, params_return.obj_thresh[i]);
}
// nms_thresh
json_item = cJSON_GetObjectItem(json_obj, "nms_thresh");
params_return.nms_thresh = json_item->valuedouble;
printf("Got nms_thresh: %f\n", params_return.nms_thresh);
cJSON_Delete(json_obj);
return params_return;
}

View File

@ -0,0 +1,23 @@
#ifndef _JSON_PARSER_H_
#define _JSON_PARSER_H_
#define ANCHOR_NUM 5
#define JSON_BUFFER_SIZE (4 * 1024)
// params from json
typedef struct {
float anchor[ANCHOR_NUM * 2];
int net_output_shape[3];
int net_input_size[2];
int sensor_output_size[2];
char kmodel_path[127];
int kmodel_size;
float obj_thresh[20];
float nms_thresh;
char labels[20][32];
int class_num;
} yolov2_params_t;
yolov2_params_t param_parse(char *json_file_path);
#endif

View File

@ -12,7 +12,6 @@ CONFIG_BOARD_K210_EVB=y
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_BIG_ENDIAN is not set
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
CONFIG_RT_USING_SMP=y
CONFIG_RT_CPUS_NR=2
@ -27,7 +26,6 @@ CONFIG_RT_USING_HOOK=y
CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
CONFIG_IDLE_THREAD_STACK_SIZE=4096
CONFIG_SYSTEM_THREAD_STACK_SIZE=4096
# CONFIG_RT_USING_TIMER_SOFT is not set
#
@ -35,7 +33,6 @@ CONFIG_SYSTEM_THREAD_STACK_SIZE=4096
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# CONFIG_RT_USING_ASM_MEMCPY is not set
CONFIG_RT_DEBUG=y
CONFIG_RT_DEBUG_COLOR=y
CONFIG_RT_DEBUG_INIT_CONFIG=y
@ -82,7 +79,6 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="uarths"
# CONFIG_RT_PRINTF_LONGLONG is not set
CONFIG_RT_VER_NUM=0x40004
CONFIG_ARCH_CPU_64BIT=y
# CONFIG_RT_USING_CPU_FFS is not set
@ -104,25 +100,24 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10
# C++ features
#
CONFIG_RT_USING_CPLUSPLUS=y
# CONFIG_RT_USING_CPLUSPLUS11 is not set
#
# Command shell
#
CONFIG_RT_USING_FINSH=y
CONFIG_RT_USING_MSH=y
CONFIG_FINSH_USING_MSH=y
CONFIG_FINSH_THREAD_NAME="tshell"
CONFIG_FINSH_THREAD_PRIORITY=20
CONFIG_FINSH_THREAD_STACK_SIZE=16384
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
CONFIG_FINSH_USING_SYMTAB=y
CONFIG_FINSH_CMD_SIZE=80
CONFIG_MSH_USING_BUILT_IN_COMMANDS=y
CONFIG_FINSH_USING_DESCRIPTION=y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY=20
CONFIG_FINSH_THREAD_STACK_SIZE=16384
CONFIG_FINSH_CMD_SIZE=80
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_USING_MSH=y
CONFIG_FINSH_USING_MSH_DEFAULT=y
# CONFIG_FINSH_USING_MSH_ONLY is not set
CONFIG_FINSH_ARG_MAX=10
#
@ -156,7 +151,6 @@ CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000
CONFIG_RT_USING_DFS_DEVFS=y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
@ -171,8 +165,6 @@ CONFIG_RT_USING_SYSTEM_WORKQUEUE=y
CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048
CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_USING_SERIAL_V1=y
# CONFIG_RT_USING_SERIAL_V2 is not set
CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_CAN is not set
@ -254,9 +246,8 @@ CONFIG_RT_USING_POSIX=y
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_POSIX_AIO is not set
CONFIG_RT_LIBC_USING_TIME=y
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
CONFIG_RT_LIBC_FIXED_TIMEZONE=8
#
# Network
@ -293,7 +284,6 @@ CONFIG_NETDEV_IPV6=0
CONFIG_RT_USING_LWIP=y
# CONFIG_RT_USING_LWIP141 is not set
CONFIG_RT_USING_LWIP202=y
# CONFIG_RT_USING_LWIP203 is not set
# CONFIG_RT_USING_LWIP212 is not set
# CONFIG_RT_USING_LWIP_IPV6 is not set
CONFIG_RT_LWIP_MEM_ALIGNMENT=8
@ -363,7 +353,6 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set
#
@ -480,6 +469,8 @@ CONFIG_FACE_DETECT=y
# CONFIG_INSTRUSION_DETECT is not set
# CONFIG_HELMET_DETECT is not set
# CONFIG_IRIS_ML_DEMO is not set
# CONFIG_K210_FFT_TEST is not set
# CONFIG_USING_IMAGE_PROCESSING_APP is not set
#
# sensor app
@ -516,10 +507,12 @@ CONFIG_USING_TENSORFLOWLITEMICRO=y
CONFIG_USING_TENSORFLOWLITEMICRO_NORMAL=y
# CONFIG_USING_TENSORFLOWLITEMICRO_CMSISNN is not set
# CONFIG_USING_TENSORFLOWLITEMICRO_DEMOAPP is not set
CONFIG_USING_KPU_POSTPROCESSING=y
CONFIG_USING_KPU_PROCESSING=y
CONFIG_USING_YOLOV2=y
CONFIG_USING_YOLOV2_JSONPARSER=y
# CONFIG_USING_KNOWING_FILTER is not set
# CONFIG_USING_OTA_MODEL is not set
# CONFIG_USING_IMAGE_PROCESSING is not set
# CONFIG_SUPPORT_CONTROL_FRAMEWORK is not set
#

View File

@ -24,7 +24,6 @@
#define RT_USING_IDLE_HOOK
#define RT_IDLE_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 4096
#define SYSTEM_THREAD_STACK_SIZE 4096
/* kservice optimization */
@ -76,17 +75,16 @@
/* Command shell */
#define RT_USING_FINSH
#define RT_USING_MSH
#define FINSH_USING_MSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 16384
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
#define FINSH_CMD_SIZE 80
#define MSH_USING_BUILT_IN_COMMANDS
#define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 16384
#define FINSH_CMD_SIZE 80
#define FINSH_USING_MSH
#define FINSH_USING_MSH_DEFAULT
#define FINSH_ARG_MAX 10
/* Device virtual file system */
@ -110,7 +108,6 @@
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
#define RT_DFS_ELM_REENTRANT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
#define RT_USING_DFS_DEVFS
/* Device Drivers */
@ -121,7 +118,6 @@
#define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
#define RT_SYSTEM_WORKQUEUE_PRIORITY 23
#define RT_USING_SERIAL
#define RT_USING_SERIAL_V1
#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
@ -168,8 +164,7 @@
#define RT_USING_PTHREADS
#define PTHREAD_NUM_MAX 8
#define RT_USING_POSIX
#define RT_LIBC_USING_TIME
#define RT_LIBC_DEFAULT_TIMEZONE 8
#define RT_LIBC_FIXED_TIMEZONE 8
/* Network */
@ -347,8 +342,9 @@
#define SUPPORT_KNOWING_FRAMEWORK
#define USING_TENSORFLOWLITEMICRO
#define USING_TENSORFLOWLITEMICRO_NORMAL
#define USING_KPU_POSTPROCESSING
#define USING_KPU_PROCESSING
#define USING_YOLOV2
#define USING_YOLOV2_JSONPARSER
/* Security */

View File

@ -522,7 +522,8 @@ CONFIG_SENSOR_DEVICE_D124_DEV="/dev/uart2"
# CONFIG_SUPPORT_CONNECTION_FRAMEWORK is not set
CONFIG_SUPPORT_KNOWING_FRAMEWORK=y
# CONFIG_USING_TENSORFLOWLITEMICRO is not set
# CONFIG_USING_KPU_POSTPROCESSING is not set
CONFIG_USING_KPU_PROCESSING=y
# CONFIG_USING_YOLOV2 is not set
# CONFIG_USING_KNOWING_FILTER is not set
# CONFIG_USING_OTA_MODEL is not set
# CONFIG_USING_IMAGE_PROCESSING is not set

View File

@ -331,6 +331,7 @@
#define SENSOR_QUANTITY_D124_VOICE "voice_1"
#define SENSOR_DEVICE_D124_DEV "/dev/uart2"
#define SUPPORT_KNOWING_FRAMEWORK
#define USING_KPU_PROCESSING
/* Security */

View File

@ -0,0 +1,541 @@
#
# Automatically generated file; DO NOT EDIT.
# XIUOS Rt-thread Configuration
#
CONFIG_ROOT_DIR="../../../.."
CONFIG_BSP_DIR="."
CONFIG_RT_Thread_DIR="../.."
CONFIG_RTT_DIR="../../rt-thread"
CONFIG_BOARD_K210_EVB=y
#
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_BIG_ENDIAN is not set
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
CONFIG_RT_USING_SMP=y
CONFIG_RT_CPUS_NR=2
CONFIG_RT_ALIGN_SIZE=8
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32=y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
CONFIG_RT_THREAD_PRIORITY_MAX=32
CONFIG_RT_TICK_PER_SECOND=100
CONFIG_RT_USING_OVERFLOW_CHECK=y
CONFIG_RT_USING_HOOK=y
CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
CONFIG_IDLE_THREAD_STACK_SIZE=4096
CONFIG_SYSTEM_THREAD_STACK_SIZE=4096
# CONFIG_RT_USING_TIMER_SOFT is not set
#
# kservice optimization
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# CONFIG_RT_USING_ASM_MEMCPY is not set
CONFIG_RT_DEBUG=y
CONFIG_RT_DEBUG_COLOR=y
CONFIG_RT_DEBUG_INIT_CONFIG=y
CONFIG_RT_DEBUG_INIT=1
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
# CONFIG_RT_DEBUG_MEM_CONFIG is not set
# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
#
# Inter-Thread communication
#
CONFIG_RT_USING_SEMAPHORE=y
CONFIG_RT_USING_MUTEX=y
CONFIG_RT_USING_EVENT=y
CONFIG_RT_USING_MAILBOX=y
CONFIG_RT_USING_MESSAGEQUEUE=y
CONFIG_RT_USING_SIGNALS=y
#
# Memory Management
#
CONFIG_RT_USING_MEMPOOL=y
CONFIG_RT_USING_MEMHEAP=y
# CONFIG_RT_USING_NOHEAP is not set
# CONFIG_RT_USING_SMALL_MEM is not set
CONFIG_RT_USING_SLAB=y
# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
# CONFIG_RT_USING_USERHEAP is not set
# CONFIG_RT_USING_MEMTRACE is not set
CONFIG_RT_USING_HEAP=y
#
# Kernel Device Object
#
CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_DEVICE_OPS is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="uarths"
# CONFIG_RT_PRINTF_LONGLONG is not set
CONFIG_RT_VER_NUM=0x40004
CONFIG_ARCH_CPU_64BIT=y
# CONFIG_RT_USING_CPU_FFS is not set
CONFIG_ARCH_RISCV=y
CONFIG_ARCH_RISCV_FPU=y
CONFIG_ARCH_RISCV_FPU_S=y
CONFIG_ARCH_RISCV64=y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
#
# RT-Thread Components
#
CONFIG_RT_USING_COMPONENTS_INIT=y
CONFIG_RT_USING_USER_MAIN=y
CONFIG_RT_MAIN_THREAD_STACK_SIZE=8192
CONFIG_RT_MAIN_THREAD_PRIORITY=10
#
# C++ features
#
CONFIG_RT_USING_CPLUSPLUS=y
# CONFIG_RT_USING_CPLUSPLUS11 is not set
#
# Command shell
#
CONFIG_RT_USING_FINSH=y
CONFIG_RT_USING_MSH=y
CONFIG_FINSH_USING_MSH=y
CONFIG_FINSH_THREAD_NAME="tshell"
CONFIG_FINSH_THREAD_PRIORITY=20
CONFIG_FINSH_THREAD_STACK_SIZE=16384
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
CONFIG_FINSH_USING_SYMTAB=y
CONFIG_FINSH_CMD_SIZE=80
CONFIG_MSH_USING_BUILT_IN_COMMANDS=y
CONFIG_FINSH_USING_DESCRIPTION=y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_ARG_MAX=10
#
# Device virtual file system
#
CONFIG_RT_USING_DFS=y
CONFIG_DFS_USING_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX=16
CONFIG_DFS_FILESYSTEM_TYPES_MAX=16
CONFIG_DFS_FD_MAX=64
# CONFIG_RT_USING_DFS_MNTTABLE is not set
CONFIG_RT_USING_DFS_ELMFAT=y
#
# elm-chan's FatFs, Generic FAT Filesystem Module
#
CONFIG_RT_DFS_ELM_CODE_PAGE=437
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
CONFIG_RT_DFS_ELM_USE_LFN_3=y
CONFIG_RT_DFS_ELM_USE_LFN=3
CONFIG_RT_DFS_ELM_LFN_UNICODE_0=y
# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set
CONFIG_RT_DFS_ELM_LFN_UNICODE=0
CONFIG_RT_DFS_ELM_MAX_LFN=255
CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000
CONFIG_RT_USING_DFS_DEVFS=y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
# CONFIG_RT_USING_DFS_NFS is not set
#
# Device Drivers
#
CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_PIPE_BUFSZ=512
CONFIG_RT_USING_SYSTEM_WORKQUEUE=y
CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048
CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_USING_SERIAL_V1=y
# CONFIG_RT_USING_SERIAL_V2 is not set
CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_PM is not set
CONFIG_RT_USING_RTC=y
# CONFIG_RT_USING_ALARM is not set
# CONFIG_RT_USING_SOFT_RTC is not set
# CONFIG_RT_USING_SDIO is not set
CONFIG_RT_USING_SPI=y
# CONFIG_RT_USING_QSPI is not set
CONFIG_RT_USING_SPI_MSD=y
CONFIG_RT_USING_SFUD=y
CONFIG_RT_SFUD_USING_SFDP=y
CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y
# CONFIG_RT_SFUD_USING_QSPI is not set
CONFIG_RT_SFUD_SPI_MAX_HZ=50000000
CONFIG_RT_DEBUG_SFUD=y
# CONFIG_RT_USING_ENC28J60 is not set
# CONFIG_RT_USING_SPI_WIFI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
# CONFIG_RT_USING_TOUCH is not set
# CONFIG_RT_USING_HWCRYPTO is not set
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
CONFIG_RT_USING_WIFI=y
CONFIG_RT_WLAN_DEVICE_STA_NAME="wlan0"
CONFIG_RT_WLAN_DEVICE_AP_NAME="wlan1"
CONFIG_RT_WLAN_SSID_MAX_LENGTH=32
CONFIG_RT_WLAN_PASSWORD_MAX_LENGTH=32
CONFIG_RT_WLAN_DEV_EVENT_NUM=2
CONFIG_RT_WLAN_MANAGE_ENABLE=y
CONFIG_RT_WLAN_SCAN_WAIT_MS=10000
CONFIG_RT_WLAN_CONNECT_WAIT_MS=10000
CONFIG_RT_WLAN_SCAN_SORT=y
CONFIG_RT_WLAN_MSH_CMD_ENABLE=y
CONFIG_RT_WLAN_AUTO_CONNECT_ENABLE=y
CONFIG_AUTO_CONNECTION_PERIOD_MS=2000
CONFIG_RT_WLAN_CFG_ENABLE=y
CONFIG_RT_WLAN_CFG_INFO_MAX=3
CONFIG_RT_WLAN_PROT_ENABLE=y
CONFIG_RT_WLAN_PROT_NAME_LEN=8
CONFIG_RT_WLAN_PROT_MAX=2
CONFIG_RT_WLAN_DEFAULT_PROT="lwip"
CONFIG_RT_WLAN_PROT_LWIP_ENABLE=y
CONFIG_RT_WLAN_PROT_LWIP_NAME="lwip"
# CONFIG_RT_WLAN_PROT_LWIP_PBUF_FORCE is not set
CONFIG_RT_WLAN_WORK_THREAD_ENABLE=y
CONFIG_RT_WLAN_WORKQUEUE_THREAD_NAME="wlan"
CONFIG_RT_WLAN_WORKQUEUE_THREAD_SIZE=2048
CONFIG_RT_WLAN_WORKQUEUE_THREAD_PRIO=15
# CONFIG_RT_WLAN_DEBUG is not set
#
# Using USB
#
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set
#
# POSIX layer and C standard library
#
CONFIG_RT_USING_LIBC=y
CONFIG_RT_USING_PTHREADS=y
CONFIG_PTHREAD_NUM_MAX=8
CONFIG_RT_USING_POSIX=y
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_POSIX_AIO is not set
CONFIG_RT_LIBC_USING_TIME=y
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
#
# Network
#
#
# Socket abstraction layer
#
CONFIG_RT_USING_SAL=y
# CONFIG_SAL_INTERNET_CHECK is not set
#
# protocol stack implement
#
CONFIG_SAL_USING_LWIP=y
CONFIG_SAL_USING_POSIX=y
#
# Network interface device
#
CONFIG_RT_USING_NETDEV=y
CONFIG_NETDEV_USING_IFCONFIG=y
CONFIG_NETDEV_USING_PING=y
CONFIG_NETDEV_USING_NETSTAT=y
CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4=1
CONFIG_NETDEV_IPV6=0
# CONFIG_NETDEV_IPV6_SCOPES is not set
#
# light weight TCP/IP stack
#
CONFIG_RT_USING_LWIP=y
# CONFIG_RT_USING_LWIP141 is not set
CONFIG_RT_USING_LWIP202=y
# CONFIG_RT_USING_LWIP203 is not set
# CONFIG_RT_USING_LWIP212 is not set
# CONFIG_RT_USING_LWIP_IPV6 is not set
CONFIG_RT_LWIP_MEM_ALIGNMENT=8
CONFIG_RT_LWIP_IGMP=y
CONFIG_RT_LWIP_ICMP=y
# CONFIG_RT_LWIP_SNMP is not set
CONFIG_RT_LWIP_DNS=y
CONFIG_RT_LWIP_DHCP=y
CONFIG_IP_SOF_BROADCAST=1
CONFIG_IP_SOF_BROADCAST_RECV=1
#
# Static IPv4 Address
#
CONFIG_RT_LWIP_IPADDR="192.168.1.30"
CONFIG_RT_LWIP_GWADDR="192.168.1.1"
CONFIG_RT_LWIP_MSKADDR="255.255.255.0"
CONFIG_RT_LWIP_UDP=y
CONFIG_RT_LWIP_TCP=y
CONFIG_RT_LWIP_RAW=y
# CONFIG_RT_LWIP_PPP is not set
CONFIG_RT_MEMP_NUM_NETCONN=8
CONFIG_RT_LWIP_PBUF_NUM=16
CONFIG_RT_LWIP_RAW_PCB_NUM=4
CONFIG_RT_LWIP_UDP_PCB_NUM=4
CONFIG_RT_LWIP_TCP_PCB_NUM=4
CONFIG_RT_LWIP_TCP_SEG_NUM=40
CONFIG_RT_LWIP_TCP_SND_BUF=8196
CONFIG_RT_LWIP_TCP_WND=8196
CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=10
CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=8
CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=10240
# CONFIG_LWIP_NO_RX_THREAD is not set
# CONFIG_LWIP_NO_TX_THREAD is not set
CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=12
CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=10240
CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8
# CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set
CONFIG_LWIP_NETIF_STATUS_CALLBACK=1
CONFIG_LWIP_NETIF_LINK_CALLBACK=1
CONFIG_SO_REUSE=1
CONFIG_LWIP_SO_RCVTIMEO=1
CONFIG_LWIP_SO_SNDTIMEO=1
CONFIG_LWIP_SO_RCVBUF=1
CONFIG_LWIP_SO_LINGER=0
# CONFIG_RT_LWIP_NETIF_LOOPBACK is not set
CONFIG_LWIP_NETIF_LOOPBACK=0
# CONFIG_RT_LWIP_STATS is not set
# CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set
CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_LWIP_DEBUG is not set
#
# AT commands
#
# CONFIG_RT_USING_AT is not set
# CONFIG_LWIP_USING_DHCPD is not set
#
# VBUS(Virtual Software BUS)
#
# CONFIG_RT_USING_VBUS is not set
#
# Utilities
#
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set
#
# RT-Thread Utestcases
#
# CONFIG_RT_USING_UTESTCASES is not set
#
# Board Drivers Config
#
CONFIG_BSP_USING_UART_HS=y
#
# General Purpose UARTs
#
CONFIG_BSP_USING_UART1=y
CONFIG_BSP_UART1_TXD_PIN=20
CONFIG_BSP_UART1_RXD_PIN=21
CONFIG_BSP_UART1_RTS_PIN=-1
CONFIG_BSP_UART1_CTS_PIN=-1
# CONFIG_BSP_USING_UART2 is not set
# CONFIG_BSP_USING_UART3 is not set
# CONFIG_BSP_USING_I2C1 is not set
CONFIG_BSP_USING_SPI1=y
# CONFIG_BSP_USING_SPI1_AS_QSPI is not set
CONFIG_BSP_SPI1_CLK_PIN=27
CONFIG_BSP_SPI1_D0_PIN=28
CONFIG_BSP_SPI1_D1_PIN=26
CONFIG_BSP_SPI1_USING_SS0=y
CONFIG_BSP_SPI1_SS0_PIN=29
CONFIG_BSP_SPI1_USING_SS1=y
CONFIG_BSP_SPI1_SS1_PIN=8
# CONFIG_BSP_SPI1_USING_SS2 is not set
# CONFIG_BSP_SPI1_USING_SS3 is not set
CONFIG_BSP_USING_LCD=y
CONFIG_BSP_LCD_CS_PIN=36
CONFIG_BSP_LCD_WR_PIN=39
CONFIG_BSP_LCD_DC_PIN=38
CONFIG_BSP_LCD_RST_PIN=37
CONFIG_BSP_LCD_BACKLIGHT_PIN=-1
CONFIG_BSP_LCD_BACKLIGHT_ACTIVE_LOW=y
# CONFIG_BSP_LCD_BACKLIGHT_ACTIVE_HIGH is not set
CONFIG_BSP_LCD_CLK_FREQ=20000000
# CONFIG_BSP_BOARD_KD233 is not set
# CONFIG_BSP_BOARD_K210_OPENMV_TEST is not set
CONFIG_BSP_BOARD_USER=y
CONFIG_BSP_LCD_X_MAX=240
CONFIG_BSP_LCD_Y_MAX=320
CONFIG_BSP_USING_SDCARD=y
CONFIG_BSP_USING_DVP=y
#
# The default pin assignment is based on the Maix Duino K210 development board
#
CONFIG_BSP_DVP_SCCB_SDA_PIN=40
CONFIG_BSP_DVP_SCCB_SCLK_PIN=41
CONFIG_BSP_DVP_CMOS_RST_PIN=42
CONFIG_BSP_DVP_CMOS_VSYNC_PIN=43
CONFIG_BSP_DVP_CMOS_PWDN_PIN=44
CONFIG_BSP_DVP_CMOS_XCLK_PIN=46
CONFIG_BSP_DVP_CMOS_PCLK_PIN=47
CONFIG_BSP_DVP_CMOS_HREF_PIN=45
#
# Kendryte SDK Config
#
CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0055
#
# More Drivers
#
# CONFIG_PKG_USING_RW007 is not set
CONFIG_DRV_USING_OV2640=y
#
# APP_Framework
#
#
# Applications
#
#
# config stack size and priority of main task
#
CONFIG_MAIN_KTASK_STACK_SIZE=1024
#
# ota app
#
# CONFIG_APPLICATION_OTA is not set
#
# test app
#
# CONFIG_USER_TEST is not set
#
# connection app
#
#
# control app
#
# CONFIG_APPLICATION_CONTROL is not set
#
# knowing app
#
CONFIG_APPLICATION_KNOWING=y
# CONFIG_APP_MNIST is not set
CONFIG_K210_DETECT_ENTRY=y
CONFIG_K210_DETECT_CONFIGJSON="/kmodel/face.json"
# CONFIG_IRIS_ML_DEMO is not set
# CONFIG_K210_FFT_TEST is not set
# CONFIG_USING_IMAGE_PROCESSING_APP is not set
#
# sensor app
#
CONFIG_APPLICATION_SENSOR=y
# CONFIG_APPLICATION_SENSOR_CO2 is not set
# CONFIG_APPLICATION_SENSOR_PM1_0 is not set
CONFIG_APPLICATION_SENSOR_VOICE=y
CONFIG_APPLICATION_SENSOR_VOICE_D124=y
# CONFIG_APPLICATION_SENSOR_HUMIDITY is not set
# CONFIG_APPLICATION_SENSOR_TEMPERATURE is not set
#
# Framework
#
CONFIG_TRANSFORM_LAYER_ATTRIUBUTE=y
CONFIG_ADD_XIUOS_FETURES=y
# CONFIG_ADD_NUTTX_FETURES is not set
# CONFIG_ADD_RTTHREAD_FETURES is not set
CONFIG_SUPPORT_SENSOR_FRAMEWORK=y
# CONFIG_SENSOR_CO2 is not set
# CONFIG_SENSOR_PM is not set
CONFIG_SENSOR_VOICE=y
CONFIG_SENSOR_D124=y
CONFIG_SENSOR_DEVICE_D124="d124_1"
CONFIG_SENSOR_QUANTITY_D124_VOICE="voice_1"
# CONFIG_SENSOR_D124_DRIVER_EXTUART is not set
CONFIG_SENSOR_DEVICE_D124_DEV="/dev/uar2"
# CONFIG_SENSOR_TEMPERATURE is not set
# CONFIG_SENSOR_HUMIDITY is not set
# CONFIG_SUPPORT_CONNECTION_FRAMEWORK is not set
CONFIG_SUPPORT_KNOWING_FRAMEWORK=y
CONFIG_USING_TENSORFLOWLITEMICRO=y
CONFIG_USING_TENSORFLOWLITEMICRO_NORMAL=y
# CONFIG_USING_TENSORFLOWLITEMICRO_CMSISNN is not set
# CONFIG_USING_TENSORFLOWLITEMICRO_DEMOAPP is not set
# CONFIG_USING_KNOWING_FILTER is not set
# CONFIG_USING_OTA_MODEL is not set
# CONFIG_USING_IMAGE_PROCESSING is not set
# CONFIG_USING_CMSIS_5 is not set
CONFIG_USING_KPU_PROCESSING=y
CONFIG_USING_YOLOV2=y
CONFIG_USING_YOLOV2_JSONPARSER=y
CONFIG_USING_K210_DETECT=y
# CONFIG_SUPPORT_CONTROL_FRAMEWORK is not set
#
# Security
#
# CONFIG_CRYPTO is not set
#
# lib
#
CONFIG_APP_SELECT_NEWLIB=y
# CONFIG_APP_SELECT_OTHER_LIB is not set
CONFIG_LIB_USING_CJSON=y
# CONFIG_LIB_USING_QUEUE is not set
CONFIG___STACKSIZE__=4096

Binary file not shown.

@ -0,0 +1 @@
Subproject commit 77d9df93ba7c2c886967995425638477cd139c4f

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,391 @@
#
# Automatically generated file; DO NOT EDIT.
# RT-Thread Configuration
#
CONFIG_ROOT_DIR="../../../.."
CONFIG_BSP_DIR="."
CONFIG_RT_Thread_DIR="../.."
CONFIG_RTT_DIR="../../rt-thread"
#
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX=8
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_ALIGN_SIZE=4
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32=y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
CONFIG_RT_THREAD_PRIORITY_MAX=32
CONFIG_RT_TICK_PER_SECOND=100
CONFIG_RT_USING_OVERFLOW_CHECK=y
CONFIG_RT_USING_HOOK=y
CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
CONFIG_IDLE_THREAD_STACK_SIZE=256
CONFIG_RT_USING_TIMER_SOFT=y
CONFIG_RT_TIMER_THREAD_PRIO=4
CONFIG_RT_TIMER_THREAD_STACK_SIZE=512
#
# kservice optimization
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
CONFIG_RT_DEBUG=y
# CONFIG_RT_DEBUG_COLOR is not set
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
# CONFIG_RT_DEBUG_THREAD_CONFIG is not set
# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set
# CONFIG_RT_DEBUG_IPC_CONFIG is not set
# CONFIG_RT_DEBUG_TIMER_CONFIG is not set
# CONFIG_RT_DEBUG_IRQ_CONFIG is not set
# CONFIG_RT_DEBUG_MEM_CONFIG is not set
# CONFIG_RT_DEBUG_SLAB_CONFIG is not set
# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set
# CONFIG_RT_DEBUG_MODULE_CONFIG is not set
#
# Inter-Thread communication
#
CONFIG_RT_USING_SEMAPHORE=y
CONFIG_RT_USING_MUTEX=y
CONFIG_RT_USING_EVENT=y
CONFIG_RT_USING_MAILBOX=y
CONFIG_RT_USING_MESSAGEQUEUE=y
# CONFIG_RT_USING_SIGNALS is not set
#
# Memory Management
#
CONFIG_RT_USING_MEMPOOL=y
# CONFIG_RT_USING_MEMHEAP is not set
# CONFIG_RT_USING_NOHEAP is not set
CONFIG_RT_USING_SMALL_MEM=y
# CONFIG_RT_USING_SLAB is not set
# CONFIG_RT_USING_USERHEAP is not set
# CONFIG_RT_USING_MEMTRACE is not set
CONFIG_RT_USING_HEAP=y
#
# Kernel Device Object
#
CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_DEVICE_OPS is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=128
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
CONFIG_RT_VER_NUM=0x40004
CONFIG_ARCH_ARM=y
CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM_CORTEX_M=y
CONFIG_ARCH_ARM_CORTEX_M4=y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
#
# RT-Thread Components
#
CONFIG_RT_USING_COMPONENTS_INIT=y
CONFIG_RT_USING_USER_MAIN=y
CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048
CONFIG_RT_MAIN_THREAD_PRIORITY=10
#
# C++ features
#
# CONFIG_RT_USING_CPLUSPLUS is not set
#
# Command shell
#
CONFIG_RT_USING_FINSH=y
CONFIG_FINSH_THREAD_NAME="tshell"
CONFIG_FINSH_USING_HISTORY=y
CONFIG_FINSH_HISTORY_LINES=5
CONFIG_FINSH_USING_SYMTAB=y
CONFIG_FINSH_USING_DESCRIPTION=y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY=20
CONFIG_FINSH_THREAD_STACK_SIZE=4096
CONFIG_FINSH_CMD_SIZE=80
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_USING_MSH=y
CONFIG_FINSH_USING_MSH_DEFAULT=y
# CONFIG_FINSH_USING_MSH_ONLY is not set
CONFIG_FINSH_ARG_MAX=10
#
# Device virtual file system
#
CONFIG_RT_USING_DFS=y
CONFIG_DFS_USING_WORKDIR=y
CONFIG_DFS_FILESYSTEMS_MAX=4
CONFIG_DFS_FILESYSTEM_TYPES_MAX=4
CONFIG_DFS_FD_MAX=16
# CONFIG_RT_USING_DFS_MNTTABLE is not set
CONFIG_RT_USING_DFS_ELMFAT=y
#
# elm-chan's FatFs, Generic FAT Filesystem Module
#
CONFIG_RT_DFS_ELM_CODE_PAGE=437
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
CONFIG_RT_DFS_ELM_USE_LFN_3=y
CONFIG_RT_DFS_ELM_USE_LFN=3
CONFIG_RT_DFS_ELM_LFN_UNICODE_0=y
# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set
CONFIG_RT_DFS_ELM_LFN_UNICODE=0
CONFIG_RT_DFS_ELM_MAX_LFN=255
CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_USING_DFS_DEVFS=y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
#
# Device Drivers
#
CONFIG_RT_USING_DEVICE_IPC=y
CONFIG_RT_PIPE_BUFSZ=512
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
CONFIG_RT_USING_I2C=y
# CONFIG_RT_I2C_DEBUG is not set
CONFIG_RT_USING_I2C_BITOPS=y
# CONFIG_RT_I2C_BITOPS_DEBUG is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
CONFIG_RT_USING_SPI=y
# CONFIG_RT_USING_QSPI is not set
CONFIG_RT_USING_SPI_MSD=y
# CONFIG_RT_USING_SFUD is not set
# CONFIG_RT_USING_ENC28J60 is not set
# CONFIG_RT_USING_SPI_WIFI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
# CONFIG_RT_USING_SENSOR is not set
# CONFIG_RT_USING_TOUCH is not set
# CONFIG_RT_USING_HWCRYPTO is not set
# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
# CONFIG_RT_USING_WIFI is not set
#
# Using USB
#
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set
#
# POSIX layer and C standard library
#
CONFIG_RT_USING_LIBC=y
# CONFIG_RT_USING_PTHREADS is not set
CONFIG_RT_USING_POSIX=y
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_POSIX_AIO is not set
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_FIXED_TIMEZONE=8
#
# Network
#
#
# Socket abstraction layer
#
# CONFIG_RT_USING_SAL is not set
#
# Network interface device
#
# CONFIG_RT_USING_NETDEV is not set
#
# light weight TCP/IP stack
#
# CONFIG_RT_USING_LWIP is not set
#
# AT commands
#
# CONFIG_RT_USING_AT is not set
#
# VBUS(Virtual Software BUS)
#
# CONFIG_RT_USING_VBUS is not set
#
# Utilities
#
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_RT_LINK is not set
# CONFIG_RT_USING_LWP is not set
#
# RT-Thread Utestcases
#
# CONFIG_RT_USING_UTESTCASES is not set
CONFIG_SOC_FAMILY_STM32=y
CONFIG_SOC_SERIES_STM32F4=y
#
# Hardware Drivers Config
#
CONFIG_SOC_STM32F407ZG=y
#
# Onboard Peripheral Drivers
#
CONFIG_BSP_USING_USB_TO_USART=y
# CONFIG_BSP_USING_COM2 is not set
# CONFIG_BSP_USING_COM3 is not set
CONFIG_BSP_USING_SRAM=y
# CONFIG_BSP_USING_SPI_FLASH is not set
# CONFIG_BSP_USING_EEPROM is not set
CONFIG_BSP_USING_OV2640=y
# CONFIG_BSP_USING_ETH is not set
# CONFIG_BSP_USING_MPU6050 is not set
CONFIG_BSP_USING_SDCARD=y
CONFIG_SDCARD_SPI2_CS_PIN=28
CONFIG_SDCARD_SPI_BUS_NAME="spi2"
#
# On-chip Peripheral Drivers
#
CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART1=y
# CONFIG_BSP_UART1_RX_USING_DMA is not set
# CONFIG_BSP_UART1_TX_USING_DMA is not set
# CONFIG_BSP_USING_UART2 is not set
# CONFIG_BSP_USING_UART3 is not set
# CONFIG_BSP_USING_UART4 is not set
# CONFIG_BSP_USING_UART5 is not set
# CONFIG_BSP_USING_UART6 is not set
# CONFIG_BSP_USING_TIM is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
CONFIG_BSP_USING_SPI=y
CONFIG_BSP_USING_SPI1=y
# CONFIG_BSP_SPI1_TX_USING_DMA is not set
# CONFIG_BSP_SPI1_RX_USING_DMA is not set
CONFIG_BSP_USING_SPI2=y
# CONFIG_BSP_SPI2_TX_USING_DMA is not set
# CONFIG_BSP_SPI2_RX_USING_DMA is not set
# CONFIG_BSP_USING_ADC is not set
CONFIG_BSP_USING_I2C1=y
CONFIG_BSP_I2C1_SCL_PIN=54
CONFIG_BSP_I2C1_SDA_PIN=55
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_SDIO is not set
CONFIG_BSP_USING_DCMI=y
# CONFIG_BSP_USING_USBD is not set
# CONFIG_BSP_USING_USBH is not set
# CONFIG_BSP_USING_PULSE_ENCODER is not set
CONFIG_BSP_USING_EXT_FMC_IO=y
CONFIG_BSP_USING_FMC=y
# CONFIG_BSP_USING_RNG is not set
# CONFIG_BSP_USING_UDID is not set
#
# Board extended module Drivers
#
#
# More Drivers
#
# CONFIG_PKG_USING_RW007 is not set
# CONFIG_DRV_USING_OV2640 is not set
#
# APP_Framework
#
#
# Applications
#
#
# config stack size and priority of main task
#
CONFIG_MAIN_KTASK_STACK_SIZE=1024
#
# test app
#
# CONFIG_USER_TEST is not set
#
# connection app
#
#
# control app
#
# CONFIG_APPLICATION_CONTROL is not set
#
# knowing app
#
CONFIG_IRIS_ML_DEMO=y
#
# sensor app
#
# CONFIG_APPLICATION_SENSOR is not set
#
# Framework
#
CONFIG_TRANSFORM_LAYER_ATTRIUBUTE=y
CONFIG_ADD_XIUOS_FETURES=y
# CONFIG_ADD_NUTTX_FETURES is not set
# CONFIG_ADD_RTTHREAD_FETURES is not set
CONFIG_SUPPORT_SENSOR_FRAMEWORK=y
# CONFIG_SENSOR_CO2 is not set
# CONFIG_SENSOR_PM is not set
# CONFIG_SENSOR_VOICE is not set
# CONFIG_SENSOR_TEMPERATURE is not set
# CONFIG_SENSOR_HUMIDITY is not set
# CONFIG_SUPPORT_CONNECTION_FRAMEWORK is not set
CONFIG_SUPPORT_KNOWING_FRAMEWORK=y
# CONFIG_USING_TENSORFLOWLITEMICRO is not set
CONFIG_USING_KPU_POSTPROCESSING=y
# CONFIG_USING_YOLOV2 is not set
# CONFIG_SUPPORT_CONTROL_FRAMEWORK is not set
#
# lib
#
CONFIG_APP_SELECT_NEWLIB=y
# CONFIG_APP_SELECT_OTHER_LIB is not set
# CONFIG_LIB_USING_CJSON is not set

View File

@ -0,0 +1,21 @@
#ifndef CCONFIG_H__
#define CCONFIG_H__
/* Automatically generated file; DO NOT EDIT. */
/* compiler configure file for RT-Thread in GCC*/
#define HAVE_NEWLIB_H 1
#define LIBC_VERSION "newlib 3.0.0"
#define HAVE_SYS_SIGNAL_H 1
#define HAVE_SYS_SELECT_H 1
#define HAVE_PTHREAD_H 1
#define HAVE_FDSET 1
#define HAVE_SIGACTION 1
#define HAVE_SIGEVENT 1
#define HAVE_SIGINFO 1
#define HAVE_SIGVAL 1
#define GCC_VERSION_STR "7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]"
#define STDC "2011"
#endif

File diff suppressed because it is too large Load Diff