2023-07-24 07:21 AM
a) looking at UM1718 Rev 41 (July 2023) "11.4 Generating the report" there should be a button in the "Project Manager" Tab to start a export. I don't remember seeing it before and in "STM32CubeMX - STM32 Device Configuration Tool Version: 6.9.0-RC9 Build: 20230705-1724 (UTC)" in updatetd CubeIDE and "STM32CubeMX Version 6.9.0" separate install, both Windows I don't see the button.
b) is there some Documentation for the ioc format or even better a ioc parser. my impression is that there are numberings in ioc files that depend on editing order -> makes it hard to diff
c1) is there a a diff tool for ioc files?
c2) is there a tool that writes a ioc file in canonical form - would allow diff with standard tools
2023-07-24 07:46 AM
Hello @_richard
First let me thank you for posting.
In order to generate a report you need to follow those steps:
-Select File then click on Generate report
Thx
Ghofrane
2023-07-24 05:20 PM
I use a custom git diff driver with a simple textconv script for better diffs.
It does the following:
Note that the output is no longer a valid IOC file. It's for generating diffs only.
User .gitconfig:
[diff "cubemx"]
textconv = git_textconv_cubemx.sh
Repo .gitattributes:
*.ioc diff=cubemx
git_textconv_cubemx.sh:
#!/bin/bash
sort --version-sort $1 | gawk '
/^Mcu\.IP[0-9]+=/ { sub(/^Mcu\.IP[0-9]+=/, "Mcu.IP="); print; next }
/^Mcu\.Pin[0-9]+=/ { sub(/^Mcu\.Pin[0-9]+=/, "Mcu.Pin="); print; next }
/\.(IP|Request|GPIO)Parameters=/ {
eq = index($0, "=");
print substr($0, 1, eq);
split(substr($0, eq + 1), values, ",");
asort(values);
for (i in values) print "\t" values[i];
next }
/^ProjectManager\.functionlistsort=/ {
eq = index($0, "=");
print substr($0, 1, eq);
split(substr($0, eq + 1), values, ",");
for (i in values) print "\t" values[i];
next; }
{ print }
'
2023-08-13 12:43 AM
this looks really interesting, i will try it for linux environment.
for windows environment this probably needs some additional installs.
2023-08-13 01:14 AM - edited 2023-08-13 01:36 AM
Hi Ghofrane,
thanks for the hint. i can confirm that for cubemx 6.9.1 the menu entry exists.
that menu entry is not accesible in cubeide as far as i see -> reports only from cubemx.
anyway that should be
- either documented correctly in the manual
- or reverted back to the documented state where the report should be accesible also from cubeide with intgrated cubemx
i will have a look how good the reports are usable for comparing configurations
do you have an idea how these report can be generated in a scripted way?
2023-08-13 09:09 AM
This is very helpful for git diffs.
I was wandering if there is any info about the format of a .ioc file with some list of parameter names.
It would be useful to build up a 3 way diff/merge tool.
The reason is to migrate projects to different MCUs even if they are not in the compatibility list of MX tool.
Or maybe Is the wrong place to ask or start a new topic