Home Articles News Example ARM projects - new versions
Example ARM projects - new versions
User Rating: / 2
Written by Freddie Chopin   
Saturday, 19 September 2009 15:17

Example ARM projects for NXP LPC2103 i ST STM32F103RB posted in Download > ARM > Examples were updated. Changes made to the examples are focused on the elements that are easily forgotten - vector table, linker script, Makefile and startup.

List of most important changes:

  • C++ support in linker script, Makefile and startup (enabled in Makefile with USES_CPP variable),
  • change in Makefile and / or linker script causes rebuild of sources and / or re-linking of objects,
  • vector table and __Default_Handler() function are written in C, not in assembly,
  • update of OpenOCD shortcut to suit current 0.2.0 version,
  • minor naming and formatting changes,
  • (LPC2103) GDB shortcuts have options which make debugging more stable,
  • (STM32) header files in inc/ folder come from stm32f10x_stdperiph_lib v.3.1.0 (the most recent version).

Some explanation may be required on the increased stability of LPC2103 debugging. The details are pretty complicated so I'll try to present the short version of the idea. Due to mechanisms implemented by the manufacturer in the LPC2xxx chips, at the beginning of the debugging session the core is halted after executing some part of the flashed code. It is not possible to completely reset the core and halt it immediately after. If MAM and / or PLL are enabled somewhere in the code, than most probably they will be already enabled at the beginning of the debugging session (the core has already executed the peripheral initialization code). Because of that, some unexpected and random errors can be encountered during debugging, and the core can act in an unpredictable way. GDB shortcuts included in LPC2103 project initially disable both MAM and PLL with OpenOCD commands (which - of course - does not prohibit re-enabling them in the code), which makes most of the errors go away.

UPDATE (21.09):

There was a small update (v.1.1.1-090921) of the LPC2103 project, which improves the vector table implementation in the vectors.c file.

Last Updated on Thursday, 15 April 2010 11:29