Electronic – Using LPCxpresso with barebones LPC4337 board

armdevelopment-toolsidelpc43xxlpcxpresso

I recently purchased a development board on eBay that will allow me to work with NXPs dual core LPC4337 ARM M4/M0 processor.

I have experience working with uVison4 from KEIL, for the FRDM-KL25 from Freescale, although I'd prefer to use the LPCxpresso environment from NXP.

With KEIL, all I'd needed was:

  • The chip header file which was just full of macros for definitions (such as LPC43xx.h)
  • The startup_(chip name).S file
  • and the system_(chip name).c/.h file

If I had those, I could make a main.c program, include them and boom I'm off and working. The main reason I don't want to use KEIL in this application is because their multi-core support is sketchy where as LPCxpresso has been made by NXP to support the multi-core development.

With LPCxpresso, it isn't the same case with a bare-bones project. Supposedly there are some files that are generated that tie into the development environment and it isn't explained exactly what I have to do with those files.

NXP has many examples of code, all of which have full drivers and everything. Normally that'd be awesome, although I want to write my own drivers since I want to know exactly what is going on with as little overhead as possible.

I've asked on the LPCware forums but either they weren't too helpful or I just didn't understand them. This guy seemed to have a similar issue but he didn't post an updated project with everything he got working.

My point is, I'm having a really hard time getting a bare-bones minimum working project going like I could in KEIL. Has anybody been able to do this? Or what files do I need?

Best Answer

Ok, I'd comment to you but now I try to answer to your question.

At first, Which compiler(or IDE) is better? keil or LPCxpresso?

It completely depends on your job and yourself. Well there are many features for each one of them. for LPCxpresso:

  • Complete C/C++ integrated development environment
    • Eclipse-based IDE with many ease-of-use enhancements
    • The IDE can be further enhanced with many Eclipse plugins
    • CVS source control built in; Git, Subversion, TFS, and others are available for download
    • Command-line tools included for integration into build, test, and manufacturing systems
  • Industry-standard GNU toolchain, including
    • C and C++ compilers, assembler, and linker
    • Converters for SREC, HEX, and binary
  • Fully featured debugger supporting JTAG and SWD
    • Built-in flash programming
    • High-level and instruction-level debug
    • Views of CPU registers and on-chip peripherals
    • Support for multiple devices on JTAG scan-chain
  • Library support
    • Redlib: a small-footprint embedded C library
    • Newlib: a complete C and C++ library
    • Cortex Microcontroller Software Interface Standard (CMSIS) libraries and source code
    • Full support for LPCOpen libraries
  • Device-specific support for NXP's ARM-based MCUs (including Cortex-M, ARM7, and ARM9 based parts)
    • Linker scripts automatically generated for correct placement of code and data into flash and RAM
    • Startup code and device initialization provided
    • No assembler required with Cortex-M based MCUs
  • Red Trace
    • Red Trace enables instruction-level debugging via Embedded Trace Buffer (ETB) or Micro Trace Buffer (MTB)
  • Red State state machine designer and code generator
    • Graphically design your state machines
    • Generates standard C code
    • Configures NXP State Configurable Timer (SCT) as well as supporting software state machines

for Keil:

  • Feature The µVision Device Database automatically configures the development tools for the target microcontroller .:Benefit:. Mistakes in tool settings are practically eliminated and tool configuration time is minimized.
  • Feature The µVision IDE integrates additional third-party tools like VCS, CASE, and FLASH/Device Programming .:Benefit:. This allows you to quickly access all your development tools (development tools and third-party tools) from a single environment. All configuration details are saved in the µVision project.
  • Feature µVision incorporates project manager, editor, and debugger in a single environment .:Benefit:. Accelerates application development. While editing, you may configure debugger features. While debugging, you may make source code modifications.
  • Feature Identical Target Debugger and Simulator User Interface .:Benefit:. Shortens your learning curve.
  • Feature The Code Coverage feature of the µVision Simulator provides statistical analysis of your program's execution .:Benefit:. Safety-critical systems can be thoroughly tested and validated. Execution analysis reports can be viewed and printed for certification requirements.
  • Feature The µVision Simulator is the only debugger that completely simulates all on-chip peripherals of the Atmel, Philips, and Samsung smart card ARM devices .:Benefit:. This allows you to write and test application code before production hardware is available. You may investigate different hardware configurations to optimize the hardware design.
  • Feature Simulation capabilities may be expanded using the Advanced Simulation Interface (AGSI) .:Benefit:. Your sophisticated systems can be accurately simulated by adding your own peripheral drivers.

Also you can see the µVision Simulator Benefits here.

If you ask me about selecting the compiler, I want to choose the Keil because this company has a bigger and older experience in designing and making the IDEs and compilers and also I can see some disadvantages for LPCxpresso. for example seems it doesn't support non-NXP products (ST and TI and freescale and etc) and you cannot find many consultant and expert for speaking with them to figure out your problems. on the other hand, if you just want to use the NXP products then I think the LPCxpresso is better than the Keil.

NXP has many examples of code, all of which have full drivers and everything. Normally that'd be awesome, although I want to write my own drivers since I want to know exactly what is going on with as little overhead as possible.

Why!? don't waste your time, Shannon! there are many HAL(Hardware Abstraction Layer (standard peripheral library)) that you can have a look at those and know exactly what is going on with as little overhead as possible. for example: the HAL library of company of your MCU or CMSIS or MBED.org lib and or etc.

a recommendation for choosing compiler:

if you have enough money, you can buy IAR(IAR Embedded Workbench for ARM) from IAR Systems. I have heared that it's the best compiler but you have to have enough skill for working with it.

I hope this will help you. if you still have any question, then ask in comment and if my knowledge is enough, I will answer you.

refrence:

Keil Wikipage

Advantages of the µVision IDE for ARM

Advantages of the µVision Simulator for ARM

LPCXpresso home

Mbed