0% found this document useful (0 votes)
98 views12 pages

Create Project File: Sandeep B

1. The document outlines the steps to create an application program using μVision4 including creating a project file, selecting a device, setting target options, adding source files, configuring targets, and building and debugging the project. 2. Key steps are creating a project folder and file, selecting a microcontroller, setting target parameters like output format and memory layout, adding and organizing source code files, and building, flashing and debugging the finished application. 3. Debugging for hardware programs involves using Flash Magic to select the device, COM port, oscillator setting, and hex file before programming the microcontroller.

Uploaded by

baba212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views12 pages

Create Project File: Sandeep B

1. The document outlines the steps to create an application program using μVision4 including creating a project file, selecting a device, setting target options, adding source files, configuring targets, and building and debugging the project. 2. Key steps are creating a project folder and file, selecting a microcontroller, setting target parameters like output format and memory layout, adding and organizing source code files, and building, flashing and debugging the finished application. 3. Debugging for hardware programs involves using Flash Magic to select the device, COM port, oscillator setting, and hex file before programming the microcontroller.

Uploaded by

baba212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 12

The required steps for creating application programs are listed below:

1. Create Project File explains how to create a µVision4 project file.


2. Select Device describes how tool settings, peripherals, and dialogs are customized.

3. Set Options for Target explains how to specify relevant parameters for your target.

4. Create Source File describes how to add new files to the project.

5. Configure a Target

Configure ARM 7 Target describes how to change the startup-code and how to use the library
retarget file for ARM 7 devices.

Configure Cortex-M Target describes how to change the startup-code and how to use the
library retarget file for Cortex-M devices. In addition, this is a brief explanation of CMSIS.

6. Create File Group explains how to structure the code files for a better overview.
7. Specify Memory Layout describes how to change file and group attributes.

8. Build Project describes the build-options.

Create Project File

µVision4 maintains the files that belong to a project in one project file. It takes only a few steps to
create a new project file with µVision4:

1. Select Project - New Project from the µVision4 menu.


This opens a standard Windows dialog, which prompts you for the new project file name.

2. Create a new folder Test.

Sandeep B Page 1
3. Switch to the new folder and type the project name Test1. µVision4 automatically adds the
extension .uvproj.
4. Click Save & Select Device for Target ‘Target 1’ is opened, select NXP (founded by Philips)

When you create a new project, µVision4 asks you to select a microcontroller. This step
customizes the µVision4 environment with pre-configured options and sets the tool options,
peripherals, and dialogs for that particular device. The Select Device for Target dialog
shows the µVision Device Database.

Select the microcontroller you use. For this example, choose the NXP(founded by philips)

Sandeep B Page 2
Select the device LPC 2148 and click OK as shown below

After you get this message

1. For Assembly Language Program (first ARM Software program)

Click NO

2. For C Program (Bubble sort and Hardware Programs)

Click YES

Note

 It is good practice to use a separate folder for each project.

Set Options for Target

Sandeep B Page 3
Set target parameters in the dialog By Right Click on Target- Options for Target - Target.

1. Click on output tab and select the Create Hex File option
2. Click on Target tab and select the microlib option

3. Click on LINKER TAB and select the USE MEMORY LAYOUT option

As shown below

Sandeep B Page 4
Open the dialog via the toolbar icon or the menu Project - Options for Target.

Click on new document for writing the program & save the code with .c extension.

Sandeep B Page 5
Expand the Target 1 in the Project folder

Sandeep B Page 6
Right click on the source Group1 & select Add Files to Group ‘Source Group 1’. Select the file from the
folder where project is saved & click on add.

Build Project

Build the project once the coding is done and check for errors. For building the project click F7 or click
on below shown option.

Sandeep B Page 7
1. Translate and link the source files of the application with a click on one of the build-
buttons located in the Build Toolbar.
2. Errors or warnings are displayed in the Build Output Window. Double-click on a message to
jump to the line where the incident occurred.

3. Once you have generated your application successfully, you can start debugging.

Debug Application

For Hardware program Use FalshMagic as below

1. Click on the Flash Magic Icon installed over desktop

Sandeep B Page 8
Click on Select Device Button , expand Arm option & select the device LPC 2148

Select the COM Port Name, follow these Steps for knowing the PORT Name

a. Insert one end of the USB cable to the USB Port and Other end to kit.

Sandeep B Page 9
b. Right Click on My Computer option from the desktop and select Manage Option as shown in the
below figure.

c. Click on Manage button and select the Device Manager Option as shown below

d. Expand Ports option on the right hand side to see the Serial port name of the USB Connected.
For Example : USB Serial Port(COM9)

Sandeep B Page 10
Once the PORT name is known Select from COM Port dropdown, enter the Oscillator (MHz) to
12.0 & check the Erase blocks Used by Hex file.

Sandeep B Page 11
e. Select the program from the desktop machine on click of Browse button

f.

Sandeep B Page 12

You might also like