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 under examples to store your case

  • Create a new folder that needs to be tested in the my_case directory, such as gpio_case

  • Then add the main.c file and cdk directory in the gpio_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