Keil Software For Arm Program
Keil Software For Arm Program
The µ Vision4 IDE offers numerous features and advantages that help you quickly and
successfully develop embedded applications. They are easy to use and are guaranteed to help you
achieve your design goals.
Software Flow
First open the icon keil µvis ion4 and the follow the steps are given below. The menu
bar provides you with menus for editor operations, project maintenance, development tool option
settings, program debugging, external tool control, window selection and manipulation, and on- line help.
The toolbar buttons allow you to rapidly execute µ Vision4 commands. A Status Bar provides editor and
debugger information. The various toolbars and the status bar can be enabled or disabled from the View
Menu commands.
29
Creating a New Project
Below mentioned procedures will explains the steps required to setup a simple application and to generate
HEX output.
STEP 1: Go to “Project” and close the current project “Close Project”.
30
STEP 3: A small window will pop up with name “Create New Project” and can be create and select
destination path.
STEP 4: Create a folder and give a proper name that can be related to the Project.
31
STEP 5: A small window will pop up with name “Select Device for Target „Target 1‟”, and select the
data base NXP founded by Philips.
32
STEP 7 : Add Startup file to the project by clicking “Yes”.
33
STEP 9: There are the main three windows are available in the keil IDE. First one is Project Workspace,
second one is Editor Window and third one is Output Window.
STEP 10: Can be start to write *.asm/c code on the editor window.
34
STEP 11 : Can be save the file, if the program is in “C” save as “filename.C” or else save as “filename.ASM”.
STEP 12: Add this source file to Group1, Go to the “Project Workspace ” drag the +mark “Target 1” in
that right click on “Source Group1” and click on “Add Files to Group “Source Group1””.
35
STEP 13: A small window will pop up with name “Add Files to Group Source Group1”, by default, the
Files of type will be in C source Files (*.C). If the program is in C, have to select C source Files (*.C) or
select ASM Source file (*.s,*.src,*.a*).
STEP 14: Then go to “Project” click on “Build Target” or F7. Output window will display related error and
warning messages.
36
Simulation
Part:
STEP 15: Go to “Project” menu, click on “Rebuild all target Files” and start Debug. From View menu can
get Memory Window and from Pe ripherals can get I/O ports, Serial etc. For access internal memory type
i:0x_me mory location example: i:0x30 and for external and program memory x:0x_me mory location,
c:0x_memory location respectively. From Register window we can edit and access the values also.
37
HEX file creation:
STEP 16: Follow the STEP up to 14, then go to “Project” and click on “Option for Group „Source
Group1‟”. There a small window will open with name “Option for Target „Target1‟”. In that window, go to
first menu “Device”, can be select LPC2148.
STEP 17: Next go to Target menu, set clock frequency as 12.0 MHz and select Thumb mode in the code
generation selection box.
38
STEP 18: Then go to Output menu and click on create HEX file.
39
STEP 20: Finally in the Linker menu, click on use memory layout from target dialog and click ok.
STEP 21: For creating Hex file go to “Project” menu and click on “Rebuild all target Files”
40
FLASH MAGIC
Introduction :
NXP Semiconductors produce a range of Microcontrollers that feature both on-chip Flash
memory and the ability to be reprogrammed using In-System Programming technology. Flash Magic is
Windows software from the Embedded Systems Academy that allows easy access to all the ISP features
provided by the devices.
These features include:
Flash Magic provides a clear and simple user interface to these features and more as described in
the following sections. Under Windows, only one application may have access the COM Port at any one time,
preventing other applications from using the COM Port. Flash Magic only obtains access to the selected COM
Port when ISP operations are being performed. This means that other applications that need to use the COM
Port, such as debugging tools, may be used while Flash Magic is loaded. Note that in this manual third party
Compilers are listed alphabetically. No preferences are indicated or implied.
41
Installation Procedure for Flash Magic software:
STEP 22: For programming with communication port, first select the device LPC2148 in ARM 7 category,
COM port will be COM 1, baud rate 9600, interface None [ISP], Osc illator frequency 12.0 MHz and click on
erase of flash code Rd plot.
42
STEP 23: Under the menu Options, go to Advanced options.
STEP 24: Under the menu Advanced options, go to Hardware configuration, click on the Use DTR and RTS
to control RST and ISP pin.
43
STEP 25: Next browse the path of hex file and select the file.
STEP 26: After selecting ISP mode on the Hardware Kit and click on start.
44
STEP 27: After the above steps device will start to program.
STEP 28: Finally can be see the finished indication and Reset the device into running mode.
45
Programming through USB:
STEP 1: Connect the USB cable between ARM-7 LPC2148 Trainer Kit and PC. Connect the power supply to
the trainer kit and power up. After can see a popup window with name “Found New Hardware CP2102 USB
to UART Bride Controller“.
STEP 2: Select on Install from a list or specific location (Advanced) and click “Next”.
46
STEP 3: Browse for the driver file location and select the folder, click next.
47
STEP 4: After that can see New Hardware wizard, and then click on finish.
48
STEP 6: Then go to device manager, in that we have to select ports (COM and LPT) . There
we have to find the COM port which has been selected for USB cable. The same COM has to
be select for Flash Magic.
49