Hello,
If you want to integrate the NXP MCAL driver into a ST microcontroller, then you need to use with your own risks. Although the hardware might be equivalent between these two microcontrollers, it remains the fact that the NXP MCAL is only verified with NXP microcontrollers, and we can't guarantee that there wouldn't be any issue when integrating a NXP MCAL software into a ST microcontroller, or whichever another company's microcontroller.
Best Regards,
Nam