This project is a user template, and users can copy the folder to their custom working directory for development based on this template.
The user-defined files in this template are:
- User Board
- user App
- User Linker
In the user_board
folder, there is a yaml
file and a cfg
file, and the names of these two files must be consistent with the folder name, so that start_gui can recognize the folder as a board folder.
Among them, the yaml
file is a user board level configuration file used to configure SOC names, openocd scripts, etc. The cfg
file is a board level configuration file for openocd, which specifies parameters for onboard flash, debugger reset-init event handling, debugger gdb-attach event handling, etc.
Usually, users can copy files from the hpm_sdk/boards/hpm_xxxx_evk directory to the user_board folder, and copy the cfg
file from the evk directory of hpm_sdk/boards/openocd/boards to the user-board folder, and then make modifications based on their own board configuration.
- < Note >: After copying, please modify the file names of
yaml
andcfg
to match the folder name.
The files in the user_board
folder in this template were copied from the relevant files of hpm6750evk2. Users can replace or modify them according to their own board configuration
In the user_app
folder, users can organize their own applications, such as the main function.
When adding .c and .h files, please use sdk_app_src
to add the .c files and use sdk_app_inc
to add the path of the .h files in CMakeList.txt
.
If using middleware
, components
, etc., please refer to the CMakeList.txt
in the sample corresponding to hpm_sdk, and then add relevant instructions in the user's CMakeList.txt
following the example.
- Tips: After modifying
CMakeList.txt
, the project needs to be regenerated and compiled.
In the user_app
folder, there are linker
files for the application, which users can customize according to their own needs.
Usually, users can copy the linker files from the gcc
/iar
/segger
folder in hpm_sdk/soc/xxxx/xxxx/toolchains to user app/linkers and make modifications based on them.
- < Note >: After copying, the linker file names under the
gcc
/iar
/segger
files should be consistent, only with different suffixes.
After organizing the above files, you can use start_gui to generate your own project project.
- Board Path:Specify the top-level
user_template
folder, start_gui will automatically search for board level files in that folder. - Application Path:Specify the top-level
user_template
folder, start_gui will automatically search for applications in that folder. - User GCC Liner File:Specify user
gcc
linker files. After generating the project, the gcc toolchain will use the linker in the gcc folder, the iar toolchain will use the linker in the iar folder, and the segger toolchain will use the linker in the segger folder.- < Note >: The
Build Type
of start_gui needs to be correctly specified in conjunction with the linker file. For example, when the linker file uses Flash and there is no SDRAM, theBuild Type
of start_gui needs to be specified asflash_xip
; When the linker file uses Flash and has SDRAM, theBuild Type
of start_gui needs to be specified asflash_stram-xip
.
- < Note >: The
- After configuration, click
Generate
to generate the project.- < Note >: After modifying
CMakeList.txt
, the project needs to be regenerated and compiled.
- < Note >: After modifying