ESP-IDF vs Arduino Framework: Best Framework for ESP32-S3 Development.

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ค. 2024
  • When we start developing with ESP32, we have two options. They are Arduino Framework and ESP-IDF Framework. How different the performance will be depending on the framework? Will there be a huge performance difference?
    *Timestamps
    0:00 - Intro: ESP-IDF vs Arduino Framework
    2:34 - ESP32-S3-DevKitC-1-N8R8
    2:52 - Test 1: Floating Point and Integer Arithmetic Benchmark
    4:43 - Test 2: Drawing Graphics Benchmark
    5:29 - Outro: Do it the way you feel most comfortable!
    [ESP32-S3-DevKitC-1-N8R8 Development Board]
    amzn.to/3FZmfAM
    [Floating Point and Integer Arithmetic Benchmark]
    www.codeproject.com/Tips/1247...
    [RPI Zero 2 W vs Arduino H7, Which one is the best for your project?]
    • RPI Zero 2 W vs Arduin...
    [Who Cares About MCU with Camera?]
    • Who Cares About MCU wi...
    [Who Needs High-Performance MCU? (Arduino Portenta H7 vs Espressif ESP32-S3)]
    • Who Needs High-Perform...
    #ESP32S3 #ESPIDF #Arduino #Framework #Performance #Benchmark #ThatProject
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 79

  • @ThatProject
    @ThatProject  ปีที่แล้ว +8

    For more projects - youtube.com/@ThatProject
    That Project Github Repository - github.com/0015/ThatProject
    Join FB Group - facebook.com/groups/138965931539175

  • @Stabby666
    @Stabby666 ปีที่แล้ว +27

    Arduino for sure. Anyone who has had the hellish experience of trying to get the ESP-IDF framework to work, will understand the joy of just being able to pick a board from a list and hit a compile button to build. It's a complete mess and the Espressif devs constantly break things and lie about it on the bug tracker.

    • @originalmianos
      @originalmianos 6 หลายเดือนก่อน +3

      I can concur with the issue with IDF devs. Just read the bug tracker. It makes a horrible impression for such a great family of chips. "Works for me" is often followed up by some rando dev finding the bug later in the ticket.

  • @misteragony
    @misteragony ปีที่แล้ว +52

    Great comparisson. I was expecting Arduino to be slower as well. Guess Arduino gets optimized quite a bit.

    • @RiccardoMazzia
      @RiccardoMazzia ปีที่แล้ว +2

      Arduino framework has been optimized to work on slower clock and lower memory boards...

  • @michaelalex5235
    @michaelalex5235 2 หลายเดือนก่อน +3

    Very surprising, but the numbers don't lie. Thank you.

  • @EdwinMartin
    @EdwinMartin ปีที่แล้ว +12

    Can you show what compiler (optimization) settings you used? I suspect non optimized compiler settings are the culprit.

    • @ThatProject
      @ThatProject  ปีที่แล้ว +1

      That's a good point. Could you show me your compiler settings for the best optimization?

    • @gokulc8621
      @gokulc8621 ปีที่แล้ว +3

      @@ThatProject you can select different optimization in menuconfig, like for smaller size, better performance etc

  • @ugetridofit
    @ugetridofit ปีที่แล้ว +15

    I don't know why the results were slower with IDF. I have always gotten faster performance with IDF. I think the reason why is you did not make any changes to the default settings in menuconfig.
    In menuconfig there are many, many settings to boost performance. On that would greatly help for SPI is the setting to put all SPI functions in IRAM.

    • @conorstewart2214
      @conorstewart2214 ปีที่แล้ว +4

      Yeah the arduino framework probably has all of the performance boosting settings switched on and if he just used the default sdk config in esp idf then they probably aren’t switched on.

    • @conorstewart2214
      @conorstewart2214 ปีที่แล้ว +2

      On top of that I know that esp idf defaults to 40 MHz for flash and DIO, not QIO, it also defaults to 160 MHz core clock, if those weren’t changed it would probably explain the difference in performance.

  • @SMHOSY
    @SMHOSY ปีที่แล้ว +5

    Super sujet merci pour les test 👍

    • @mathieucaron4957
      @mathieucaron4957 ปีที่แล้ว +1

      Je crois par contre qu'on peut faire mieux en adaptant la configuration à nos besoins, différents tests devraient idéalement être faits 👌

  • @user-vk8jn5br1f
    @user-vk8jn5br1f ปีที่แล้ว +3

    Thank you so much for this video

  • @AndrzejRoszkowski
    @AndrzejRoszkowski ปีที่แล้ว +3

    different default FreeRTOS settings ?

  • @dcpowered
    @dcpowered 10 หลายเดือนก่อน +1

    Please make more videos about the ESP32 S3!!

  • @deanstarman1694
    @deanstarman1694 ปีที่แล้ว +4

    Thanks!!

  • @haddow777
    @haddow777 ปีที่แล้ว +15

    I’m not sure the claim to use ESP-IDF was for performance. At least not in the way you were testing it. Usually simplified coding environments make the user’s code less performant by removing complexity through which greater control can normally be exerted to squeeze out better performance. The libraries of a simplified programming environment can still be highly performant though as they typically are programmed by people comfortable with lower level code. So, testing simple and complex programming environments by testing their libraries isn’t very useful.
    The typical reasons I’ve always heard why to use IDF over Arduino is for greater control. Yes, Arduino has more libraries, but libraries can be poorly written and have security flaws. For small projects, this likely won’t be an issue. For larger or more security conscious projects though, it will likely be a sticking point.

  • @garymetheringham4990
    @garymetheringham4990 ปีที่แล้ว

    Wow i thought arduino would be slower,
    Any chance of doing the same with the raspberry Pico?

  • @raymondtwm
    @raymondtwm ปีที่แล้ว +4

    Thanks

  • @goldfingerdash
    @goldfingerdash ปีที่แล้ว +6

    The major issue that I found was compile time when using Arduino IDE 2.0 Release Candidates. Compile time was extremely slow with large projects, such as using LovyanGFX along with LVGL. Compile time changed from 5+ minutes to 30 seconds for me when I moved to ESP-IDF through VS Code.

    • @i_am_arun07
      @i_am_arun07 ปีที่แล้ว +3

      I just started using ESP32 using Arduino and facing the same issue even for small projects, but later I switched to PlatformIO using Arduino framework and it is Impressingly faster.

    • @Dustmadeout
      @Dustmadeout ปีที่แล้ว +2

      I used both Arduino and ESP-IDF with a camera library and both compile and upload with the same speed.

    • @i_am_arun07
      @i_am_arun07 ปีที่แล้ว

      @@Dustmadeout how much time it takes on your pc?

    • @Stabby666
      @Stabby666 ปีที่แล้ว +1

      5 minute compiles?! Are you running Windows on a potato or something? I have some very large ESP32 projects ("Huge App" partitions required) and the worst takes a minute from cold, and maybe 10 seconds for subsequent compiles.

    • @goldfingerdash
      @goldfingerdash ปีที่แล้ว

      @@Stabby666 Nope, using a AMD 5950x CPU. At that point my project compiled to less than 1 MB. Also the output window when using verbose output when compile could not keep up. The output continued for minutes after the actual compiling was finished. Again, I was using it before the official 2.0 release. Hopefully Arduino fixed whatever bug this was by now.
      Like I mentioned, I could compile my entire project from a full clean in 30 seconds using the native ESP-IDF and other libraries with VS Code. This is with my project being 3x in size vs when I used Arduino.

  • @MoeOuan666
    @MoeOuan666 ปีที่แล้ว +2

    I now do arduino with some (few) espidf calls... I was afraid of instabilities but it seems wrapping is light enough for it to work, at least for what I do (espidf/freertos tasks (thread) and cpu freq control in espidf, everything else using arduino...).
    Arduino have a ton of libs but some things are not possible to do. PThreads for example are more limited than freertos tasks

  • @bennguyen1313
    @bennguyen1313 ปีที่แล้ว +1

    Does the Arduino Framework use a different compiler than IDF? If so, the GodBolt compiler explorer might show why the resulting hex files perform differently!
    BTW, is using VS Code (PlatformIO or ESP-IDF plugin) produce the same results as using the EsspressIF environment?

    • @ThatProject
      @ThatProject  ปีที่แล้ว +1

      ESP-IDF-based builds produce the same result. However, the referenced directory management is slightly different depending on the tool. This may make a very slight difference.

  • @fabiovsroque
    @fabiovsroque 11 หลายเดือนก่อน +1

    It was not easy for me to install and learn Eclipse IDE, but I did it thinking it would be better or fastter than Arduino. This video showed me I was not right...

    • @ThatProject
      @ThatProject  11 หลายเดือนก่อน +1

      I believe the point is we can use both of them.
      If your project can be done with the Arduino IDE, you can use it. On the other hand, if you want to use a specific feature that is only available in ESP-IDF, you must do a project with ESP-IDF.

  • @user-vk8jn5br1f
    @user-vk8jn5br1f ปีที่แล้ว

    I have a question please:-
    I used ESP-32 and programming it with Arduino IDE , the program was very simple it connected to WiFi and turn on and off some led. It is working but the temperature of ESP-32 was increasing, Why ?

    • @thomas.thomas
      @thomas.thomas 20 วันที่ผ่านมา

      It is normal that the temperature increases, but how much did it actually rise?

  • @lamboking8able
    @lamboking8able 27 วันที่ผ่านมา

    Running into a freertos issue and hoping the arduino framework is the reason. This does not give me a good feeling because i can't find the centralized issue for my ir communication breaking

  • @itskevscott
    @itskevscott ปีที่แล้ว +3

    Good video, and the result was a surprise! When you look into a lot of the ESP-IDF functions there is frequent runtime checking of the passed parameters, so that might be a factor? Also the odd assert() but maybe they are controlled by a compile time directive?

  • @SA-oj3bo
    @SA-oj3bo ปีที่แล้ว +1

    could you explain us in a tutorial how to get started with idf framework? thx.

    • @ThatProject
      @ThatProject  ปีที่แล้ว

      I'll consider that. Thank you.

  • @pepedecoatza
    @pepedecoatza ปีที่แล้ว

    How can i learn esp idf? I mean i can google it but i want to know recommended resources besides the official documentation. Anyway, thanks for your videos. I can get some insight about these 2 platforms with these kind of test

    • @mathieucaron4957
      @mathieucaron4957 ปีที่แล้ว +4

      You should use the official documentation, else you could code like most and it's very bad...

    • @conorstewart2214
      @conorstewart2214 ปีที่แล้ว +1

      The documentation is pretty good and there are a lot of examples, that is probably the best way to learn.

    • @pepedecoatza
      @pepedecoatza ปีที่แล้ว +1

      Thanks both of you. I will take a deep dive to the documentation then. Regards

    • @Richard-vj3vs
      @Richard-vj3vs ปีที่แล้ว +1

      I use the example codes provided by the officcial focumentation and the official api reference, thats all you need

  • @conorstewart2214
    @conorstewart2214 ปีที่แล้ว +1

    The esp32 only has a single precision floating point unit though doesn’t it? So that would maybe be why doing calculations with doubles takes that much longer.

    • @ThatProject
      @ThatProject  ปีที่แล้ว +2

      Yes, that's true. But What I tried in this video is comparing the performance speed of ESP-IDF and Arduino Framework.
      Many people including me think that ESP-IDF will overwhelm the Arduino Framework, but it is not that fast at least in my benchmarks. I'm preparing for a couple of tests in a different way. Let's see how it goes.

    • @conorstewart2214
      @conorstewart2214 ปีที่แล้ว +1

      @@ThatProject you should check the sdk config in the esp idf, there is a good chance that the arduino framework has a lot of their performance optimisations on, even things like flash speed or mode may be different, you will probably get a huge difference using DIO for flash compared to QIO, probably especially for things like drawing to screens where to has to load a lot from flash or ram. If you could find what optimisations the arduino framework has on, that may be useful for you. The sdk config is a very complicated thing with loads of performance related settings, it is complicated but if you understand it is probably much better than the arduino framework.

  • @FrankP83
    @FrankP83 11 หลายเดือนก่อน

    Ciao!I've developed a small project in Arduino, using an Arduino 2 board and a display shield.
    My intention now is to use a bigger size screen and a most powerfull hardware, i've bought an ILI9488 and a ESP32 S3 DevKit that has all the GPIO i need for my project (about 15 GPIO).
    I've seen the amazing LVGL library, and i'm thinking to start again my project using that library...what do you suggest to use?Can i use Arduino Framework for LVGL?
    Thanks in advance!! :D

    • @ThatProject
      @ThatProject  11 หลายเดือนก่อน +1

      Sure, you can use Arduino Framework for LVGL. I hope you do a wonderful project.

    • @FrankP83
      @FrankP83 11 หลายเดือนก่อน

      @@ThatProject I hope so!I'm not skilled in C++, I've done my actual project with arduino Ide , it took 3 months full work...hopefully i will figure out how implemented with LVGL , if you have a beginner guide for Arduino , will be nice to study!In the library there is jud an example with a string printed on screen "Hallo world Arduino, I'm LVGL" or similar 😥

    • @ThatProject
      @ThatProject  11 หลายเดือนก่อน +1

      @@FrankP83 Try this one. You can find the all examples from it. docs.lvgl.io/8.3/examples.html

    • @FrankP83
      @FrankP83 11 หลายเดือนก่อน

      @@ThatProject Thanks a lot!I will try to figure out!For now i've a strange behaviour...the coordinates are flipped on the Y axis ...and the transitions between two screens is super slow ... :(

    • @ThatProject
      @ThatProject  11 หลายเดือนก่อน

      @@FrankP83 Which GFX library are you using?

  • @ziomalZparafii
    @ziomalZparafii ปีที่แล้ว

    0:05 "we have two options" - what about PlatformIO? I've used only ESP8266 (and other regular AVR) but what I understood from many comments is that PlatformIO is a way to go as it's superior from Arduino IDE. I know nothing about ESP-IDF. As you mention here that there are only two options for ESP32, is PlatformIO not working anymore as a third one? Just asking out of curiosity as I don't have plans to use ESP32 anytime soon - 8266 is way cheaper and covers my needs in 100% (and I still have a bunch of them).

    • @ThatProject
      @ThatProject  ปีที่แล้ว +1

      PlatformIO is good too. Just use what is comfortable for you to use. This is simply a difference in development tools.
      When it comes to developing ESP32, beginners prefer ArduinoIDE. After that, if you get used to it and need the latest features, you will naturally challenge development based on ESP-IDF.

  • @nailtronic5330
    @nailtronic5330 3 หลายเดือนก่อน

    It's possible to make a code with the ble audio profile on esp32-s3...or S2? Thnaks

    • @ThatProject
      @ThatProject  3 หลายเดือนก่อน

      ESP32-S3 BLE does not support audio streaming and S3 doesn't have the classic BT so no A2DP profile.

    • @nailtronic5330
      @nailtronic5330 3 หลายเดือนก่อน

      @@ThatProject it's possible to make this streaming on BLE? for example on a GATT service? Thanks...I love your video

    • @ThatProject
      @ThatProject  3 หลายเดือนก่อน +1

      @@nailtronic5330 It is possible to transmit data continuously via BT. However, for audio/images, it is impossible to provide them in real time without using BT's specific codec. It would be a good idea to first check the GATT service available on ESP32. There are also lots of examples of this in ESP-IDF. Please check this first.

  • @mikejones-vd3fg
    @mikejones-vd3fg ปีที่แล้ว +3

    cool

  • @estevaofonsecaveiga7409
    @estevaofonsecaveiga7409 ปีที่แล้ว

    The Arduino default freertos frequency as far as I know is 1000hz while in the IDF the default is 100hz, you have to change it is menuconfig in esp-idf

    • @ThatProject
      @ThatProject  ปีที่แล้ว

      Thank you for letting me know. I'll try this way.

  • @dibyojyotibhattacherjee4279
    @dibyojyotibhattacherjee4279 7 หลายเดือนก่อน

    What's your go-to for any esp32 project IDF or Arduino

    • @ThatProject
      @ThatProject  7 หลายเดือนก่อน

      It really depends on. If the project needs to run on IDF, then I should go with it. Some project really needs IDF env.

  • @MarkvanderEynden
    @MarkvanderEynden ปีที่แล้ว

    Must be missing something, but it appears to me that the Arduino time adds up to 1088ms, not the 1095 displayed

    • @ThatProject
      @ThatProject  ปีที่แล้ว

      You're right. That's very weird. Where does 7ms come from? haha

  • @maulanaahmad4676
    @maulanaahmad4676 ปีที่แล้ว

    you include a RTOS library that cause ESP IDF slower than Arduino, please try it again without RTOS library

  • @AbuzarToronto
    @AbuzarToronto 5 หลายเดือนก่อน

    Thanks for this video. The performance hit with IDF was unexpected. I wonder what's going on. Other than that, IDF devs really need to step up their game. They're ruining the development experience for a decent product.

  • @TT-it9gg
    @TT-it9gg ปีที่แล้ว

    Thanks for sharing the video.
    Interesting to see the differences of video performance.
    You are right. The ESP32 family are not good at both 64-bit and 32-bit floating point calculations. The 8266 is the same as well.
    The NXP's or STM32's MCU with ARM M7 cores have hardware 64-bit floating point unit. They are much faster than ARM M4, M33, and ESP32 in 64-bit floating calculations.
    But what would be the right 64-bit floating point applications for such MCUs?

  • @tomgob5236
    @tomgob5236 ปีที่แล้ว +1

    *Cries in Micropython

  • @alba-ado
    @alba-ado หลายเดือนก่อน

    Arduino uses esp-idf to compile the code under the surface. This doesn't seem right. Maybe you forgot to increase the CPU speed. The default speed on the esp-idf is 160MHZ.

    • @ThatProject
      @ThatProject  หลายเดือนก่อน

      I believe I changed it to 240 MHz via sdkconfig before testing. I'll check it again. Thank you.

  • @terlumunjoseph6779
    @terlumunjoseph6779 ปีที่แล้ว

    hello can you make an update of flutter ble app with dht11 and arduino or esp32 as the flutter library is deprecated

  • @sniperdaoud
    @sniperdaoud ปีที่แล้ว

    4:40 please add to table perc, not que difference. its more clear

  • @ingenierocantor
    @ingenierocantor ปีที่แล้ว

    :o

  • @robertmurphree7210
    @robertmurphree7210 10 หลายเดือนก่อน

    Arduino has released two old boards with two new different chips 1) arduino uno r4 wifi has arm cortex m4 $28 and 2) Arduino Nano ESP32 s3 $20. both new products have lots of mcu features, RTC, bluetooth, CAN Bus, op amp, DAC, new extra hardware debugging (not working yet), New, friendly competition between maker companies like StrawberryPi, Adafruit, Arduino and moving up on bigger industrial mcu manufacturers like Renesas and expressif is really good.