Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


new to ST in general... actually new to ARM

Hi Ciprian,

I see what you mean, I did snoop around a bit on the downloads and updates in software, I saw some things were buggy, missing header files and some other issues.

good news is that I managed to get my LED to blink all by itself, without the example project (still used parts of the main.c file)

I uninstalled system workbench and cube mx, system workbench had some issues with the HAL library, I think something may have been corrupt or not downloaded properly, I remember a small error when updating and i might have clicked ignore, I forget

so... from the beginning, the idiot proof instructions:

this is what I did.

1) download and install both system work bench and cubemx (already had them)
2) install cubemx, go to help>install new libraries>(select firmware to download, since im using the nucleo STM32F401RE, I downloaded the latest F4 firmware package {v1.8.0})
3) then after installing AC6, select a workspace, any empty folder you want, I have the following: C:/blackbox (I got a tip from a friend to not use any spaces)
4) on AC6, after selecting new work space, go to file>new>C++ project
5) this part is weird, im sure ther are better ways to do this, I just havent figured out how to do it, but make a project name (any name, this will get discarded)
6) select AC6 under executables, keep the default location, doesnt matter really, click next
7) click next on the “select configurations” page, leave it unchanged
8) on the MCU configurations page, since I have a nucleo board (this instruction set is for nucleo!), i select the F401RE nucleo in boards, its configurations are already there, then click next
9) this part is where the updates kick in, the firmware required should get downloaded, click on standard peripheral library, then click on the “download target firmware”,(downloading took me a while) DONT CLICK NEXT
10) now select the Cube HAL libraries radio button, click “download target firmware”, (this also takes some time)
11) click cancel, discard the project, now your AC6 is updated!

then I wandered off into Cubemx, what a nifty little program

12) open cubemx, since you already downloaded the F4 firmware (see step 2), you can use this program to build yourself a project.
13) click on new project
14) at the top, there is a tab for “board selector”, since using nucleo is so easy, there are settings waiting for you, select the type of board (nucleo for me), then select the MCU series (STM32F4), select on your board in the list (STM32F401RE)
15) a picture of a MCU opens up and you you can edit the pins according to the datasheet if you want, but all the pins are setup according to your board, so you dont need to change anything if all you want is to blink an LED
16) go to project>generate code
17) name your project (blinky), under “toolchain” select SW4STM32, I selected C:/blackbox as the folder for my project, your code should be generated without fail
18) go back to system workbench AC6, go to file>import
19) go to general>existing projects into workspace, click next
20) select the root directory, the project folder that you just created (blinky) and click ok
21) and then click finish, voilla, a clean project with all the files you need for your nucleo
22) read up the example folder in your repository for HAL libraries, the GPIO example, using that code you can type in your own code, all the settings are already setup for inputs and outputs, all you need to do is blink an LED.

I added my main.c file if anyone needs to copy code

now that I have figured out how to blink an LED, I can further investigate how to initialize my MCU, from these codes and the project examples, I can also build a working UART mcu, step one for now is complete.

I thank you guys for the assistance, specially ciprian, thank you for putting some effort in helping me understand ST, I look forward to more posts from you.


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs