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

ashley.bradow
Posts: 3
Joined: Mon Jul 29, 2019 4:34 am

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

Postby ashley.bradow » Sun Sep 08, 2019 10:51 pm

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.

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Mon Sep 09, 2019 3:41 am

You could try adding the Arduino environment as a component to your esp-idf project:
https://github.com/espressif/arduino-es ... mponent.md

ashley.bradow
Posts: 3
Joined: Mon Jul 29, 2019 4:34 am

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

Postby ashley.bradow » Mon Sep 09, 2019 6:13 am

Okay looking into that now.
Thanks.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Mon Sep 09, 2019 4:55 pm

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.

ashley.bradow
Posts: 3
Joined: Mon Jul 29, 2019 4:34 am

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

Postby ashley.bradow » Wed Sep 11, 2019 5:22 am

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.

Who is online

Users browsing this forum: No registered users and 53 guests