Flashing compiled .bin from SD card to Due?

Hello CSharpLover

You can execute some code from SRAM using this: attribute (( section (".ramfunc"))) before.

To upload a new firmware in Flash from SRAM, you can set the General Purpose Non Volatile Memory (GPNVM) bit 2 and upload the new firmware in Flash Bank 1 . After an erase, the GPNVM bit 1 is set and GPNVM bit 2 is cleared and your firmware runs from Flash Bank 0.

Afeter setting GPNVM bit 2 and uploading your new firmware in Flash Bank 1, reset and your code will run from fromFlash Bank 1.