Author Topic: stm32cubeIDE and C++  (Read 11928 times)

0 Members and 3 Guests are viewing this topic.

Offline LootMasterTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 192
  • Country: ca
Re: stm32cubeIDE and C++
« Reply #50 on: November 10, 2020, 03:51:01 pm »
I'm using Mbed-os, there I have already a C++ API. For STM32, the HAL/LL is used and when some functionality is missing, I can add code that is generated by CubeMX and I use a C++ wrapper to make it more versatile. I don't like a code generator for the whole app, C++ components are much more conveniant.
Mbed can create a makefile that could be used in CubeIDE, but I prefer using the Mbed build system in VSCode. The build system is going to change to CMake, that will make it easier compatible with other IDE.
Debugging in VSCode works with the Cortex-Debug extension. STLink V3 can be used also via Black Magic Probe in hosted mode.

And you use this to developp industrial equipement with certification etc??

Can you point me to a video guide for this on Win10?

Can you confirm it works with dual core projects?
 

Offline JojoS

  • Contributor
  • Posts: 10
  • Country: de
  • Software Engineer, Industrial Measuring Gauges
Re: stm32cubeIDE and C++
« Reply #51 on: November 11, 2020, 11:11:51 am »
And you use this to developp industrial equipement with certification etc??
Not yet, I have evaluated it for some of our products and see it will fit very well. I'm not in that department for these components, but we have used a proprietary OS for many years and I know about long term stability and the requirements.
I follow the development of mbed-os for about 10 years now and the last years it has grown a lot with the releases of V5/V6. The development process is controlled by an ARM team and is very professional. The CI process is hard and new features are accepted only with a lot of tests. This is quite different to Arduino with core development spread amongst many 3rd partys.

Can you point me to a video guide for this on Win10?
There are some videos on YT, but Mbed is changing fast and for the current V6 release I haven't found some official clips. But the complete history for Mbed5/6 is on github, so the old installer for windows is still working:
https://os.mbed.com/docs/mbed-os/v6.4/quick-start/index.html
Using the Mbed Studio is a simple way to start, using the mbed-cli is more versatile, but requires more knowledge when you want to integrate the tools into an IDE.
The Windows installer runs on Windows 10, but you should deselect the components toolchain, git and python and install current versions manually. After installing the tools, you should have the command 'mbed' working in the cmd. Then you can start with https://github.com/ARMmbed/mbed-os-example-blinky, it contains instructions to build.

Then you will be amazed how much stuff is compiled for a simple blinky  :) But its part of the philosophy, the whole system is compiled to ensure everything fits together. Consequent builds are faster because they build only the modified sources (unless you change something in the configuration files). I have set up a linux machine now also, because it compiles significantly faster on the linux fs. Even in WSL that could be used also.
The large number of files should not scare you, the OS has grown for many years and the build system based on python needs some upgrade. CMake looks like a solution for better modularity and it is already being worked on.

Can you confirm it works with dual core projects?

no, I have used STM32H7 and see these controllers are powerful but much more complex. For some there are already different revisions and revision dependent fixes in the HAL. But there is already support for these dual cores in the OS. As they are quite new, I would do careful testing before using them in critical missions.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf