...
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 STM32CubeMX has been used to auto- generate the necessary Hardware Abstraction Layer (HAL) code. 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.
...
Other than the files that implement the necessary porting functions (i.e. dn_uart.c, dn_lock.c, dn_endianness.c, dn_time.c and dn_watchdog.c), all the platform specific source and header files are auto-have been generated with STM32CubeMX. In addition, all any user code in added to these generated files has been placed between "USER CODE BEGIN xxx" and "USER CODE END xxx" comments, which will be is left unchanged if you make changes to the STM32CubeMX project and generate new code. Therefore, the STM32CubeMX project files used to generate code for the example has been included in the repository:
...
Unfortunately, you can not simply change platform in generate code for another platform by changing the STM32CubeMX settings and generate code for another MCUfor an existing project. What you can do instead is to create a new STM32CubeMX project, select the platform of your choice and configure the same settings as in the provided project. Other than activating the two USARTs and correctly configuring their parameters, the default settings should do the trick (make sure to also have a look at the project settings before generating code).
...