Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Starting with SW4STM32

Hi,
I’m have recently started working with the SW4STM32, and to do so, I’m trying to learn using the package of examples contained in the package of exampls provided by ST Microelectronics. The only thing I could get from there so far isto blink leds and write and read pins in a very simple, after a lot of time openning several declarations of the “BSP functions” used in the examples, and using the primary functions instead of the BSP ones (which by the way, couldn’t be recognized by the IDE, and I couldn’t find out how to make my CubeMX generated project include these libraries). Now I have to learn how to use the TFT LCD display, but openning declarations is being totaly against any concept of ease of use. It doesn’t even make sense, since we use libraies to reduce time spent on several lines of codes thar are already written. I even ask about that around here, but I got no answer.

So, all I’m asking you is how and where can I learn to use all these BSP functions. Is there any source of meaningful information about it? I couldn’t find any.

Thank you

Vítor Pereira

BSP means Board Support Package, which is specific to the board hardware.
Usually the vendor who provides the board will provide an emaple of BSP to the board.
You have to read the hardware specification document to understand how to work with those hardware components, and then make your own version of BSP.

Hi, thanks for your reply.
I’ll keep studying, then.


CubeMX will not add “st BSP ” for nucleo or disco eval board even if you select thems
you may add the st bsp drivers file in the genererated project by copying the bsp source from the CubeXX package into project folder.

for instance on windows and a discovery f4 the bsp file are here
C:\Users\xxxxxl\STM32Cube\Repository\STM32Cube_FW_F4_V1.14.0\Drivers\BSP\STM32F4-Discovery

if you copy all from here in the cubmax src project folder then add the “src” folder as part o fthe include path it may do.

but beware do not enable in cubemx any perif handled in the bsp side it iwll generated conflict
Also you may run into msp init , irq and callback conflict when to enable or use some perif used in the bsp (i2c , spi etc...) because msp code in bsp will conflict with CubMX as it can be only one msp_init/deinit and callback per perif family .
I suspect that is why “bsp” are not hanlde by CubeMX

basicaly st “bsp” are not very friendly to upgraed or re-use as is,
but you can easily look at the st bsp files to learn and copy paste the bit of code you need into your own project (inisde cubemx “user” banner).

To learn you can use the CubeXX bsp example or demo projet as starting point lcoated here
C:\Users\xxx\STM32Cube\Repository\STM32Cube_FW_F4_V1.14.0\Projects\STM32F4-Discovery\Examples\BSP\SW4STM32\STM32F4-Discovery

but beware copying and duplicating this projects oustide the “CubeXX” repo may not be easy, also all drivers files are shared among all projects and cubemx so any changes you do here will affect all!

Hi,
you said “if you copy all from here in the cubmax src project folder then add the “src” folder as part o fthe include path it may do.”
How do I add the “src” folder as part of the include path?

Thanks

Vítor Pereira


Hi

The point is that CubeMX generated code generally do not fit the the “firmware” examples in STM32Cube_FW_F0_V1.5.0, STM32Cube_FW_F1_V1.4.0, STM32Cube_FW_F3_V1.6.0, STM32Cube_FW_F4_V1.11.0, STM32Cube_FW_L0_V1.5.0, STM32Cube_FW_L1_V1.4.0, ... One can not import an example project into AC6 and then modify it by CubeMX thereafter.

See also the discussion https://community.st.com/thread/34173-usb-cdc-example-cubeQuestion

My approach is to generate the initial code by CubeMX and then using the examples and the HAL documentation to write my own code. This way I can recreate the project any time by CubeMX changing the usage of the peripherie.

What makes things even worse is the fact, that updates of CubeMX can break existing code. Last example is user_diskio.c. It was all user code before CubeMX 4.16. Now CubeMX insists here of function names beginning with user_

Please find examples of my solutions here https://github.com/nichtgedacht/mini-sys/Question

Dieter


Hi, thanks a lot, guys. All tips are being of great value to me!

Vítor Pereira


I now have found the STemWin library, that seems to be even more appropriate to make use of the display.

Vítor Pereira