ESP-IDF in CPP 01: Hello World!

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • Welcome to the start of a series explaining and showing how to programme for the ESP32, using the Espressif IDF (release version 4.1).
    Useful for makers and hobbyists along with more advanced firmware developers looking to use the ESP32.

Комментарии • 60

  • @sarimjalil6690
    @sarimjalil6690 10 месяцев назад +4

    Hi, I can't explain how thankful I am to you for creating this series. I have searched a lot on RUclips to find learning stuff on ESP IDF and couldn't find anything satisfactory. Looking forward to the video series on the latest IDF versions and explaining the differences etc. Till than I will be going through this series for my learning.

  • @joelrichard-foy4938
    @joelrichard-foy4938 Год назад +2

    Hello Simon,
    2 years late, I discovered your RUclips videos on the C++ programming of the ESP32. Thank you for sharing. You taught me a lot of things in this area. I move forward with more confidence in the C+ world, after a past experience as a C and C# programmer.

  • @abdelrahmanyasser5720
    @abdelrahmanyasser5720 7 месяцев назад +3

    Best dude ever. Thank you very much

  • @markbratcher9095
    @markbratcher9095 3 года назад +6

    Excellent videos! Following through the entire process is very instructive.
    Not sure when this change occurred, but the latest ESP-IDF documentation says that `app_main` is now allowed to return:
    Unlike normal FreeRTOS tasks (or embedded C main functions), the app_main task is allowed to return. If this happens, The task is cleaned up and the system will continue running with other RTOS tasks scheduled normally. Therefore, it is possible to implement app_main as either a function that creates other application tasks and then returns, or as a main application task itself.

    • @DrGreenGiant
      @DrGreenGiant  3 года назад +1

      Oh interesting! That's definitely new to me and saves an idle task. Thank you!

  • @italosoares69
    @italosoares69 Год назад +1

    Thank you so much!, i`ve been banging my head for a long time trying to make it work using the espressif instructions.

    • @DrGreenGiant
      @DrGreenGiant  Год назад +1

      You're welcome! Just be aware which version of the IDF I was on when I made this (IDF4). I think version 5 is out now which may be quite different. (Hoping to do some videos later this year!)

  • @SagarShelarB
    @SagarShelarB 3 года назад +2

    Thank you for making this videos. ESP-IDF with C++ is really helpful and there's less help available.

  • @chuc2rk
    @chuc2rk 2 года назад +1

    Thank you so much your videos! I search many times to find programming using esp-idf but not a lot.

  • @original_anu
    @original_anu 2 года назад +2

    Really easy to understand. I'm really excited to follow this series ❤

  • @zyghom
    @zyghom 2 года назад +2

    fantastic 45 minutes I spent here! thx

  • @techheck3358
    @techheck3358 Год назад +1

    Thank you mate, youre a legend. cheers from the south east :)

  • @asmaulhabib6721
    @asmaulhabib6721 3 года назад +3

    This is great Simon, really appreciate if you continue making ESP-IDF videos. Thanks

    • @Scwan15021983
      @Scwan15021983 3 года назад +1

      yea please more videos about esp-idf in c++🙂

  • @jessidleonvelezgutierrez3645
    @jessidleonvelezgutierrez3645 2 года назад +1

    Thanks a lot for this absolute great explanation

  • @Falney
    @Falney 2 месяца назад

    omg your voice is extremely similar to mine. For a moment I was confused because I didn't remember recording a series on ESP32 programming.

  • @sparesnone
    @sparesnone 3 года назад +3

    It's good to make text a bit bigger when recording for RUclips, but on my 32 inch monitor the text size is really crazy

    • @markbratcher9095
      @markbratcher9095 3 года назад

      I sometimes watch these kinds of videos on my TV from across the room. And I'm > 60 years old. So I appreciate the larger font, even if it's a bit larger than I really require. In contrast, there are many videos I have trouble reading even on my laptop (which is a 15 inch monitor). So it's probably to err on the larger side if it is to be accessible to a wide audience.

  • @matthew_0205
    @matthew_0205 2 года назад +2

    Simon, I love the way your code is colored, I have been trying to configure my c++ extension on vs code but I don't seem to know why I can't get my code to highlight stuffs and it is frustrating coding like that.
    I would love if you could share some few tips.

    • @DrGreenGiant
      @DrGreenGiant  Год назад

      I used to use "Bracket Pair Colorizer 2" but this is now built into VSCode. Under settings->text Editor->Bracket Pair Colorization

  • @meoDomicio
    @meoDomicio Год назад +1

    Merci

  • @larslacour9375
    @larslacour9375 3 года назад +1

    Hi Simon and all that also would like to use the ESP32, cmake and C++/CPP
    This video is great!
    Here are some thoughts from me after learning a lot from the video.
    The starting point was a bit unclear for me, when I implemented the code in the tutorial.
    I did not get it to work on my first attempt, since I missed something that was setup before the video started.
    But I did succeed in my second attempt, this time starting from the “get started --> hello world” example from the vendor
    ruclips.net/video/Lc6ausiKvQM/видео.html&ab_channel=EspressifSystems (shown at 4 min. 12 sec.), edited that project as in this tutorial and got it all to work.
    Great work Simon, and thanks for sharing.

  • @TomMaynard--TCM--
    @TomMaynard--TCM-- 11 месяцев назад

    Could you please add all the files (and a file structure map) to your Github repo for this series, or at least this episode? I'm coming out of retirement and was mostly blindsided by your content (and pace!).
    It would be great help. Thanks.

    • @DrGreenGiant
      @DrGreenGiant  11 месяцев назад +1

      Hiya! You can find links to GitHub from episode 4 onwards when I realise this might be a good idea to do.
      Thanks for the comment, I've learned a lot about what to improve on for presentation next time. I'll add in doxygen or similar so you can get a call tree graph too.
      Hoping to start a new series later this year

  • @tcl78
    @tcl78 Год назад +1

    Hello, thank you for this series, is there a link from where to download the code (the full project's code or the code of the video)?

    • @DrGreenGiant
      @DrGreenGiant  Год назад

      In the later videos I have put links in the description. You may have to do some rooting about the commits to get this episode if it is even there for this simple example: github.com/howroyd/esp32_youtube_series/commits/youtube

  • @peterwilson69
    @peterwilson69 7 месяцев назад

    I kind of grateful, but after 20 minutes I realized, that this is a 40min video. Does it really take 40mins of configuration to write hello world.

    • @DrGreenGiant
      @DrGreenGiant  7 месяцев назад +2

      Not really. If you just want to download and run the example project provided by espressif then that would be fastest, but then I'm not adding any depth or value at that point by making a video about it.
      This is a very old video now and my first one so the quality is poor to be honest. I'm starting a new series soon and am aiming to be much more concise and watchable.

  • @robot83880
    @robot83880 3 года назад

    Great video. Having issues with the inc folder everytime i build the project, it seem to identify directory and outputs an error /core/Src/Inc'
    is not a directory. would you have any workarounds to this

    • @DrGreenGiant
      @DrGreenGiant  3 года назад

      Not sure without seeing your setup. I'll go back and check this commit to see if I've made a mistake in the cmakelists somewhere

  • @user-kh6gu4jg3e
    @user-kh6gu4jg3e 10 месяцев назад

    But is it really necessary to add extern "C" to the main function?

    • @DrGreenGiant
      @DrGreenGiant  10 месяцев назад

      If you are going to be using C++ then yes. You will get a compile time error if you don't as the entry point of the programme will not be linked.
      Feel free to Google it for a better explanation of why you need it when you have both C and C++ code.

  • @thuyetmai9650
    @thuyetmai9650 2 года назад +1

    First of all thank you very much for making these videos. I'm a student in major of embedded programming. May I ask, are there any difference between programming esp32 in Cpp and C? Or is it just simply a programming style? Looking forward to your reply. Thank you so much !!!

    • @DrGreenGiant
      @DrGreenGiant  2 года назад

      No none at all. Just a different language so a different way of going about things. C++ is much more modern and can catch a lot more bugs at compile time than C can natively. It's an age old argument for which is better for embedded but I'm all cases I've seen C++ outperforms or matches C for the compiled code speed and memory. The CppCon has lots of good videos and people often compare against C quantitatively.
      There's also a fair chunk of the IDF that's written in C++ now as well but retains the C style interface for compatibility.

    • @DrGreenGiant
      @DrGreenGiant  2 года назад

      Feel free to ask any more questions, happy to answer or point you in the right direction as much as I can

    • @thuyetmai9650
      @thuyetmai9650 2 года назад +1

      @@DrGreenGiant You are very enthusiastic, thank you very much, I will try to practice through your videos to get more experience

  • @felixfigueroa
    @felixfigueroa 2 года назад

    Hi Simon, what do you think about working on PlatformIO ?

    • @DrGreenGiant
      @DrGreenGiant  2 года назад +1

      Nothing wrong with it at all but personally I didn't enjoy it nor find it helpful for the stuff I do.
      I found the documentation seriously lacking.
      It's been a few years since I last looked though

  • @nhanNguyen-wo8fy
    @nhanNguyen-wo8fy 10 месяцев назад

    16:45 Cmake

  • @jcbritobr
    @jcbritobr 4 месяца назад

    You ate using c instead of c++. Using a .cpp extension means nothing.

    • @DrGreenGiant
      @DrGreenGiant  4 месяца назад +1

      This episode is setting up the framework to use a C++ compiler, which I do throughout. In all the episodes following this we use C++ language.
      File extensions are used to differentiate between C and C++ source files in the toolchain. If you wrote C++ code in a .c extended file then the toolchain would fail to compile the code with the way it's been setup by Espressif.

  • @dmitriidobrov461
    @dmitriidobrov461 3 года назад +1

    Hi! English is not my native language. Can u add auto subtitles to your videos?:))

    • @DrGreenGiant
      @DrGreenGiant  3 года назад

      I have just been though and checked and it is set to auto subtitles by RUclips (English). All seems to be set correctly at my end. Is it not working for you? If not I'll dig a bit deeper

    • @oliverer3
      @oliverer3 3 года назад +1

      @@DrGreenGiant Can confirm subtitles are indeed enabled.

    • @DrGreenGiant
      @DrGreenGiant  Год назад

      @MaxFreak it's all done automatically by RUclips, so I don't think so, but I shall look into it just in case