[National Technology N32G457 Review] 2. Basic Engineering Evaluation and Template Engineering Construction
[Copy link]
[Routine test]
As mentioned earlier, my environment cannot adapt to the onboard DAP debugging tool, so the subsequent development can only be done with an external J-Link. The reason for the failure may be that the computer has used and installed different DAP drivers before, which has caused conflicts. I will not bother with it for the time being. Based on the official library routines, I simply evaluated the led blink, key exti, and printf routines. In general, the format of the library routines is relatively standardized, the comments are relatively clear, and there are readme instructions. In addition, it is highly compatible with ST's standard library, which is suitable for domestic substitution migration, which greatly facilitates engineers and reduces learning costs. In addition, it is noted that in the .h file of the application layer, compatibility with C++ programs is also considered, and the following processing code is used:
#ifdef __cplusplus
extern "C" {
…………………………
…………………………
#endif
When testing the Key_Exti routine, it was found that the program used NVIC to configure the interrupt channel, but the overall NVIC priority was not grouped well. The following definition is available in the M4 core:
It is recommended to configure the preemption and corresponding priority level when the program is initialized, especially when using the RTOS framework. Use the NVIC_PriorityGroupConfig library function to complete it, and once configured, the configuration cannot be rewritten during program operation.
In addition, I found that the official routines were not well adapted to the board-level support driver for the development board tested this time. The flashing light and button functions also need to be rewritten by the corresponding ports. It is recommended that the official can improve it in the future and add a board-level BSP driver.
It is easy to crash when using J-Link for debugging, which may be related to computer memory and other performance. You can try to remove the breakpoint first, reset it, and then exit debug.
When I evaluated GD and Huada's chips before, I had to port coremark 1.1 myself. The routine package of Guomin includes a running score routine. I liked it so I wanted to see the running score of this chip. The test results are:
Turn off high-speed instruction cache ICache (161.203654 @ 144MHz) and turn on ICache (313.176919 @ 144MHz)
You can check out the coremark running score list through this link !
【Template engineering construction】
Step 1: Create a template project root directory in the full English path, "N32G45x_Firmware_Template", which contains the following folders:
Step 2: Add the official corresponding subfolders and files to the folder under the root directory. Doc mainly includes some reference documents and project descriptions. Libraries mainly includes CMSIS-related startup files and M4 kernel-related .h files, as well as the standard hardware abstraction layer driver library provided by National Technology, and some other algorithm libraries. Project includes MDK project files and output-related file directories. Thirdparty includes SEGGER-related debugging files. User includes the main entry function and related peripheral drivers used. kill_output.bat is used to clear some intermediate files when packaging the project.
Step 3: Open the Project.uvprojx project file, modify the file directory contained in the project target and add relevant corresponding files. The directory structure is as follows:
Step 4: Open Options for Target and configure the project as follows:
Step 5: Open Options for Target - C/C++ and configure the project file path and predefined settings as follows:
Step 6: Re-modify main.c according to the functions you want to achieve, as follows:
Step 7: Compile, burn and run, as follows:
Finally, double-click kill_output.bat to run the cleanup script command. Describe the functions implemented by the program in the template function description.txt, and then package the entire project. At this point, a template function has been successfully created, and subsequent programs will be expanded based on this.
Please refer to the attachment for details, and welcome to correct me!
0. N32G45x_Firmware_Template.zip
(1.15 MB, downloads: 16)
|