by admin

Step by step debugging firmware on the Aliexpress / EBay STM32 boards

May 9, 2016 in ARM, C, C++, Hardware, Linux, Microcontroller, Programming, STM32, Tips & Tricks, Tutorial by admin

arm_cortex_logoIn some previous topics (here and here) I wrote about some cheap development boards which can be acquired from EBay or Aliexpress. Since System Workbench for STM32 is freely available for a while now, let’s see how can we use it to generate a project, compile it, upload it to a board and debugging it step by step. We’ll use for this the board I got from EBay, but it works the same with the any STM32 other board I have and also with some self-made ones.

For being able to install firmware on the board and debug it, first we need to have a hardware part which will sit between the computer and the board. There are various models and versions of these jtag debugers and they can be ordered online or found pretty cheap on ebay (clones). Another way to get hold of one of these is to have a development board which comes equiped with JTAG adapters, like the STM32 discovery series of boards. Some of these JTAG debuggers allow even breaking apart the JTAG debugger from the development board itself (LPCXpresso series, the nucleo boards).
Regardless of which JTAG interface is used, it should be one which is known to work with OpenOCD, as we’ll use OpenOCD for debugging. In our case we’ll use the stm32f4 discovery board’s stlink2 side. However, Before using it as a JTAG debugger, we need to disconnect the STLink part from the discovery board, by removing two jumpers. Once that is done, the STLink itself won’t be connected to the discovery board and it’s SWD header can be connected to any other board. Read the rest of this entry →

by admin

Using cheap STM32 eval board with TFT LCD module from ebay

October 29, 2013 in Hardware, Microcontroller, STM32, Tips & Tricks, Tutorial by admin

stm32_board2There are a lot of sellers on ebay selling cheaply 320×240 LCDs with touch screen together with a microcontroller board. Usually the development board contains a  STM32F103 microcontroller (sometimes different) with or without some additional hardware. As an exemplification one of such sold configuration is:

  • 3.2″ TFT LCD Module, 320 * 240 pixels resolution, 26m colors.
  • Resistive touch screen, with XPT2046 Controller.
  • 4-6 leds
  • Twobuttons connected to GPIO lines
  • Serial communication interface
  • 2 mini-type USB socket, USB to RS232 and USB Device
  • 1 Micro SD card connector
  • A JTAG / SWD debug interface (20pin)
  • RTC battery
  • USB Power Supply

This web page not only has some information about how these boards could be used, but also provide some sample code using the LCD and a downloadable virtual image, containing:

  • Ubuntu desktop
  • ARM toolchain (gcc + newlib)
  • Eclipse C++ IDE
  • – for loading code into the board
  • openocd – for loading code and debugging
  • Example FreeRTOS project with all source code, include LCD+touch drivers and a simple menuing system to get you started quickly

Isn’t that awesome?

For the original article and the link for downloading the virtual image, follow this link.

Skip to toolbar