If you attempt to exec a binary larger than PRUSS_MAX_IRAM_SIZE (8192 bytes) using prussdrv_exec_program(), bad things happen.
Sometimes the exec appears to succeed, the loader program continues running, and (some part of) the binary runs on the PRU. Sometimes the loader program crashes.
I think the solution is to check the file size in prussdrv_exec_program_at() and return -1 if it's too large. I can submit a pull request with that change, but I'm not sure how to compile and test the new version, so note that it is untested.
If you attempt to exec a binary larger than
PRUSS_MAX_IRAM_SIZE
(8192 bytes) usingprussdrv_exec_program()
, bad things happen.Sometimes the exec appears to succeed, the loader program continues running, and (some part of) the binary runs on the PRU. Sometimes the loader program crashes.
I think the solution is to check the file size in
prussdrv_exec_program_at()
and return -1 if it's too large. I can submit a pull request with that change, but I'm not sure how to compile and test the new version, so note that it is untested.