Keil µVision
All LANDTIGER labs and extra-points projects are developed with Keil µVision, the integrated development environment of Arm Keil MDK (Microcontroller Development Kit). In a single window it provides:
- a project manager and source editor for C and Arm assembly;
- the Arm Compiler toolchain (compiler, assembler, linker);
- a debugger that works both on the real board (through a ULINK2 or other
JTAG/SWD probe) and on the built-in simulator, which emulates the
Cortex-M3 core and the LPC1768 peripherals — this is what lets you develop
without a board, using the
SW_Debugtarget of the course projects; - peripheral windows (GPIO, timers, ADC, CAN…), logic analyzer and performance views to observe the system while it runs.
Download and install
µVision runs on 64-bit Windows. The MDK-Community edition is free for non-commercial use such as coursework.
MDK-Community edition Keil product downloads
- Download and install MDK (µVision) from the links above.
- Activate the Community license from File → License Management, as explained on the MDK-Community page.
- Install the device support for the LPC1768 (next section).
Device Family Pack for the NXP LPC1768
µVision gets device-specific files — startup code, system/clock setup,
register definitions (LPC17xx.h), flash programming algorithms and
simulator support — from CMSIS Device Family Packs (DFP). The LPC1768 is
supported by Keil::LPC1700_DFP (NXP LPC1700 series).
- Open Project → Manage → Pack Installer.
- In the Devices tab select NXP → LPC1700 Series → LPC1768.
- In the Packs tab, install Keil::LPC1700_DFP.
Download the pack file and double-click it to install it:
Pack details: LPC1700_DFP · LPC1768 device page
Note
On the Keil website the LPC1700 pack is marked deprecated for Arm's newer command-line tools; it remains the pack that provides LPC1768 support in µVision and is the one used by the course projects.
Working on the course projects
- Targets — the projects provide a
SW_Debugtarget for the simulator (emulator of the LANDTIGER) and a target for the real board; select the right one before building, because they use different settings. - Build and debug — Project → Build (F7), then Debug → Start/Stop Debug Session (Ctrl+F5). In the simulator, open the peripheral windows from the Peripherals menu to watch LEDs, buttons, timers and the other devices.
- Simulator settings — keep the emulator's non-ideal behaviours enabled, as required by the assignments; RIT and timer scaling may be enabled to speed up debugging.
- Keep your files inside the project — when you add a source file from another folder, µVision only references it and does not copy it. Copy the files into your project folder first, then add them, so the zipped project compiles on another computer.
Documentation
Keil µVision and MDK
- µVision User's Guide — complete reference of the IDE and debugger
- Getting Started with MDK (PDF) — installation, first project, debugging
- MDK Getting Started guide — current MDK v6 documentation
- NXP LPC1700 lab with µVision (PDF) — hands-on lab: Serial Wire Viewer, trace and debugging on the LPC1768
NXP LPC1768
- LPC1768 product page — overview and all NXP documents (Documentation tab)
- LPC1769/68/67/66/65/64/63 data sheet (PDF) — pinout, electrical characteristics
- UM10360 LPC17xx user manual (PDF) — every peripheral and register; the latest revision is on the NXP product page
Arm Cortex-M3 and CMSIS
- Cortex-M3 Devices Generic User Guide — instruction set, exceptions, NVIC, SysTick
- Cortex-M3 Technical Reference Manual — processor implementation details
- CMSIS documentation — the standard software interface used by the device headers