2021-11-11 12:08 PM
I will be able to detect if its an F series or G using DEV_ID register
2021-11-11 12:27 PM
Have two HEX files, read the DEV_ID to determine the chip, and load the correct one based on the result.
Any loader can load a HEX file, such as STM32CubeProgrammer.
2021-11-11 12:29 PM
What are the cons of having a single hex file ?
2021-11-11 12:33 PM
2021-11-11 12:45 PM
I am using #define to differentiate between the chips.
2021-11-11 12:53 PM
How exactly are you sending this "singular" .HEX file to the Target(s)?
Do you own the software delivering the file? ie Host side application
How is the Target storing/staging this?
How are you constructing the .HEX file? ie merging two divergent builds?
Why a .HEX file and not a binary image, or an object containing/identifying the two sections/builds?
If the Target STM32 has a loader that's injesting the .HEX it could perhaps differentiate based of the faux-address range each lives in, and then write the appropriate one into the application space whilst ignoring data from the other range.
2021-11-11 01:19 PM
I think you need to reevaluate the feasibility of what you're trying to achieve. How are you planning to make this singular HEX file with code from both chips?
2021-11-12 05:48 AM
When Sara ask how to use command line utility to achieve this then run an request parse output and then run next command ,
but when i rememmber stlink utility can validate ID then simply in one cmd script place flash G after this flash F and check results...