2023-08-06 09:25 PM
Hi,
Since a recent upgrade to STM32CubeIDE I am getting the following error when importing variables into STM Studio:
Wrong version in compilation unit header (is 5 should be 2, 3, or 4)
This is preventing me from debugging my system. I tried using STM32CubeMonitor, but the charting is so rudimentary it is useless.
I am assuming that the upgrade to the IDE incorporated a later version of GCC and it is this that is producing elf files in that have a CU header of 5.
Is there any simple work-around that anyone knows of?
I could go back to a later version of the IDE, but once you get on that merry-go-round you end up with a big mess, because inevitably something else will break.
I know you can also enter the variables and their addresses into Studio manually and that's OK for small numbers of variables, but when you use structures to store different types calculating the offsets to the fields is tedious and error prone. As I recall if the addresses of the variables changed after program edits Studio would warn you and corrects them to their new addresses
I wish ST would resurrect STM Studio. It is an excellent tool. Anyone with even a modicum of embedded experience can set it up and get results in ten minutes. To use the Monitor you have to spend a couple of hours reading manuals and watching tutorials only to find out at the end that the charting/plotting is useless. That's what I did. Silly me.
I am sure that the Monitor would be OK for testing logic as it can simulate a UI but for real-time processing of real-time variables it is useless.
The charting function in the IDE is sometimes useful, but it is clunky and inflexible.
Bring back STM Studio I say.
Regards
Rob
2025-01-16 03:46 PM
I am using version 17.0 but I cannot imagine that there can be that much difference from version 15.0. Assuming that, this is what I did to resolve this:
1) In the Project Explorer, right click on the project node and select Properties at the bottom of the the context menu to invoke the Settings dialog box.
2) Select C/C++ Build / Settings in the tree view on the left.
3) Under MCU/MPU GCC Assembler add ' -gdwarf-4' (without quotes) to the end of anything you have in the Command text box on the right.
4) Repeat for MCU/MPU GCC Compiler
5) Repeat for MCU/MPU GCC Linker
6) Close the Settings dialog box.
7) After that I had no trouble importing the ELF file into STM Studio.
7) You can safely ignore the "GDB command...failed" message box should you get it.