Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

SimplePublish for NUCLEO-L053R8

The QSL includes a SimplePublish example for the STMicroelectronics NUCLEO-L053R8 development board. This is given as a project for the Eclipse/GCC based System Workbench for STM32, where the STM32CubeMX has been used to auto-generate the necessary Hardware Abstraction Layer (HAL). The application behaves just like SimplePublish for the other platforms, and like the example for SAM C21; debug prints are re-targeted through a second serial port. A green LED on the Nucleo board is also toggled to indicate whether the mote has connected to a network or not.

The example was developed on System Workbench for STM32 v1.8 with STM32CubeMX version 4.16.0

Download System Workbench

Go to the OpenSTM32 community webpage and download the System Workbench for STM32. The IDE is free and available for all platforms that support Eclipse, but you will have to register and validate a user to get access to the download and accompanying instructions.

Make sure to check your spam filter if you don't receive a validation email after registering.

 

Prepare the NUCLEO-L053R8

Connect to Mote

Connect ST-Link to Computer

Open Debug Terminal

Compile and Run

Open Workspace

Start up the System Workbench for STM32 and browse to examples/nucleo-l053r8/ when promted to select a workspace.

Import Project

  1. File > Import... > General > Existing Projects into Workspace and press Next >.
  2. Select root directory: Click Browse... and navigate to the SimplePublish example: examples/nucleo-l053r8/SimplePublish/
  3. Press OK
  4. Select SimplePublish that appears in the Projects list.
  5. Make sure to leave the option Copy projects into workspaceunchecked and press Finish.

The System Workbench project expects to find the sm_clib and sm_qsl as they appear in the Directory Structure. If you chose the zip download or subversion checkout, the sm_clib/ directory from the separate unzipped folder/svn checkout need to be copied into the QSL repository to achieve the same structure.

Build

Project > Build Project (or press the  icon) to build the project.

By default Eclipse will index unused headers, causing some errors that don't affect compilation. You can remove these by disabling the option in project properties:
Project > Properties > C/C++ General > Indexer > Indexer Options > Index unused headers

Debug/Run

The first time you run the project, you have to select the correct debug configuration:

  1. Run > Debug (F11)
  2. Select Ac6 STM32 C/C++ Application and press OK.
  3. Eclipse should now prompt you to change to a Debug perspective, before starting a debug session.

After this you should be able to debug/run the project with Run > Debug (F11) and Run > Run (Ctrl+F11) (or press the icons: ) without any configuration.

 

  • No labels