Is there any way to read the current configuration of a STM32 controller currently running or being debugged and store it in an ioc file?
The purpose is to migrate a running non-CubeMX project to CubeMX so that more functions can be added using CubeMX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-17 12:44 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 3:23 PM
Thank you so much for informing me.
That was what I finally ended up doing, going through an existing project's init procedures by debugger, noting down all settings, and then reproducing them in CubeMX, so that now I can add functionality there.
Thought there might be a more simple way such as compile the existing project, start it in debug mode, stop after init, and have a tool read the config registers and store the information as an ioc file, which unmodified would create code to reach the same init state, or after being modified in CubeMX would add more functionality to the project, while all can be maintained in CubeMX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 8:59 AM
Hi @SFuch.1​ ,
Let me be sure that I understand the question, you want to convert a STM32 project to an ioc supported by CubeMX ,am I right?
Houda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 10:11 AM
No, that's called reverse engineering.
They'd have a hard time magicing an IOC from source code or a project file from a competing tool chain..
If you have a working project, you'll want to pull the pin level utilization into CubeMX manually, and hope when you press the button the framework/boilerplate is close enough that you can merge in your hand-crafted working code.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 10:14 AM
Pulling pin utilization and functionality out at a minimum would seem to be the ask.
Most tools don't keep this detail unless auto-generated. Human generated one might hope for comments/tables, and a singular or contained abstraction where all the pins and subsequently peripherals are instantiated.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 3:21 PM
Yes, converting a STM32 project to ioc supported by CubeMX is what I wanted to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 3:23 PM
Thank you so much for informing me.
That was what I finally ended up doing, going through an existing project's init procedures by debugger, noting down all settings, and then reproducing them in CubeMX, so that now I can add functionality there.
Thought there might be a more simple way such as compile the existing project, start it in debug mode, stop after init, and have a tool read the config registers and store the information as an ioc file, which unmodified would create code to reach the same init state, or after being modified in CubeMX would add more functionality to the project, while all can be maintained in CubeMX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-29 4:56 AM
If you've got a running venture, you may need to drag the pin level utilization into CubeMX manually, and wish whilst you press the button the framework/boilerplate is near enough that you could merge in your home made running code.
