下面的其实就是笔记。1 了解LPC1788是什么芯片及其内部资源。2 了解和存储器有关的知识。3 了解开发LPC1788的环境。 1 LPC1788是什么? 有部分是我不太了解的内容,用颜 {MOD}标记出来了。The LPC1788 is a CortexM3 microcontroller for embedded applications featuring a high level of integration and low power consumption at frequencies of 120 MHz. Features include 512 kB of flash memory, 96 kB of data memory, Ethernet, USB 2.0 Host/OTG/Device , 8channel DMA controller, 5 UARTs, 2 CAN channels, 3 SSP/SPI, 3 I2C, I2S, 8channel 12bit ADC, 10bit DAC, QEI, LCD controller, SD/MMC interface, motor control PWM, 4 general purpose timers, 6output general purpose PWM, ultralow power RealTime Clock with separate battery supply, and up to 165 general purpose I/O pins. 2 flash memory以及data memory 是什么。RAM以及ROM呢? 他们都干什么用呢? 先看运行example的一个结果:Program Size: Code=84448 RO-data=114892 RW-data=856 ZI-data=37532 Code=84448:代码大小, 程序代码存放在Flash里。RO-data=114892: 只读数据也存放在Flash里,如const定义的常量数据RW-data = 856: : 变量,存放在RAM里面.ZI-data=37532: 未初始化的全局变量zero-initialized data。其实这都蛮好理解的。看ZLG的什么资料又看到:此时很不理解ROM Size 为何又包含了RW Data。根据我的理解,ROM是存放的是只读的数据,怎么又存放RW Data呢。好像是矛盾的。后来,结合ZI-Data 和RW-Data我才明白了,已赋非0初值的变量的初始值是存在ROM里的。程序开始跑的时候,再从ROM中取出来给变量。对于没有赋值的变量以及初值是0的变量,程序把他们放在RAM里的。题外:定义Flash数组可使用const unsigned char Tab[]。定义在Flash中的变量为只读变量,改变的是RO-data的大小。 3 了解开发环境,有几个名词专门查了一下:emWin, MDK.emWin: is designed to provide an efficient, processor- and LCD controller-independent graphical user interface (GUI) for any application that operates with a graphical LCD.It is compatible with single-task and multitask environments, with a proprietary operating system or with any commercial RTOS. emWin is shipped as "C" source code.It may be adapted to any size physical and virtual display with any LCD controller and CPU. MDK: Microcontroller development kit此外,开发环境的配置也是遇到了一些难点。