The Flash_partitioning example project that comes with the S32DS (using the SDK) makes those operations as a part of the example code, you can check it and please tell us if you have any question about it.
Have a great day, TIC
------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you -------------------------------------------------------------------------------