Sei sulla pagina 1di 2

Instructions for writing C programs in keil uVision and to execute

in the Vi-ARM Kit.


1. Open keil uVision
2. Click project >
New uVision Project
3. Select the device LPC2378 under NXP
4. Copy the Startup LPC23xx.s file. ( Choose Yes)
5. Right click Source Group1 under Target in the left side of the keil
window. Select Add
new Item to group ..
6. Select C file in the window prompted, give a filename and save.
7. Write your program or copy the code from existing program, and save
the file.
8. Before building the project set the build options
9. Righ click on Target1 --> Selection "Options for Target Target1"
--> click on Target tab --> tick Use Microlib option.
-->click on Output tab--> tick "Create Hex file" option.
Press Ok button.
10. Build the target by using the menu Project-->Build Target.
To transfer and program the Hex file onto the flash of the ARM processor
1. Run Flash Magic application
2. Select -- LPC2378
COM Port - find the COM port from the Device Manager of Wndows.
Right Click on Computer -->Properties-->Device
Manager-->Ports
(Find the number of the COM Port with Prolific USB to
serial converter.)
Set the COM Port number in Flash Magic
Baud Rate -- Set to 19200
Hex File - Browse and choose the correct HEX file to be burnt on the
ARM.
3. On the ARM kit, push the slide switch down ( to prog mode) and press
reset pushbutton.
4. Click Start on FlashMagic to start the programming.
5. Wait till you get a "Finished" message.
6. To Execute the program on the ARM Kit
push the slide switch up ( to EXEC mode) and press reset pushbutton.
Notes:
For programs requiring serial communication remember to close Flash
Magic before using Tera Term.

Potrebbero piacerti anche