pxt-hiddmesg

Microsoft's MakeCode platform for easy blocks-style programming

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

pxt-hiddmesg

Post by _david_f »

Does anyone know how to get the "pxt-hiddmesg" tool running?

https://makecode.com/cli/hiddmesg

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: pxt-hiddmesg

Post by mikeysklar »

You can turn it on through enabling profiling as described here:

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.

User avatar
_david_f
 
Posts: 11
Joined: Sun Aug 14, 2022 12:05 pm

Re: pxt-hiddmesg

Post by _david_f »

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.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: pxt-hiddmesg

Post by mikeysklar »

Are you using a STM32F4 based board?

Are you already building code from the command line where you could use:

Code: Select all

PXT_COMPILE_SWITCHES=profile

Locked
Please be positive and constructive with your questions and comments.

Return to “MakeCode”