>>Can you please give some hints ?
You're building a "safety" system, that seems like a dangerous path if you don't have a handle on the end-to-end issues, yourself, or tightly within your team. Perhaps SAFERTOS provides support, consulting and porting services?
>>I see that both chips are quite the same.
They are entirely different. They both use a CM7, and diverge from there. The busing, memory, peripherals and debug are different. On balance I think the architectures are significantly more different than the same.
You'd want to use the right vector table, interrupt code and clock/bus startup code.
The library file might work, provided it has no external dependencies, and does nothing internally that is not generic to all CM7 parts. Expectations on memory regions and MPU setting would concern me. You'd want to review what exactly is in the library.
If it links to HAL API functions, be concerned about parameters and bit fields that might not be consistent between F7 and H7 implementations. Turn on asserts to catch issues while you validate the port.