Fixed USB VID/PID
[hackover2013-badge-firmware.git] / Readme.md
1 # LPC1343 Code Base
2
3 ## Overview
4
5 This software library is based on the freely available LPC1343 Reference
6 Design from http://www.microBuilder.eu, and is based around the **ARM Cortex M3
7 LPC1343** from NXP.
8
9 The LPC1343 is a modern, entry level 32-bit ARM Cortex M3 processor with
10 **32KB flash, 8KB SRAM**, and can be run at up to **72MHz**. It also includes
11 full-speed USB 2.0, along with all the main peripherals you'd expect to find
12 (I2C, SPI, PWM, ADC, UART, etc.).
13
14 The LPC1000 family from NXP contains a wide variety of ARM Cortex M0 and
15 Cortex M3 cores, but the LPC1343 is particularly attractive in situations
16 where price is an issue, but a decent amount of performance is needed. It has
17 an efficient instruction set (most commands execute in a single clock cycle,
18 including single-cycle multiply, etc.), and excellent code-density thanks to
19 the Thumb-2 instruction set, meaning 32KB stretches a lot further than it
20 did with the older ARM7 or ARM9 cores even in Thumb mode.
21
22 The ARM Cortex M0 based LPC1114 is cheaper (ridiculously cheap!), and represents
23 one of the best values out there when both price and power consumption are an issue,
24 but the Cortex M0 has a minor performance bottleneck compared to the Cortex M3 that
25 may or may not be important to you: The smaller, lighter-weight M0 LPC1114 is based
26 on a Von Nuemann architecture with a single pipeline for both instructions and
27 data. This means that it usually takes two clock cycles to do something on the M0 that can
28 be done in one clock cycle on the ARM Cortex M3 LPC1343. The M3 LPC1343 implements
29 a Harvard architecture with a three-stage pipeline, meaning seperate pipelines for
30 instructions, data and peripherals that can all be filled in the same clock cycle.
31
32 This means that in certain situations 72MHz on the M3 LPC1343 can
33 actually be more than twice as fast as the 50MHz LPC1114, though this comes at the
34 expense of a larger and more complicated core that consumes more power and requires a
35 slightly larger die due to the increased gate count.
36
37 > **M0 Sidenote:** The single-pipeline bottleneck on the M0 is addressed in the recently announced
38 ARM Cortex M0+, which will contain a dual pipeline, while still maintaining a very
39 light-weight, efficient and inexpensive core. This is probably the most important
40 change in the M0+ since it offers much better performance per clock cycle, meaning
41 you can switch back to a low-power sleep mode that much quicker for better battery life.
42
43 If you need to get the best possible performance for your money and are doing
44 computationally intensive tasks or maybe a lot of rapid memory access and pin state
45 reads/writes, etc., the LPC1343 will be a better fit. If you need to get the lowest
46 possible cost and power consumption, the LPC1114 is probably the better choice, though
47 the LPC1343 has reasonably good power numbers as well.
48
49 One of the biggest advantages of the LPC1343 and LPC1114, though, is that they are
50 99% register compatible with each other if you want or need to switch to one
51 or the other, and learning one makes using the other trivial. While the LPC1343 Code
52 Base tends to be slightly more actively maintained, there is a parallel LPC1114 Code
53 Base that mirrors the LPC1343 library here, and it should be painless to switch between
54 the two. For more information see: https://github.com/microbuilder/LPC1114CodeBase
55
56 ## License
57
58 Unless otherwise stated, all files are generally licensed
59 under a modified **BSD license** (see license.txt for details).
60
61 ## Downloads
62
63 The latest development version of the software is always available on github at:
64 >https://github.com/microbuilder/LPC1343CodeBase
65
66 ## Development Status
67
68 While there are almost certainly bugs and chunks of decidedly
69 mediocre code in the library, after two years or so of fairly
70 steady development effort, the core code should be fairly
71 reliable. Some drivers in the /drivers folder are incomplete,
72 and may have been abandoned once the basic features were working
73 (setting pixels on a display, etc.), but they should serve as
74 a good starting point for a wide variety of peripherals.
75
76 The code base is definately imperfect, and some growing pains and faulty early
77 assumptions are evident throughout, but it hopefully at least
78 partially fulfills the goal of providing a genuinely open source
79 code base for the LPC1343 and GCC with no dependencies on any one
80 commercial toolchain or IDE.
81
82 ## Supported Toolchains/IDEs
83
84 The entire LPC1343 Code Base is based around **GCC**, and can be built
85 from the command-line using only free tools like the **Yagarto**
86 distribution for Windows or the Mac, or using GCC on Linux, etc.
87 > http://www.yagarto.de/
88
89 Nonetheless, it's sometimes more productive to develop in an IDE with a
90 full set of debugging tools at your disposal, and the code base also
91 includes project files for Rowley Associate's **Crossworks for ARM**, as
92 well as project files for the free and open source **CodeLite**, which can
93 be used in combination with a Segger J-Link for ARM and GDB Server.
94 Project files for these two IDEs are stored in the /build folder.
95
96 Project files for the free (but commercial) **LPCXpresso** IDE are stored in the
97 root folder, and this probably represents the cheapest means to do real step-through
98 HW debugging. For more information on using LPCXpresso with the LPC1343 Code Base see:
99 >http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/DebuggingWithLPCXpresso.aspx
100
101 ## Documentation
102
103 Online documentation is available at the following URLs, though the
104 current documentation reflects and earlier version of the library, and some
105 inconsistencies are present since parts of the library have been
106 reorganized working towards a 1.0.0 release. The graphics library in
107 particular has been reorganized quite a bit.
108
109 **General API Documentation:**
110 >http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/CodeBaseDocumentation.aspx
111
112 **TFT/OLED Graphics Sub-System:**
113 >http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign/TFTLCDAPI_v1_1_0.aspx
114
115 **Other tutorials and links:**
116 >http://www.microbuilder.eu/Projects/LPC1343ReferenceDesign.aspx
117
118 ## How Can Someone Support This Project?
119
120 A lot of the recent development in this library was done
121 thanks to the financial support of **Adafruit Industries** (paying
122 my salary to keep working on this stuff!). If you find this library
123 useful, please consider ordering something from the people that
124 make this financially possible: http://www.adafruit.com
125
126 Any additions, suggestions or bug fixes are always welcome, and this
127 is in fact one of the main incentives behind making this library
128 open source. If you have anything to contribute, using the feedback
129 mechanisms on Github is probably the best and most orderly way to
130 do this.
This page took 0.044314 seconds and 5 git commands to generate.