5.3 Importing the Secure Project in µVision® from Keil®
- For importing both secure and
non-secure projects in the same workspace:
- Create a folder and unzip the secure and non-secure project in the same folder
- Rename the *gpdsc files in both folders to avoid confusion (e.g: AtmelStart_S.gpdsc and AtmelStart_NS.gpdsc)
- Create a Keil project file by
selecting these *.gpdsc files separately:
- File -> Open -> Secure project folder -> select the AtmelStart_S.gpdsc file (after selecting Show All File Types) -> a project will be created. Save and close the project.
- Repeat the above step for the non-secure project
- Create a Multi Project workspace in Keil MDK and add both the project files (.uvprojx file for secure and non-secure)
- Configure the secure project as described below
- Go to Options by right-clicking the
project name in the workspace. Under the Target tab, go to the Code Generation
section and make sure the ARM Compiler is “Use default compiler version 6”, change
the software model to “Secure Mode” for a secure project, and select the check box
“Use MicroLIB”.
- Go to the C/C++ tab. Under the
Language/Code Generation section change the language to “C99”. Note: Selecting the value for Warnings as “AC-5 like Warnings” is optional.
- Under the Linker tab, uncheck the
“Use Memory Layout from Target Dialog Box” and browse the Scatter file from the
secure project.
- Under the Debug tab, select the value
CMSIS-DAP for the “Use” radio button. Click on Settings and go to the Pack tab.
Change the default dbgconfig file with the new UROW settings, which will be
available in Toolchain\keil\DebugConfig\SAMl11.dbgconf.
- In addition, go to the Debug tab in
Options for a secure project and edit the content of the initialization file as
follows:
- LOAD “Specify the Path of .axf file of non-secure project" incremental
- LOAD “Specify the Path of .axf file of secure project” incremental
- RESET
- g, main
- Under the Utilities tab, go to the
Configuration Flash menu command and browse the Init file as Load_ns.ini under “User
Target Driver for Flash Programming”. Edit the content of the Init file as
follows:
- LOAD “..\\Specify Non-secure project path\\UVBuild\AtmelStart_NS.axf” incremental
- Compile the secure project.
- Configure the non-secure project as described here – Configure Non-Secure Project.