cancel
Showing results for 
Search instead for 
Did you mean: 

Embedded Coding in STM32cube ide

KGupt.1
Associate III

Hi ST community

I want to do register level coding and make device drivers and do peripheral coding for STM32 MCU ( i have STM32F103 and STM32wb55) using STM32cubeIDE.

Now the thing is I am not able to figure out how to create a project in STM32cubeIDE which has only peripheral register header files(STMf103.c and stmf103.h) for making device drivers from scratch.

Don't want to use STM32cube Mx as it automatically generates all Low-level codes

On the net, most of the resources for doing register level coding is done by using Kiel and STM32 Cube MX.

But I don't want to use Keil and neither CubeMX for generating my codes.

1 ACCEPTED SOLUTION

Accepted Solutions

About register level coding LL is right SW stack for you what's why I've pointed you Templates_LL folder.

Best to start from scratch is File>New>STM32 Project then select Empty project type.

Up to you then to pick up minimal bare material suitable to you. Min according to me is Drivers/CMSIS.

Still my advice would be to look carefully to Templates_LL folder sounds like to me exactly what your are looking for.

View solution in original post

6 REPLIES 6
Cartu38 OpenDev
Lead II

Good start sounds to me like templates examples from firmware packs.

If WB serie look at STM32Cube_FW_WB_V1.10.0\Projects\P-NUCLEO-WB55.Nucleo\Templates_LL\STM32CubeIDE. All inlcudes are set, you can remove few .c drivers added to project then act by yourself.

Each serie is promoting same.

KGupt.1
Associate III

1) Well What if I don't use the CubeMx package and build codes totally from scratch via accessing registers and then making device drivers and peripheral codes.

What should be the steps for creating a project to code in Embedded C?

2) Another thing which I am looking after is any doc or resource for knowing the info on project files and their hierarchy structure ( files of projects opened in project explorer)0693W000006GXvzQAG.png 

Via second question I basically want to know what all files are essential for making a project from Embedded C not by Cube MX apart from peripheral register header files(STMf103.c and stmf103.h)

EJOHA
Senior

Hi KGupt.1

The best way is to create a new STM32 project and select the device or board which should be used. In the project wizard please select Empty project instead of STM32Cube project.

The project will be created with main.c and startup file. Then you can copy header files and source files from other STM32 example projects or your own device driver files into this project as you like. You can also add folders in the way you want them to appear.

The STM32CubeIDE contains the User guide with more information. It can be opened from the Information Center in the product.

About register level coding LL is right SW stack for you what's why I've pointed you Templates_LL folder.

Best to start from scratch is File>New>STM32 Project then select Empty project type.

Up to you then to pick up minimal bare material suitable to you. Min according to me is Drivers/CMSIS.

Still my advice would be to look carefully to Templates_LL folder sounds like to me exactly what your are looking for.

KGupt.1
Associate III

Okay, So like I Just create an empty project and include all the required header files( what I think only: peripheral register memory map) to start with embedded c.

But is there any doc which tells about the information that which file is for what purpose when a project is created by STM32cubeMx , so that can get to know what all files are essential for doing register level coding

Yes, you will need to included the header files you want to use. You can study corresponding c files in the FW packages. The name of the header, c-file corresponds to the peripheral names. You can also study different example projects in the FW packages for the devices you are using to get an understanding on how to use the peripheral drivers or just use the ST FW drivers as starting point when creating own drivers. STM32CubeFW packages also normally includes some documentation.

You will probably also need to study the specific STM32 device hardware manual deeply if you are going to develop your own device drivers.