Flashing NuttX on Viewtool STM32F107 board

Yesterday I received a Viewtool STM32F107 board V1.2 from ebay:

Unfortunately this board doesn’t have a built-in programmer (well, I didn’t test DFU mode), then I decided to use the st-link v2 programmer:

It was easy to connect the st-link programmer to viewtool because it use SWD interface. Only three wires were needed:

ST-Link V2    Viewtool JTAG connector
GND ---------------- GND
CLK ---------------- TCK
IO  ---------------- TMS

Now it is time to compile NuttX to Viewtool board, it is also very easy because NuttX has native support to this board. Then I just configure NuttX profile to viewtool/nsh and selected the Build option to “Raw binary” (default is Intel HEX format).

The compilation was fine and generated the nuttx.bin file. Then I just use this procedure to flash NuttX on viewtool: https://acassis.wordpress.com/2014/01/13/using-a-stm32f4discovery-board-to-flash-stm32f100rb-from-stm32vldiscovery/

Important: You need to remove the USB/Serial module from USART1 otherwise it will interfere in the SWD initialization. Keep the board powered only by miniUSB connector, then openocd wil get control correctly using st-link_v2 interface.