Content originally posted in LPCWare by wellsk on Tue Jan 28 09:53:37 MST 2014
LPCOpen is the current and planned software development and release approach for current Cortex M and any upcoming devices. The intention is to provide a standard software development approach that is the same across all device and platforms. LPCOpen is CMSIS based although it doesn't have the word 'CMSIS' in it's name, it uses the ARM provided CMSIS header files at it lowest level for core functions related to the NVIC, System tick timer, etc.
Here are some of the goals of LPCOpen, but this isn't a complete list. Some goals are met, others are ongoing.
- Provide drivers with the same or very similar APIs across multiple platforms - this has limits based on the functional differences on peripherals across devices, but APIs should be very similar
- Drivers such as GPI, I2C, SSP, UART, etc. are the same across platforms
- Provide basic examples that show how to use those drivers in an environment, most examples are very similar across platforms, but highlight part specific differences in some cases
- Standardize code startup approach that handles clean system bring up before main() - clocking, platform level pin muxing, external memory setup
- Simplify projects (trying to avoid complex linker scripts, work on non-Windows platforms (LPCXpresso), and use only standard features specific to a tool chain. Projects are provided for Keil MDK/UV4, IAR EWARM, and LPCXpresso tool chains
- Optimization - drivers work at full optimization level and use less code space than legacy drivers, examples ship size or speed optimized by default
- Drivers attempt to avoid the use of data defined in the driver, use of context specific data if possible
- Standardize DEBUG API - DEBUGIN, DEBUGOUT, DEBUGSTR - with ability to disable in production code
- New devices such as the 11u6x are only released in LPCOpen format
- Much improved 3rd party code integration - LWIP, FreeRTOS, uCos-III, emWin, etc.
- Constantly being improved, bugs being fixed, and updates released
- Clean, readable code that is commented with meaningful comments in the right places. Improved documentation for functions (API level documentation)
- Eventually: Driver use documentation that explains the driver use model and how to use and setup the driver in detail
- Distinction between chip and board layer code, standard set of board/platform functions (LED, DEBUG, UART, SystemInit()) that work with all examples
There are a lot of changes behind the scenes, things that aren't necessarily seen or heard - more code reviews, driver improvements and bug fixes, better change and package version history, automated testing, etc. to help improve quality and reduce potential problems.
LPCOpen isn't perfect and will probably never be perfect for everyone. There will be those that prefer the CMSIS code bundle APIs as they are comfortable with them, there are those that want C++ or mbed style drivers, others still want something different that is more suited to what they are doing. Using LPCOpen over the legacy CMSIS packages is a personal choice. If you are happy with the legacy bundles and currently have projects that you are using based on them, I'd stick with the code bundles. If you are considering starting from scratch, or are using a new device, or just starting with LPC device, I'd use LPCOpen.