fopen fails with absolute path in linux host (ubuntu 20.04)

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);
}

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

Parents
  • Hi Stephen,

    Thanks for the reply, unfortunately adding a forward slash before home did not work,

    I am using Corstone-300 Ecosystem FVP  and my toolchain is arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi,   ,  I used the following link to download it

    https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.22_20_Linux64.tgz?rev=018659bd574f4e7b95fa647e7836ccf4&hash=22A79103C6FA5FFA7AFF3BE0447F3FF9

    following is the command I used to run the FVP

    /home/dinusha/executorch/examples/arm/ethos-u-scratch/FVP-corstone300/models/Linux64_GCC-9.3/FVP_Corstone_SSE-300_Ethos-U55  \
    -C ethosu.num_macs=${num_macs} \
    -C mps3_board.visualisation.disable-visualisation=1 \
    -C mps3_board.telnetterminal0.start_telnet=0 \
    -C mps3_board.uart0.out_file='-' \
    -C mps3_board.uart0.shutdown_on_eot=1 \
    -a ./executor_runner/cmake-out/arm_executor_runner \
    --timelimit 220 || true # seconds

Reply
  • Hi Stephen,

    Thanks for the reply, unfortunately adding a forward slash before home did not work,

    I am using Corstone-300 Ecosystem FVP  and my toolchain is arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi,   ,  I used the following link to download it

    https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.22_20_Linux64.tgz?rev=018659bd574f4e7b95fa647e7836ccf4&hash=22A79103C6FA5FFA7AFF3BE0447F3FF9

    following is the command I used to run the FVP

    /home/dinusha/executorch/examples/arm/ethos-u-scratch/FVP-corstone300/models/Linux64_GCC-9.3/FVP_Corstone_SSE-300_Ethos-U55  \
    -C ethosu.num_macs=${num_macs} \
    -C mps3_board.visualisation.disable-visualisation=1 \
    -C mps3_board.telnetterminal0.start_telnet=0 \
    -C mps3_board.uart0.out_file='-' \
    -C mps3_board.uart0.shutdown_on_eot=1 \
    -a ./executor_runner/cmake-out/arm_executor_runner \
    --timelimit 220 || true # seconds

Children