380 likes | 474 Views
IDE for ARM 7 board. Tutorial 3. Outline. Introduction to the Keil environment Setup a new project Debug mode & Observe the registers. uVision IDE. C compilers Assemblers Real-Time kernels Integrated Development Environment (uVision) For ARM series and 8051 series.
E N D
IDE for ARM 7 board Tutorial 3 IDE of Keil4 V3.a
Outline • Introduction to the Keil environment • Setup a new project • Debug mode & Observe the registers IDE of Keil4 V3.a
uVision IDE • C compilers • Assemblers • Real-Time kernels • Integrated Development Environment (uVision) • For ARM series and 8051 series IDE of Keil4 V3.a
Set up a new project IDE of Keil4 V3.a
Create a new project IDE of Keil4 V3.a
Choose a directory and give a name for the project IDE of Keil4 V3.a
Choose the device you are going to develop in this project NXP > LPC2131 IDE of Keil4 V3.a
Create startup file Click “Yes” to allow the tool to copy startup code IDE of Keil4 V3.a
Open startup.s IDE of Keil4 V3.a
Modification of startup.s ; User Initial Stack & Heap AREA |.text|, CODE, READONLY ;IMPORT __use_two_region_memory EXPORT __user_initial_stackheap __user_initial_stackheap LDR R0, = Heap_Mem LDR R1, =(Stack_Mem + USR_Stack_Size) LDR R2, = (Heap_Mem + Heap_Size) LDR R3, = Stack_Mem BX LR ENDIF Comment out the two region memory Line segment begin with “;” consider as comment IDE of Keil4 V3.a
Option Right click “Target 1” in project window, choose “Option for Target…” IDE of Keil4 V3.a
Memory Layout Tick “Use Memory Layout from Target Dialog” IDE of Keil4 V3.a
Create a new source code file File > New IDE of Keil4 V3.a
Enter the assembly code and save as any_filename.s IDE of Keil4 V3.a
Add the source code to the project Project > Manage > Component, Environment IDE of Keil4 V3.a
Build the project Project > Build target Success if no error IDE of Keil4 V3.a
Start Debug mode • Debug > Start/Stop Debug Session • Click “OK” • Trial Version IDE of Keil4 V3.a
Debug Mode Register Machine running code Your Assembly Code UART Memory content IDE of Keil4 V3.a
Display Window Register Memory Serial (UART) IDE of Keil4 V3.a
Running the program Step Over that line Run Step one line IDE of Keil4 V3.a
Next line to run IDE of Keil4 V3.a
Run to cursor line Right Click “Run to cursor line” IDE of Keil4 V3.a
Move to a register IDE of Keil4 V3.a
Observe the R15(PC) IDE of Keil4 V3.a
Add R1 and R0 0x11c = 0x118 + 0x04 IDE of Keil4 V3.a
Observe the original status of CPSR IDE of Keil4 V3.a
After CMP “Negative” IDE of Keil4 V3.a
Link Register set by BL Save the address of next instruction Last PC + 4 = 124+4 IDE of Keil4 V3.a
BX branch to the address in register IDE of Keil4 V3.a
Infinity Loop IDE of Keil4 V3.a
Let’s run some exercises together IDE of Keil4 V3.a
Lab. To Do: • Create a new project • Copy the code in test1.s to your project • Run the code to observe the change of register • Record the value of Register PC and N, Z, C, V (CPSR) IDE of Keil4 V3.a
Lab Demo 1 – Soldering & Circuit Debugging Techniques IDE of Keil4 V3.a
Demonstration Detail • Soldering • Probing signal using CRO • Tracing signal path using multi-meter IDE of Keil4 V3.a
Marking Scheme • Finish all the soldering jobs correctly (1.5) • Correct use of components (including correct orientation and polarity ) (0.5) • The LED power indicator light is on (0.5) • Soldering with proper soldering skills (the amount of volcano shape and ball shape joints) (0.5) • Demonstration of circuit debugging skills by CRO and multi meter (1.5) • Use multi meter to check whether J7 pin1 is connected to pin3 of L293(U6) (0.5) • Probe the output (Pin3) of LM78T05 to show the voltage level (0.5) • Probe the XTAL2 (CLK) on the board to show the frequency and period (0.5) IDE of Keil4 V3.a
End of tutorial IDE of Keil4 V3.a