Simplest Cortex-M bring up. Post#1: a no code approach

Powering up a new board design or even skiing off-piste with an eval board without vendor-suppled code? This post shows a way to look for first signs of life without depending on working debug toolchain or working target software.

I use a Segger JTAG probe that I covered in a previous post.

Some recent eval boards like the one for Nordic Micro’s nRF51822 ship with an on-board USB debug connection that has a USB-JTAG decoder chip on board. This board uses the same Segger driver as their JTAG box embedded in the decoder, so the below approach should also work.

Segger JLINK application driver has a series of useful commands for examining directly addresses in memory:

  • mem          Read memory. Syntax: mem , (hex)
  • mem8        Read 8-bit items. Syntax: mem8 , (hex)
  • mem16      Read 16-bit items. Syntax: mem16 , (hex)
  • mem32      Read 32-bit items. Syntax: mem32 , (hex)

Since many MCUs have a factory-programmed ID register, you can use JTAG to read this value and check for signs of life.

To start with, I target a STM32F100C8. This MCU has a register at 1FFFF7E0 hex containing a 16-bit value with the flash size of the MCU. This is covered in the STM32F100 programming manual on read more