# RT-AK-plugin-k210 **Repository Path**: mirrors_RT-Thread/RT-AK-plugin-k210 ## Basic Information - **Project Name**: RT-AK-plugin-k210 - **Description**: plugin for K210 of RT-Thread AI Kit - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2021-06-18 - **Last Updated**: 2025-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Other Language: [English](README_EN.md)
### 7.1 Function1 - 判断模型是否支持
- 函数:`is_support_model_type(model_types, model)`
- 功能:判断模型类型是否支持
- input: (model_types, model)
- output: model name
### 7.2 Function2 - 转换 kmodel
- 函数:`convert_kmodel(model, project, dataset, kmodel_name, convert_report)`
- 功能:将输入模型转成 `kmodel` 模型,保存路径:`project/applications/.kmodel` ,并将运行日志保存为:`./platforms/k210/convert_report.txt`
- input: (model, project, dataset, kmodel_name, convert_report)
- output: 模型转换的输出日志
### 7.3 Function3 - 转存16进制
- 函数:`hex_read_model(self, project, model)`
- 功能:将 `kmodel` 模型转存为十六进制,`project/applications/_kmodel.c`
- input: (project, model)
### 7.4 Function4 - 生成 rt_ai_model.h
- 函数:`rt_ai_model_gen(convert_report, project, model_name)`
- 功能:根据 `./platforms/k210/convert_report.txt` 生成 `rt_ai__model.h` 文件
- input: (convert_report, project, model_name)
- output: `rt_ai__model.h` 文件内容
### 7.5 Function5 - 生成 rt_ai_model.c
- 函数:`load_rt_ai_example(rt_ai_example, project, old_name, new_name, platform)`
- 功能:根据 `Documents/k210.c` 生成 `rt_ai__model.c` 文件
- input: (Documents_path, project, default_name, kmodel_name, platform)
### 7.6 Function6 - RTT_EXEC_PATH 环境变量
- 函数:`set_gcc_path(project, embed_gcc)`
- 功能:在 `project/rtthread.py` 文件的第十四行写入 `RTT_EXEC_PATH` 变量,这样就不用在 `env` 中手动指定路径了。
- input: (project, embed_gcc)