README
1Sample project to test CppUTest for Keil MDK-ARM toolchain and LPC1768 chip.
2
3Requirements:
41. CYGWIN (rm.exe, mkdir.exe, make.exe)
5
62. Keil MDK-ARM
7
83. JLink Flash (for programming chip) or FlashMagic
9
104. serial connection to UART0 or UART1 interface
11
125. 12 or 24 MHz quartz. If else, need to be adjusted in
13 $(CPPUTEST_HOME)/platforms_startup/armcc/LPC1768/system_LPC17xx.c
14 (for _clock_init() function working correctly and to set up 100 MHz core
15 clock).
16 Please check system_LPC17xx.c for correct quartz selection in function
17 SystemInit(), and rebuild startup library for any change.
18 Default is 12 MHz quartz.
19
206. eclipse + gdb server from JLink + arm-none-eabi-gdb from GNU ARM Tools Embedded
21 For debug only.
22
23First, you need to compile CppUTest and target startup library:
24 make -C ../../../platforms/armcc CPU=Cortex-M3 all
25 make -C ../../../platforms_startup/armcc/LPC1768 all
26
27Second, you need to write tests. As example, I use
28 $(CPPUTEST_HOME)/examples/AllTests/CircularBufferTest.cpp.
29
30Third, you need to make executable:
31 make all
32
33Fourth, you need to program executable on target chip:
34 make prog
35
36Project use semihosting, so you may use standard printf() or std::cout << "Hello!"
37
38If problems with heap or low memory, adjust heap size in
39 $(CPPUTEST_HOME)/platforms_startup/armcc/LPC1768/startup_LPC17xx.asm
40 and rebuild startup library.
41