Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions backends/arm/scripts/run_fvp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if [[ ${target} == *"ethos-u55"* ]]; then
-C mps3_board.uart0.shutdown_on_eot=1 \
-a "${elf_file}" \
${data_file} \
--timelimit ${timeout} 2>&1 | tee ${log_file} || true # seconds
--timelimit ${timeout} 2>&1 | sed 's/\r$//' | tee ${log_file} || true # seconds
echo "[${BASH_SOURCE[0]}] Simulation complete, $?"
elif [[ ${target} == *"ethos-u85"* ]]; then
${nobuf} ${fvp_model} \
Expand All @@ -104,13 +104,28 @@ elif [[ ${target} == *"ethos-u85"* ]]; then
-C mps4_board.uart0.shutdown_on_eot=1 \
-a "${elf_file}" \
${data_file} \
--timelimit ${timeout} 2>&1 | tee ${log_file} || true # seconds
--timelimit ${timeout} 2>&1 | sed 's/\r$//' | tee ${log_file} || true # seconds
echo "[${BASH_SOURCE[0]}] Simulation complete, $?"
else
echo "Running ${elf_file} for ${target} is not supported"
exit 1
fi

echo "Checking for a etdump in log"
! grep "#\[RUN THIS\]" ${log_file} >/dev/null
if [ $? != 0 ]; then
echo "Found ETDump in log!"
echo "#!/bin/sh" > etdump_script.sh
sed -n '/^#\[RUN THIS\]$/,/^#\[END\]$/p' ${log_file} >> etdump_script.sh
# You can run etdump_script.sh if you do
# $ chmod a+x etdump_script.sh
# $ ./etdump_script.sh
# But lets not trust the script as a bad patch would run bad code on your machine
grep ">etdump.bin" etdump_script.sh | cut -d\" -f2- | cut -d\" -f1 >etdump.base64
base64 -d etdump.base64 >etdump.bin
python3 -m devtools.inspector.inspector_cli --etdump_path etdump.bin --source_time_scale cycles --target_time_scale cycles
fi

echo "Checking for problems in log:"
! grep -E "^(F|E|\\[critical\\]|Hard fault.|Info: Simulation is stopping. Reason: CPU time has been exceeded.).*$" ${log_file}
if [ $? != 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion examples/arm/executor_runner/arm_executor_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ void write_etdump(RunnerContext& ctx) {
encoded_buf[encoded_len] = 0x00; // Ensure null termination
ET_LOG(Info, "Writing etdump.bin [base64]");
printf(
"#---\necho \"%s\" | base64 -d >etdump.bin\npython3 -m devtools.inspector.inspector_cli --etdump_path etdump.bin --source_time_scale cycles --target_time_scale cycles\n#---\n",
"#[RUN THIS]\necho \"%s\" | base64 -d >etdump.bin\npython3 -m devtools.inspector.inspector_cli --etdump_path etdump.bin --source_time_scale cycles --target_time_scale cycles\n#[END]\n",
encoded_buf);
} else {
ET_LOG(
Expand Down
Loading