ESP32: using ESP-IDF with Zerynth


#1

Hello,

My device is ESP32 and I read the Zerynth documentation, that it did not support BLE, for example. In addition - it almost did not support the hardware Timers (the chip has 4 timers 64bit).

In this way I can’t even measure frequency with my controller. Additionally, if it is possible - the BLE can be used in C, hardly, but possible.

My question is:
Is it possible to use the native ESP-IDF code as C file in Zerynth? Is it possible to import all .h of ESP-IDF from Zerynth studio?
What hardware peripherals the Zerynth use? May be some timer or other, or all resources are free for the user code?

P.S. In the system present Ultra Low Power CPU, which I also want to use, but there are no Zerynth API for this, using of native ESP-IDF with combination of Python will be great!

Best regards,
Milen Mladenov


#2

I try to add come native C code in Python project with Zerynth Studio.
It recognize the ESP-IDF commands, because the auto-complete works.
But when I try to add headers, such as:
#include “esp_system.h”
It compiles with ERROR - in native C.

Is it possible to use directly ESP-IDF in Zerynth project?


#3

Hi @milen_w,

the problem with using ESP-IDF code is that not all ESP-IDF symbols are included in the compiled VM because that would make the VM too heavy.
Opening the downloaded vm file under “Zerynth Installation folder”/vms with a text editor, you can take a look at the list of available symbols.

For what concerns BLE and Ultra Low Power, these are features that will probably be added very soon, so stay tuned for updates or let me know if you have an urgent need.


#4

Thank you very much for the reply.

I will wait for BLE and ULP, but, please for any suggestions about the simplest task - frequency measure.

Until now I use small Microchip controller and the frequency measuring is very simple task:

  1. Configure one Timer to interrupt every 1ms.
    2. Configure second Timer to count external signal from pin.
  2. In the interrupt procedure I read the second timer value, which is the frequency in kHz, and write zero in this timer.

That is. No CPU load and almost no code.

As I have no option to configure hardware timers of ESP32 (the second timer - hardware counter), this simple task become impossible.
Or, is it some way?

Regards.