If I flash SPE (Cortex-R5). How to write code with my jetson tx2?

I read compile-flash.md this line

3. Use the command below to just flash <b>this firmware for Cortex-R5 partition:</b>

       sudo ./flash.sh -k spe-fw jetson-<tx2 or xavier> mmcblk0p1

Is there any tutorial or document how to write code with jetson tx2 cortex-r5 ? If I want to control a sensor or gpio how do I it?

Hi hamzaygrtc, please refer to the following downloads regarding R5 SPE programming: