Files
soc-codegen-template/README.md
T
2026-08-19 16:05:36 +08:00

89 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# JL7016 SOC 开发框架
基于杰理 **JL7016 / AC7016CBR28** 的耳机 SOC 工程模板。应用层含 `jb_protocol`BLE 能力由 `apps/usr_le_code` 静态库提供。
适用芯片:AC7016CBR28
SDK 名称:AC701N Earphone SDK
---
## 目录结构
```text
JieLi-JL7016/
├── apps/
│ ├── common/ # SDK 公共模块
│ ├── earphone/ # 耳机应用
│ ├── usr_jb_proto/ # 应用协议层(jb_protocol / jb_product
│ ├── usr_periph/ # 板级外设(RTC 等,源码开放)
│ └── usr_le_code/ # BLE 协议库(静态库 + 公开头文件)
├── cpu/ # 芯片平台代码与下载工具(br28)
├── include_lib/ # SDK 头文件
├── tools/ # 工程工具与打包脚本
├── Makefile # 一键编译入口
├── AC701N.cbp # Code::Blocks 工程
└── JBao_JL7016_SOC_SDK_README.md
```
### 封装模块公开接口
**apps/usr_le_code**
- 静态库:`apps/usr_le_code/lib/libusr_le_code.a`
- 公开头文件:
- `apps/usr_le_code/usr_le_api.h`
- `apps/usr_le_code/usr_le_product.h`
---
## 快速开始
### 环境要求
- 杰理 AC701N 工具链(Windows 默认 `C:/JL/pi32/bin`
- Code::Blocks(打开 `AC701N.cbp`)或命令行 `make`
### 1) 命令行编译
```bash
make
```
显示详细编译过程:
```bash
make VERBOSE=1
```
清除编译临时文件:
```bash
make clean
```
### 2) 协议与产品对接
| 目的 | 文件 |
|------|------|
| 产品/版本定义 | `apps/usr_jb_proto/Protocol/jb_product.h` |
| 用户层实现 | `apps/usr_jb_proto/Protocol/jb_product.c` |
| 协议入口 | `apps/usr_jb_proto/usr_jb_main.c` |
| BLE 公开接口 | `apps/usr_le_code/usr_le_api.h` |
| 板级 RTC | `apps/usr_periph/usr_rtc.c` |
---
## 关键注意点
- **厂商预置 blob 必须保留**:`cpu/br28/tools/``ota.bin``p11_code.bin``br28loader.bin``eq_*.bin` 等是打包/下载依赖,不要当编译产物删掉。
- **编译产物不入库**`objs/``sdk.elf``sdk.map``app.bin` 以及 `download/` 下生成的 `.fw` / `.ufw` 已由 `.gitignore` 忽略。
- **rom.lst 必须入库**:链接脚本输入,不在忽略列表中。
- 打包发版可使用 `tools/package_release.py`
---
## 相关链接
- [SOC 模板仓库 main 索引](https://git.jianbao-tech.com/pets-device/soc-codegen-template)
- [MCU 模板仓库](https://git.jianbao-tech.com/pets-device/mcu-codegen-template)