Westernization of RTEMS/stm32H7 [was: Re: Discussion: How to handle HALs, SDKs and libraries]

Karel Gardas karel at functional.vision
Sat Jul 15 22:07:55 UTC 2023


   Hello,

Christian mentioned Zephyr west tool as one of good/possible candidates 
for RTEMS tree modularization especially with regarding to HALs and 
other 3rd party libraries.

For comparison with my previous git submodulization of RTEMS/stm32H7 
I've also westernized the same in a similar way. Yes, it is intended to 
remove CMSIS v4 *just* to proof compilation is working with CMSIS 5 from 
outside module! This is just dirty PoC nothing more. A tree structure 
looks a bit different as (folowing zephyr example) I keep modules 
outside the rtems tree. Hence result for west init command below is tree:

modules/hal/stm32h7/stm32h7xx_hal_driver
modules/hal/stm32h7/cmsis_device_h7
modules/hal/stm32h7/CMSIS_5
rtems/...


So if you like to see thing, then install west:

$ pip3 install --user west
$ export PATH=$PATH:$HOME/.local/bin

go into some testing directory and:

$ west init -m https://github.com/karelfv/rtems --mr 
rtems-west-stm32h7-hal rtems-workspace

$ cd rtems-workspace/
$ west update

Compilation again produces working samples. In comparison with git 
submodule approach I find west a bit more civilized (user friendly). 
Nothing is shooting in my own feet etc.

What may resonate in RTEMS devs is:

- yaml format for module configuration
- west implemented in python3
- west extensible

It probably will not be big issue to implement custom:

- west bsplist
- west bspdefaults
- west configure
- west build

which would just delegate to waf for actual work if needed...

Comments welcome!

Karel



More information about the devel mailing list