Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Blinky example for STM32 nucleo board

Hello,

The getting started instructions worked very nice for a first project.
However, to get a full rewarding experience, a “blink” project template for the STM32 Nucleo board (STM32L053) would be very nice.

I tried both project templates (empty and download firmware), see screenshot. What steps to follow to blink the LED of the Nucleo board?

Thanks a lot!

Hi Farsi,

Have you tried generating a project through CubeMX? It is quite easy to generate a empty project (plenty of guides on google), setting the desired LED’s GPIO as output and maybe labeling it as LED.
Then you can simply add the follwing two lines to your main while loop

HAL_GPIO_TogglePin(LED_GPIO_Port,LED_Pin);
osDelay(1000);

And it should work.

If you are looking for a already complete solution you can download the firmware examples from stm for the L0 series

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubel0.htmlQuestion

I don’t have a L0 board to test with but if you go into the root folder of the firmware bundle then into Projects/STM32L053R8-Nucleo/Examples/GPIO/GPIO_IOToggle you will find a led toggle example.

To import the example into system workbench open system workbench then go File->Import->General->Existing Projects into Workspace->Browse

Then navigate to the Projects/STM32L053R8-Nucleo/Examples/GPIO folder and select the GPIO_IOToggle folder then click ok. There will be two projects to import, select the one with SW4STM32 in it’s name as thjis is the one for system workbench.

Finally click finish and the project should be imported. You can then press Crtl+B to build the project then navigate to Run->run to flash the project onto the board.

Hope this helps.

Thanks for all the pointers.

I started by downloading the Eclipse CubeMX plugin and it works very nice on my MacOS system. Next step was to select the chip. For the STM32L053 nucleo board I guess it is: STM32L053R8Tx (not exactly sure as CubeMX lists so many parts).

Next step I was looking for the LED pin in CubeMX. I am trying first without going through the board schematics. So, the interesting list seems the pin PA5. What do you think? Maybe there is another trick to see the pin mapping for the Nucleo regarding blinky pins. So, my setup is as shown in the first screenshot.

Now, generating the code is a bit confusing for the first time. I will continue later there. Maybe you have some hints already where to look...

thanks in any case... the nucleo + openstm32 combination looks promising for scalable embedded development.

SW4STM32 is system workbench

Great!!!

The LED is blinking with:

  1. include “stm32l0xx.h”
  2. include “stm32l0xx_nucleo.h”



int main(void)
{
HAL_Init();

// LED clock initialization
LED2_GPIO_CLK_ENABLE();

// Initialize LED
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Pin = LED2_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
HAL_GPIO_Init(LED2_GPIO_PORT, &GPIO_InitStruct);


for(;;) {
// HAL_GPIO_TogglePin(LED2_GPIO_PORT,LED_GREEN);
HAL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN); // Toggle the state of LED2

HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_9);

HAL_Delay(400); //delay 100ms
}
}