1. Can an ELF file be executed from dataflash too?

No.  ELF cannot run XIP (eXecute In Place) in NOR FLASH.  That is because the ELF module is only partially linked and requires run-time relocations to the ELF image to access the data area arbitrarily located in RAM.

An option is to use a fully linked file... basically a binary nuttx.bin image ... that already has all of the RAM addresses resolved.

Another option is to use NxFLAT which does not require any relocations in FLASH and which runs PIC/PID (Position Independent Code/Data).  NxFLAT has other limitations, however.

2. Is this execution totally independent from the MCU flash?
If I understand the question correctly... ELF is copied into RAM when it executes and no longer needs to use FLASH memory for any execution.

Reply via email to