2022-11-07 12:33 AM
I'm searching a starting point to program for a blue pill or other STM32 M3 or M4 architecture under STM32CubeIDE, but not using HAL, just plain C. Where do I find the appropriate libraries, headers and documentation?
2022-11-07 01:05 AM
HAL is written in C, C is a languaje, HAL stands for hardware abstraction layer and its just a bunch of libraries provided by ST.
They are not perfect, not everyone uses them, if you do use them,handle with care and schepticism, i do use them.
>> but not using HAL, just plain C
Why you dont want to use it?, i get from the question youre just getting started with stm32.
Your options(from lowerest level to highest):
>>Where do I find the appropriate libraries, headers and documentation?
Of which one
2022-11-07 01:23 AM
You might have misunderstood my level of knowledge. First off, I know C for decades. I know that HAL is a layer, not a language. I already programmed the devices in assembler. So I already dealt quite a lot with the registers etc. I just don't like HAL.
My question only aims at where I can find the documentation for the C-API, be it LL. And how do I switch off HAL when creating a C/C++ Project under STM32CubeIDE?
OTOH, even if I would be using HAL, where do I find the documentation, the #defines and available functions etc.?
2022-11-07 01:44 AM
>>First off
alright alright, sorry
>>I just don't like HAL.
ok
>>where I can find the documentation for the C-API, be it LL
>>OTOH, even if I would be using HAL, where do I find the documentation, the #defines and available functions etc.?
you didnt clicked in any of the links i sent didnt you XD.
basically you go to your specific chip reference manual
>>And how do I switch off HAL
as they are just libraries, delete the corresponding ....hal.....h include, or if they are still giving you trouble remove the folder from the project path.
Are you using CubeMX? to generate your code? or starting from a blank template?
2022-11-07 01:47 AM
The thread title is misleading, it should probably be "CubeIDE and ...". CubeProgrammer is a different software, intended only to "burn" binaries into target chips.
What you may be looking for are the CMSIS-mandated device headers, which are distrubuted as part of Cube, e.g. for STM32F4xx here. You are also likely to need the processor-core-specific CMSIS headers.
Normally, build systems which come with IDEs are set up so, that after chosing the target STM32 model, all the needed headers are automagically included with a single #include, e.g. #include "stm32f4xx.h" if target is from the 'F4xx family.
If the I'm not sure how does this translate to "under CubeIDE" as I don't use CubeIDE.
JW
2022-11-07 02:00 AM
Oh, thanks. D*mn, I dealt with so many of these recently so I intermixed. It should be STM32CubeIDE of course, how could I 🙂
I changed the topic accordingly.
@Javier Muñoz : sorry, didn't recognize there were embedded links. Did you edit your message? Since I didn't see the links in the first place. And thanks. Found the link to the HAL and LL driver manual.