Is there a place within CubeMX to define the configuration fuses (Option Bytes)?
What about in project settings in the IDE (I'm using TrueStudio)
(things like SRAM2_PE, nBoot0, etc....)
Take a look in the Reference Manual of your controller in the section "Embedded Flash Memory".
There are also HAL functions described in the User Manual "Description of HAL drivers".
I understand where they are in the MCU. And I understand they can be set programmatically. But that's not what I am asking.
While sometimes you might want to change them on the fly, in the majority of cases you simply want to set them in the project to an initial state so they get programmed in at the same time the code is being burned into the Flash. With most microcontroller development systems (at least from other manufacturers) there is a place within the IDE where you define the initial state of configuration options/fuses for the project. Usually via some type of project settings page.
Since STM also has the CubeMX system for creating projects, I would expect some way to define them within CubeMX as well as some way to define them within an IDE.
These aren't registers that you simply set every time the chip boots up. These are configuration fuses that get set to at least an initial state when the code gets loaded into the chip.
The method in Keil is to direct content to a specific section/load-region, and then select a flash algorithm that manages the option bytes. Figure structure, attribute, scatter file/linker script, and programmer that deals with the .HEX
The more practical method of dealing with options and settings is to have the code determine if it is on an freshly programmed device and push default settings.
Your picture of the Keil options is what I would expect from a professional level IDE. With options for full/partial erase, and settings for the sections of memory to program. Though I would also expect a settings page somewhere with the specific options for the specific processor.
Unfortunately I have not found either of these types of things in the two free IDEs I have tried so far: System Workbench and TrueStudio (I don't do a lot of ARM development, so can't justify spending a lot of money for a development system).
I set mine through the free ST-LINK Utility which I also use to download the code...
That makes sense to have that in the ST-Link utility. To me though it seems like you should also be able to define those within CubeMX and within the project settings of the IDE. After all, the "I" in IDE is for "Integrated". All the same functions that the ST-Link utility has should also be available within every IDE. I can see using the ST-Link utility as a production programming environment, instead of the IDE. But you shouldn't have to run an external utility to set those things during development. You should be able to do everything from within the IDE.
The point is that all these software come from different vendors.
If ST would have an IDE, I'm sure that this functionality would be integrated.
Well, actually ST does now have an IDE. They bought Atollic and now own TrueStudio. And are giving away the full pro version for free to anybody that wants to work on STM parts. (they removed support for other brands of parts) Their website now says ST/Atollic.
So there's no excuse for this functionality to not be integrated into TrueStudio. Since this just happened a few months ago, hopefully they are planning to add that functionality to it in the near future.
Retrieving data ...