You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
Just as an FYI for you or Google, I used this (DapperMime) code to build a crappy profiler for the RP2040 or Pico, posting it here in case it's useful for anyone else, feel free to include in your repo if you'd like, otherwise feel free to close.
#!/bin/bash# This should be run from your pico-sdk based application's build directory, already built, flashed onto a device, and running# also, openOCD should be running in SWD mode, with pico-debug-core0.cfg or pico-debug-core1.cfg as the configuration (or similar SWD config).# You should have a ~/.gdbinit containing only 'file relative_path_to.elf' so GDB is reading the correct symbols for the running code.# The code should run for the entire sample period. If you have multiple *.dis files, it may not detect the correct assembly.
MAX_SAMPLES=100000
TIMESTAMP=$(date +"%Y_%m_%d_%H_%M_%S")echo"This will take some time"
(for i in {1..100000};doecho"mrw 0xE000101C"; done) | nc -w1 127.0.0.1 4444 | grep -av mrw | grep -av '>'| grep -av pen | sort | uniq -c | sort -n | tr -d "\0"| awk -- '{gsub(/[ \t\r\n]+$/, "", $2); cmd=sprintf("gdb-multiarch -q --eval-command='\''info symbol 0x%x'\'' --eval-command quit", $2); printf("echo -n '\''%d\t%x\t'\''; %s \n", $1, $2, cmd);}'| /bin/bash | awk '{cmd=sprintf("grep %s *.dis", $2); gsub(/[\n\r]+$/, "", $0); printf("%s\t\t", $0); system(cmd);}'> crappy_profiler.output.$TIMESTAMP.txt
The 0xE000101C is the DWT_PCSR register that allows you to monitor the PC register address via the debug interface.
Cool! Since this is not an Issue with the Dapper Mime code, I'm going to close this, but I've now enabled the github "Discussions" feature (which is supposed to be a forum for such information) and will link back to this. Thanks.
Just as an FYI for you or Google, I used this (DapperMime) code to build a crappy profiler for the RP2040 or Pico, posting it here in case it's useful for anyone else, feel free to include in your repo if you'd like, otherwise feel free to close.
The 0xE000101C is the DWT_PCSR register that allows you to monitor the PC register address via the debug interface.
Output looks like this:
With from left to right, # of calls in sample set, address of instruction, GDB symbol info, and disassembly.
The text was updated successfully, but these errors were encountered: