Does anyone know how to get the "pxt-hiddmesg" tool running?
https://makecode.com/cli/hiddmesg
pxt-hiddmesg
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14165
- Joined: Mon Aug 01, 2016 8:10 pm
Re: pxt-hiddmesg
You can turn it on through enabling profiling as described here:
https://github.com/microsoft/pxt/blob/m ... n-hardware
https://github.com/microsoft/pxt/blob/m ... n-hardware
Profiling on hardware
It's currently only supported on STM32F4. You enable it with ?compiler=profile, as above.
There will be no automatic dumping of profile counters, but you can use control.dmesgProfileCounters() which will dump them to DMESG buffer (you can fit maybe 1 or 2 dumps in the buffer). Then run pxt hiddmesg, while your device is connected over USB, which will show the profile on the console. If you have a hardware debugger, you can also run pxt dmesg. The format is simpler than in JavaScript - it shows the number of calls, total time in microseconds, and the counter name.
- _david_f
- Posts: 11
- Joined: Sun Aug 14, 2022 12:05 pm
Re: pxt-hiddmesg
When I enter "?compiler=profile" before "#editor", as mentioned in the link you posted, I cannot download the "uf2" file anymore, instead I get this message:
"The hex file is not available, please connect to internet and try again."
Of course I am connected to the internet.
"The hex file is not available, please connect to internet and try again."
Of course I am connected to the internet.
- mikeysklar
- Posts: 14165
- Joined: Mon Aug 01, 2016 8:10 pm
Re: pxt-hiddmesg
Code: Select all
Are you already building code from the command line where you could use:
Code: Select all
PXT_COMPILE_SWITCHES=profile
Please be positive and constructive with your questions and comments.