Importing the Secure Project in µVision® from Keil®

  1. 1.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:
      1. i.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.
      2. ii.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
  2. 2.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”.
  3. 3.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.
  4. 4.Under the Linker tab, uncheck the “Use Memory Layout from Target Dialog Box” and browse the Scatter file from the secure project.
  5. 5.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.
  6. 6.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
  7. 7.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
  8. 8.Compile the secure project.
  9. 9.Configure the non-secure project as described here – Configure Non-Secure Project.