I imported the official RTD2.0.0, using S32DS 3.4.3. Without any modification, sector 4 and sector 5 were changed to the corresponding macro definition of code flash, but the write failed.
I'm having similar issues trying to write code flash consitently using FLS. I get intermittent results and sometimes it works and sometimes not. What was the solution for your problem?
Which target are you working on? And how did you call to write data into your modified Fls sector in your source code?
Did you do any debug? can you show me how can you know that the Fls code failed?