This is an old revision of the document!
This page describes how to create a new C project manually.
The InES Pack also offers standardised example projects for C and Assembly.
1) Prepare Project Directory
First create a new directory either locally, when you're using your own Laptop or on the “U:\” drive, when you're working on a ZHAW computer and name it according to the project (e.g. lab1).
Inside this directory create the following two directories:
app | This is for the applications source code |
---|---|
build | This is for the artifacts and binaries from the build process |
2) Create new Project
Start Keil uVision and create a new project “Project → new uVision Project”.
Give the file a name according to the project and save it to the previously created project-directory (lab1).
Now choose the device for which you want to create a new project.
CT Board HS14 M0 | This device uses the Cortex-M0 instruction set |
---|---|
CT Board HS14 M4 | This device has full access to the Cortex-M4 instruction set |
If unclear choose CT Board HS14 M0 for the CT Board.
3) Runtime Components
If not already popped up, click the green button “Manage Run-TimeEnvironment”. Expand the “Device” group and select the “Startup” component. Now click on the “Resolve” button.
4) Setup Debugger
Make sure that the CT Board is connected to the host computer!
By default the project is configured to use the Keil uLink debugger. The CT Board uses the onboard ST-Link debugger.
Change the configuration to “ST-Link Debugger” under “Project → Options for Target, Target 1” in the “Debug” tab.
Then click Settings right next to it.
Make sure the port is set to SW (Serial Wire) instead of JTAG.
Also check the “Flash Download” tab and make sure the “STM32F4xx 2MB Flash” algorithm is selected.
Otherwise add the algorithm with the add button.
Go back to “Options for Target, Target1” and select the “Output” tab. Click “Select Folder for Objects…” and choose (double-click) the build folder from your created directory (lab1) as your output folder.
Then go to the “Listing” tab. Click “Select Folder for Listings…” and choose again (double-click) the build folder from your created directory (lab1) as your listing folder.
Now open your project directory in your explorer and you will find the two self generated folders, Listings and Objects. Delete them.
Back to Getting Started