Arm board tutorial Part 1 Using the ARM board And start working with C Tutorial 5 and 6 CES arm board v 14.7
Arm board tutorial Part 1 Using the ARM board And start working with C Tutorial 5 and 6 CES arm board v.14.7 1
Outline Software · Hardware Download the program to the board The aRM7 board test program CES arm board v 14.7
Outline • Software • Hardware • Download the program to the board • The ARM7 board test program CES arm board v.14.7 2
Materials distributed Materials will be distributed NXP LPC2131x 1 FT232BLX 1 Power adapter x 1 USB cable x 1 Please use them Carefully You must return all the materials at the end of this semester 30 marks will be deduced if you lose or don t return anyone of them CES arm board v 14.7
Materials distributed • Materials will be distributed: – NXP LPC2131 x 1 – FT232BL x 1 – Power adapter x 1 – USB cable x 1 • Please use them CAREFULLY • You MUST return all the materials at the end of this semester – 30 marks will be deduced if you lose or don’t return anyone of them CES arm board v.14.7 3
Hints for the exercises The User manual(UM10120. pdf) and the Schematic of the board are VERY usefully You may need to check the lecture notes CES arm board v 14.7
Hints for the exercises • The User manual (UM10120.pdf) and the Schematic of the board are VERY usefully • You may need to check the lecture notes CES arm board v.14.7 4
Setup the uvision project Software CES arm board v 14.7
Software Setup the uVision project … CES arm board v.14.7 5
Start working with C New project Project New Vision Project Find somewhere to save you project choose nXF→LPC2131 with Startup.S Edit Startup.s comment the line 430 CES arm board v 14.7
Start working with C • New Project – Project → New μVision Project… – Find somewhere to save you project – choose NXP → LPC2131 – with Startup.s – Edit Startup.s • comment the line 430 CES arm board v.14.7 6
Start working with c Project> Options for target 1 At linker" tab select "Use Memory Layout from Target Dialog At"Output" tab select"Create HEX File ptions for Target Target 1 Device Target output Listing User I C/C++| Asm I Linker Debug Utilties I Select Adder for Objects Name of Executable:lab4_ex c Create Electable: Mlab4_ex 厂 Create Batch File v Create HEX File C Create Library: \ab4 ex LIB CES arm board v 14.7
Start working with C • Project → Options for target1 – At "Linker" tab • select “Use Memory Layout from Target Dialog” – At "Output" tab • select “Create HEX File” CES arm board v.14.7 7
Start working with c · Create a c file Fi|e→NeW. File→Save Find a good place to save your code e.g. same folder as the project file End the file name with c Some examples: main. C, test Cc Bad examples: a c, asd. c CES arm board v 14.7
Start working with C • Create a C file – File → New… – File → Save – Find a good place to save your code • e.g. same folder as the project file – End the file name with ".c" • Some examples : main.c, test_c.c • Bad examples: a.c, asd.c CES arm board v.14.7 8
Start working with c Add the code into your project Project Manage Components Environment and books Add files Locate the c file you just saved Your project should look like this E: Target 1 A Source Group 1 面$p nam. c CES arm board v 14.7
Start working with C • Add the code into your project – Project → Manage → Components, Environment and Books → Add files – Locate the C file you just saved – Your project should look like this: CES arm board v.14.7 9