1) A way to Count Leading Zeros of a 32bits unsigned integer
Does such feature exist on ESP32 CPU ?
Thanks for the hint and the fact it support asm instruction for that I will test it later to check it generate the right asm code...Yes, using NSAU instruction. Compiler will generate it if you use GCC __builtin_clz() intrinsic.
2) In a near future write an IDA Pro Processor Module for ESP32 (as only ESP8266 is supported ...)
Could you share your plugin ?I have extended the 8266 ida-python plugin with some of the ESP32 instructions (not added FP yet) and am using it personally in day-to-day debugging using ScratchABit disassembler. I can share what i have if you want to work on this.
My email is bvernoux at hydrabus.com
4) A way to retrieve number of cycles executed (with accuracy of CPU clock so 240MHz) on 64bits if possible (but I can survive with 32bits), CPU cycle counter (like on ARM CM3... => DWTBase->CYCCNT) is perfect for that (even if timer can be also used ...)
Thanks for the hint I will check that32-bit CPU cycle counter can be queried by reading CCOUNT special register, or equivalently, using xthal_get_ccount function defined in Xtensa HAL.