5. New Project Guide based on CDK
This document will briefly explain how to create a new CDK project based on this SDK, please make sure that the CDK IDE is properly installed before following this tutorial.
5.1. Examples directory structure
There are two levels of subdirectories under bl_mcu_sdk/examples
, the first level is the folders of different peripherals. The second level is a specific test case of the peripheral, The second level directory usually also contains a directory named cdk
and the source code associated with the case.
The cdk
directory usually contains a xxx.cdkproj
file, which is a CDK project file. If the CDK IDE is properly installed, double-click the project to open it. The newly created project should be at the same level as the case level in the current examples
directory.
备注
The source file must contain the c program entry, usually the main
function, the source file may not be called main.c
Create a new
my_case
folder underexamples
to store your caseCreate a new folder that needs to be tested in the
my_case
directory, such asgpio_case
Then add the
main.c
file andcdk
directory in thegpio_case
directory
The directory structure is as follows:
1bl_mcu_sdk
2├── examples
3 ├── my_case
4 ├── gpio_case
5 │ ├── cdk
6 │ │ ├──gpio_case.cdkproj
7 │ ├── CMakeLists.txt
8 │ └── main.c
9 └── xxxx_case