This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
bl_mcu_sdk/README.md

245 lines
7.7 KiB
Markdown
Raw Normal View History

2021-06-26 15:03:25 +08:00
[![License](https://img.shields.io/badge/License-Apache--2.0-brightgreen)](LICENSE)
[![Release](https://img.shields.io/github/v/tag/bouffalolab/bl_mcu_sdk?color=s&label=release)]()
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
[中文版](README_zh.md)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
# Introduction
**bl mcu sdk** is an MCU software development kit provided by the Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of chips in the future.
## Code Framework
2021-04-13 19:23:11 +08:00
```
bl_mcu_sdk
├── bsp
2021-11-22 10:59:40 +08:00
│ ├── board
│ │ ├── bl602
│ │ └── bl702
│ └── bsp_common
├── build
2021-04-13 19:23:11 +08:00
├── common
2021-11-22 10:59:40 +08:00
│ ├── bl_math
│ ├── device
│ ├── list
│ ├── memheap
│ ├── misc
│ ├── partition
│ ├── pid
│ ├── ring_buffer
│ ├── soft_crc
│ └── timestamp
2021-04-13 19:23:11 +08:00
├── components
2021-11-22 10:59:40 +08:00
│ ├── ble
│ ├── fatfs
│ ├── freertos
│ ├── lvgl
│ ├── lwip
│ ├── mbedtls
│ ├── nmsis
│ ├── romfs
│ ├── rt-thread
│ ├── shell
│ ├── tflite
│ ├── tiny_jpeg
│ ├── usb_stack
│ └── xz
2021-04-13 19:23:11 +08:00
├── docs
2021-11-22 10:59:40 +08:00
│ ├── chipSpecification
│ ├── development_guide
│ └── development_guide_en
2021-04-13 19:23:11 +08:00
├── drivers
2021-11-22 10:59:40 +08:00
│ ├── bl602_driver
│ └── bl702_driver
2021-04-13 19:23:11 +08:00
├── examples
2021-11-22 10:59:40 +08:00
│ ├── acomp
│ ├── adc
│ ├── audio_cube
│ ├── ble
│ ├── boot2_iap
│ ├── camera
│ ├── coremark
│ ├── cxx
│ ├── dac
│ ├── dma
│ ├── dsp
│ ├── emac
│ ├── flash
│ ├── freertos
│ ├── gpio
│ ├── hellowd
│ ├── i2c
│ ├── i2s
│ ├── keyscan
│ ├── lvgl
│ ├── mbedtls
│ ├── memheap
│ ├── nn
│ ├── pka
│ ├── pm
│ ├── psram
│ ├── pwm
│ ├── qdec
│ ├── rt-thread
│ ├── rtc
│ ├── shell
│ ├── spi
│ ├── systick
│ ├── tensorflow
│ ├── timer
│ ├── uart
│ └── usb
2021-04-13 19:23:11 +08:00
├── out
└── tools
├── bflb_flash_tool
├── cdk_flashloader
├── cmake
└── openocd
```
2021-11-22 10:59:40 +08:00
- **bsp/board** : store the board-level description file such as `clock_config.h` (describes the clock configuration file) `pinmux_config.h` (describes the io function file) `peripheral_config.h` (describes the default configuration file of the peripheral) , These files together describe the board hardware information.
- **bsp/bsp_common** : store some common peripheral driver codes related to the board.
- **common** : store some common functions and macros that chip drivers will need.
- **components** : store the third-party library public component library.
- **drivers** : store bouffalo series of chip drivers.
- **examples** : store the official sample code.
- **tools** : store toolkits related to compiling and downloading.
- **docs** : store tutorial documents and other help information.
- **build** : store cmake cache files.
- **out** : store the bin and map file generated after compiling and linking.
2021-06-25 17:43:48 +08:00
## Hierarchy
2021-06-26 15:03:25 +08:00
[![Hierarchy](https://z3.ax1x.com/2021/06/18/RpUVoj.png)](https://imgtu.com/i/RpUVoj)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
# Resources
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
## Hardware Resources
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
- BL706 IOT Development board
[![BL706_IOT](https://z3.ax1x.com/2021/08/06/fnPcLT.png)](https://imgtu.com/i/fnPcLT)
2021-06-25 17:43:48 +08:00
- BL706 AVB Development Board
2021-11-22 10:59:40 +08:00
[![BL706_AVB](https://z3.ax1x.com/2021/11/16/IWPuVJ.png)](https://imgtu.com/i/IWPuVJ)
2021-04-13 19:23:11 +08:00
2021-11-22 10:59:40 +08:00
There is currently no official purchase channel. If you want to get the above development board, you can apply for it in [Forum post](https://bbs.bouffalolab.com/d/88).
2021-06-25 17:43:48 +08:00
## Chip Manual
[Chip Reference Manual](https://dev.bouffalolab.com/media/upload/doc/BL702_BL704_706_RM_zh_CN_1.1.pdf) | [Chip Data Manual](https://dev.bouffalolab.com/media/upload/doc/BL702_BL704_BL706_DS_zh_CN_Combo_2.0.pdf)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
For more information, please visit the BouffaloLab developer website: [https://dev.bouffalolab.com/](https://dev.bouffalolab.com/)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
## Documentation Tutorial
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
Contains a quick start tutorial for bl mcu sdk development, api manual and a detailed introduction to the driver framework, etc.
2021-08-25 10:49:37 +08:00
- [bl mcu sdk documentation tutorial](https://htmlpreview.github.io/?https://github.com/bouffalolab/bl_mcu_sdk/blob/master/docs/development_guide_en/build/html/index.html)
2021-04-13 19:23:11 +08:00
2021-06-26 15:03:25 +08:00
## Video Tutorial
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
- [BL706 MCU Development Series Video Tutorial](https://www.bilibili.com/video/BV1xK4y1P7ur)
2021-06-26 15:03:25 +08:00
## Development Tools
2021-06-26 15:03:25 +08:00
### Command Line Development
2021-06-25 17:43:48 +08:00
For the tools needed for command line development, please refer to [linux development guide](http://bouffalolab.gitee.io/bl_mcu_sdk/get_started/Linux_quick_start_ubuntu.html)
- [cmake 3.19](https://cmake.org/files/v3.19/), cmake compilation tool, it is recommended to use cmake v3.15 or above
- [riscv64-unknown-elf-gcc](https://gitee.com/bouffalolab/toolchain_gcc_sifive_linux), risc-v linux toolchaindownload command:
```
git clone https://gitee.com/bouffalolab/toolchain_gcc_sifive_linux.git
```
2021-06-26 15:03:25 +08:00
### Eclipse Development
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
For the tools needed for Eclipse development, please refer to [Eclipse Development Guide](http://bouffalolab.gitee.io/bl_mcu_sdk/get_started/Windows_quick_start_eclipse.html)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
- [Eclipse](https://dev.bouffalolab.com/media/upload/download/BouffaloLab_eclipse_x86_64_win.zip) eclipse development free installation package under Windows
- [riscv64-unknown-elf-gcc](https://gitee.com/bouffalolab/toolchain_gcc_sifive_windows), risc-v windows toolchaindownload command:
```
git clone https://gitee.com/bouffalolab/toolchain_gcc_sifive_windows.git
```
2021-06-25 17:43:48 +08:00
- [J-Link v10](https://www.segger.com/downloads/jlink), J-Link debugger, used to debug the chip online, it is recommended to use the hardware of J-Link V10 or above, and the software driver is recommended to use V6 .98 version
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
### CDK Development
2021-06-25 17:43:48 +08:00
For tools needed for CDK development, please refer to [CDK Development Guide](http://bouffalolab.gitee.io/bl_mcu_sdk/get_started/Windows_quick_start_cdk.html)
2021-06-26 15:03:25 +08:00
- [CDK](https://occ.t-head.cn/development/activities/cdk), Jianchi CDK integrated development environment of T-Head , it is recommended to use CDK v2.8.4 or above
2021-06-26 15:03:25 +08:00
### Flash Tool
2021-06-25 17:43:48 +08:00
In addition to using CK-link, J-link and command line programming, it also supports graphical programming tools.
2021-06-26 15:03:25 +08:00
Graphical programming tools provided by Bouffalolab:
- [Bouffalo Lab Dev Cube For Windows](https://dev.bouffalolab.com/media/upload/download/BouffaloLabDevCube-1.5.3-win32.zip)
- [Bouffalo Lab Dev Cube For Ubuntu](https://dev.bouffalolab.com/media/upload/download/BouffaloLabDevCube-1.5.3-linux-x86.tar.gz)
2021-04-13 19:23:11 +08:00
## How to make sdk as submodule
First add bl_mcu_sdk to your own project using the add submodule command, and then commit the gitmodules file to the remote repo.
```
git submodule add https://gitee.com/bouffalolab/bl_mcu_sdk.git bl_mcu_sdk
cd bl_mcu_sdk
git pull --rebase
cd ..
git add .gitmodules
git add bl_mcu_sdk
git commit -m "xxx"
git push
```
The final catalog presents the following results:
```
.
├── hardware
├── xxxx
├── xxxx
├── xxxx
├── bl_mcu_sdk
├── user_code
│ └── gpio
│ ├── gpio_blink
│ ├── gpio_dht11
│ └── gpio_int
```
### Command Line compile
```
cd bl_mcu_sdk
make APP=xxx APP_DIR=../user_code
```
2021-06-25 17:43:48 +08:00
## Forum
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
Bouffalolab Developer Forum: [https://bbs.bouffalolab.com/](https://bbs.bouffalolab.com/)
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
# License
2021-04-13 19:23:11 +08:00
2021-06-25 17:43:48 +08:00
**bl mcu sdk** is completely open source and follows the Apache License 2.0 open source license agreement. It can be used in commercial products for free and does not require public private code.
2021-04-13 19:23:11 +08:00
```
/*
* Copyright (c) 2021 Bouffalolab team
*
* SPDX-License-Identifier: Apache-2.0
*/
2021-11-22 10:59:40 +08:00
```