- STM32CubeMX
- python
- python-lxml
The script can be used as:
python cube2chibi.py \
--ioc <cube MX project> \
--cube <STM32CubeMX Path> \
--chibi <initial chibi config file> \
--output <chibi config file output>
where:
- <cube MX project> - The file to convert
- <STM32CubeMX Path> - The STM32CubeMX installation folder
- <initial chibi config file> - The original chibi board config file - if this file
is provided, information from this file will be merged
with cube MX project file
- <chibi config file output> - The result file: chibi board config file
- Parse .ioc file as a dictionary
- Find MCU part number in the dictionary
- Open db/mcu/families.xml and find the file were we can find the file where the information about the MCU is located
- Open the MCU xml description file
- Load the MCU information: GPIO for the moment
- Update MCU properties from the dictionary
- Mix the information with the existing chibi config file if provided
- Save chibi config file
- Fix all default properties of GPIOs