cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set STM32CubeIDE in the following way

YAkse
Associate III

Preamble: consider I have an STM32F4 Discovery Board.

Hi,

STM32CubeIDE offers a very good interface and opportunities. However, I am type of a person who wants to actually see each step. So, I want such a configuration that, only the minimum set of required files will be added to the project folder, and then I will code everything by mysel. I mean no HAL or LL libraries will be added etc. I just want that file in which register addresses are defined, (it was something like `stm32f40xx.h`) . And then I want to write my code into a fully clean empty(no System clock config function or gpio_init functions) `main.c` and and build the project, and load it into my board. I could not configure CubeIDE in that way. I tried somehow changing the advanced project settings of a STM32 Project in such way it will not overwrite those functions to main.c but I could not do it. Then I tried to just open a C project but this time I could not achieve to load the code into my board and debug. Because I could not find a place to choose target device.

So, can you please provide me a set of steps to set CubeIDE in this way?

Any non CubeIDE way of approach also would be appreciated.

Thanks.

3 REPLIES 3
Pavel A.
Evangelist III

Just generate a minimal project with CubeMX/CubeIDE for your target and delete what you want.

It will have correct target MCU and include paths.

If you are Christian, sprinkling holy water on the PC may help exorcise remainders of HAL evil 😉

-- pa

hahaha, no I am not. But a funny idea :D thanks for the answer. If I build the project with CubeIDE and then load the generated .elf file via CubeProgrammer, would this work? Do you have any idea?

Pavel A.
Evangelist III

Yes this should work. CubeIDE has a subset of the programmer, so it alone can download your binary to the target.