ST Microelectronics MCUs and IDEs
Anyone like to discuss ST MCUs and development software on a Linux OS?
I have spent a lot of time programming the nucleo boards and using the CubeIDE environment which includes CubeMX. My hats off to ST they have done a wonderful job with the tools and ease of use. I also use linux as my main desktop. Everything ST runs well on it with no problems. The ST forum has not been very useful to me, though. They have a core for nearly all of their processors so you can even program them int the arduino ide if you wish.
The debugger support is awesome.I really miss that when I use an arduino nano.
I like the low level library much better than HAL. Basically it is register manipulation which I understand more than using the hal library.
I do find myself using arduino nano's a lot since my projects seem to fit in the allotted ram and flash. Of course I am using the Arduino IDE. Honestly 8 bit micros are just so much more fun to use for me.
I seem to be migrating to the esp32 because of the connectivity with wifi and blue tooth. I don't like the native IDF environment so I use the arduino IDE for those.
I use Arduino UNO, it's really good for a newbie like me.
@maxli Yes UNOs are great, so easy to use and connect to other items and once a project is developed it can be implemented in a more space effective NANO. The Arduino IDE is easy to use. I'm not much more than a newbie myself and have tried many MCUs and IDEs but when you need high performance, 32-bits, a totally reliable debugger and a rock solid IDE then the software and hardware from ST is hard to beat - IMHO.
@noweare I agree with your comments re ST. NANOs are great for small projects but I feel out of control without a debugger to set breakpoints and single step through code. I tried using ESP32s with PlatformIO and the ESP-Prog interface board but every time VScode or PIO updates it seem to break something but as I have no interest in WiFi or Bluetooth I was happy to switch to ST, with which I have had zero issues to date.
I'm interested in your comment re low level libraries, I have been using the HAL facility as it's there and I assume it makes the code more portable to other ST products; what can one use low level libraries for and how do they work e.g how would you implement HAL_Delay(1000); using libraries, or is that not a good question?
@stevenbennett When you download the software there is documentation for the libraries which there are two. HAL and LL
The LL libraries really just manipulate the registers and also the function are named to kind of self document the code. Besides using the H files for documentation I will also try and read the source code (C) files.
The libraries are located under Repository/STM32Cube_FW_L4_V1.16.0/Drivers/STM32L4xx_HAL_Driver/Inc/ and you will see to sets one for HAL and one for LL (low level)
So for example if you want to use the GPIO pins and the low level library you would use
If you want to use the upper level HAL library you'd use
To choose either LL or HAL it is done in CubeMX since that is where most of the configuration stuff is done.
The function for the equivalent HAL delay is LL_mDelay(uint32_t Delay); and is found in STM32xx_LL_utils.h
To get a feel for the LL read the header files *.h and *.c files and/or compare to HAL files for the same functionality.
@noweare That's really helpful - thanks. For other readers I found the setting for HAL/LL in CubeMX > Project Manager > Advanced settings > Driver selector where for each MCU architecture feature the driver can be selected from a drop-down menu - wonderful! Example attached.