Page 1 of 1

How to modify pre-built (esp32 IDF)source files.

Posted: Sun Sep 08, 2019 10:51 pm
by ashley.bradow
Hello,
I'm trying to modify the 'clk-160 prescaler' inside the 'mcpwm.c' source file (ESP32 IDF). I need more speed and resolution for the project I'm building. It's has been pre-scaled down to (~1Mhz) so the high frequency carrier can operate over top of the output. I'm not using the 'carrier' and need the 'mcpwm' running at full speed (160Mhz). I am able to do it in Visual Studio with Visual GDB as it complies all source code but the Arduino environment has all pre-complied binaries libs. I've tried manual 'Registar' manipulation which works, but it has to many consequences. I have to many Arduino libraries included inside my project for me to port it all inside visual studio.

Can someone point me in the right direction please.

Re: How to modify pre-built (esp32 IDF)source files.

Posted: Mon Sep 09, 2019 3:41 am
by ESP_Sprite
You could try adding the Arduino environment as a component to your esp-idf project:
https://github.com/espressif/arduino-es ... mponent.md

Re: How to modify pre-built (esp32 IDF)source files.

Posted: Mon Sep 09, 2019 6:13 am
by ashley.bradow
Okay looking into that now.
Thanks.

Re: How to modify pre-built (esp32 IDF)source files.

Posted: Mon Sep 09, 2019 4:55 pm
by lbernstone
You can also use https://github.com/espressif/esp32-arduino-lib-builder. You must be careful to match up the correct version of esp-idf for your arduino build as mentioned at the end of the link ESP_Sprite posted above.

Re: How to modify pre-built (esp32 IDF)source files.

Posted: Wed Sep 11, 2019 5:22 am
by ashley.bradow
Thanks, I've managed to get a the blink program up and running using the Arduino code format in ESP IDF. Just need to find out how to add extra libs to the code now.
Visual GDB 5.4 r6 or later makes adding the Arduino platform to the ESP32 IDF quite easy. I needed to upgrade.
Thanks again.