I am using ARM FVP simulator and trying to read data from a binary file in the host PC to a program running in ARM,
const char *filename = "home/dinusha/executorch/examples/arm/executor_runner/cmake-out/input.bin";
FILE* fp = fopen(filename, "rb"); if (!fp) { ET_LOG( Fatal, "Could not open file %s (errno: %d) for reading, exiting!", filename, errno); _exit(1); }
FILE* fp = fopen(filename, "rb");
if (!fp) {
ET_LOG(
Fatal,
"Could not open file %s (errno: %d) for reading, exiting!",
filename,
errno);
_exit(1);
}
Error : Could not open file home//dinusha//executorch//examples//arm//executor_runner//cmake-out//input.bin (errno: 0) for reading, exiting!
Any idea how to solve this,
Thanks
Hi againI've tested the same source code, compiled with arm-none-eabi-gcc 13.3.1 for Cortex-M55, and it runs successfully on a Cortex-M55 FVP as supplied in Arm DS.I then tried running the same image on FVP_Corstone_SSE-300_Ethos-U55, but so far without success, probably because my simple image doesn't match the memory map or software environment of the SSE-300.fopen requires the use of "semihosting", to allow the Cortex-M55 (target) code to open a file on your Ubuntu (host) filing system.I noticed that FVP_Corstone_SSE-300_Ethos-U55 has semihosting _disabled_ by default.You can see this yourself with./FVP_Corstone_SSE-300_Ethos-U55 --list-params | grep "semihosting"To enable semihosting, you must add "-C cpu0.semihosting-enable=1". Please could you try that?If that doesn't work, I may have to pass this enquiry to the SoC Design and Simulation forum, where there are people more familiar with the SSE-300 model.Stephen
Hi Stephan,
Thanks for checking on this, I tried with "-C cpu0.semihosting-enable=1" and still had no success
Hi againI'm moving this enquiry to the SoC Design and Simulation forum in case anyone there can help with your failing fopen() on FVP_Corstone_SSE-300_Ethos-U55 issue.In the meantime, have you linked with --specs=rdimon.specs, to select the gcc semihosting libraries, and checked the access permissions to input.bin?Stephen