I have a single hex file for F & G series microcontroller. What is the best way to detect the MCU and load the appropriate hex file section from the single hex file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 12:08 PM
I will be able to detect if its an F series or G using DEV_ID register
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 12:29 PM
What are the cons of having a single hex file ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 12:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 12:45 PM
I am using #define to differentiate between the chips.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
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-11-11 1: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 5: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...
