cancel
Showing results for 
Search instead for 
Did you mean: 

Is it feasible to have single hex for both STM32F769 and STM32H743?

Anand A
Associate III

Hello,

           We are migrating from STM32F769 to ST32H743 controller and we have a unique requirement to have single hex file for both controllers to address backward compatibility in the future. The plan is to detect the controller in the runtime and to initialize the necessary peripherals according to the detection. Based on the controller detection all controller access will be directed to either STM32F769 or STM32H743.

We are just studying the feasibility.

  1. Is it possible to have single hex for both STM32F769 and STM32H743?
  2. If possible, Any suggestion on how to detect controller from the cstartup?
  3. Any valuable advice on things we need to take care while doing this.

Regards

AnanD

5 REPLIES 5
Javier1
Principal

Wow this looks complicated.

If i was the unlucky engineer in charge of doing this:

  • First i would need a small piece of code (bootloader) that could run in both microcontrollers indistinguisable, they use the same core...,(try?)
    • this bootloader would have to choose between two different programs stored in Flash to jump to.( A compiled for f7 and B compiled for h7)
    • i dont exactly know how to detect the family of microcontroller, maybe adding an external resistor with each PCB and reading with a gpio, maybe with some byte in the 96bytes chip uuid¿
      • Bits 0 - 23 : Lot number
      • Bits 24 -31 : Silicon wafer number
      • Bits 32 -63 : Another lot number
      • Bits 64 -95 : Unique ID bits
  • Second you would need both programs stored in fash to use a dynamic alocated vector table or locate the vector table in flash (this is the easy part)
we dont need to firmware by ourselves, lets talk
Wolfgang Pupp
Associate III

Id suggest using the SCB->CPUID register for CPU detection. See "programming manual" for details.

Architecture wise, I would stick as close as possible to:

  • Tiny bootloader (CPU agnostic)
  • Implementation for H7
  • Implementation for F7

If you lack memory, and have to share data between H7 and F7 your whole compilation setup is gonna get very "custom" and complicated.

Otherwise, the H7 and F7 implementation can simply be separate CubeIDE projects with slightly customized linker scripts (and you just merge the hexfiles together).

This is all doable but adds complexity to your project (=> more time required to customize build process, to debug all this, to onboard developers and also more difficult to comprehensively test your firmware releases).

I would avoid it if I could.

Hello Javier,

Thanks for your feedback, I will discuss your vies with our team.

Thanks for your valuable input. This would help us to make a decision.

TDK
Guru

The CMSIS header files for the STM32F7 and STM32H7 are significantly different. I don't see how this would a productive thing to do from a development standpoint. Some things are in the same memory location on both chips, but many are not.

But is it possible? Yes.

If you feel a post has answered your question, please click "Accept as Solution".