Using native idf instead of arduino



  • Hi

    Is there anything special I need to do to use idf instead of arduino?

    I realise Arduino is simpler but to be honest the programming for me is not an issue. I have a background in C programming amongst other languages.

    The main reason I am looking at switching is because the BLE libraries appear to be so flaky that for my use case I need to get back to basics and just use idf ble support.

    Rob



  • Has anyone been able to use the m5 stack arduino library in idf app?

    Using IDF i was able to get around the crappy ble issues that are in the arduino ble libs but i cant use the screen or buttons now.

    Thanks

    Rob



  • Ok having had no responses i think i will try and use the code for m5 as an idf component.

    If anyone has already done this then let me know. Idf is a much better environment then arduino however i do understand alot of people get scared writing code



  • Hi Rob,
    I think you will have to start with flashing bootloader (or how its called on esp32) so native IDF would recognize it.
    Keep in mind that some of pins are used by perepherials of M5Stack device
    Anyways keep us updated, I also want more options with M5Stack I find it as great AIO device, just needs a bit more flex to code it with anything suits you most



  • Idf works fine with m5 stack for everything on the esp32 chip.

    The issue is some bright spark assumed everyone uses arduino


  • M5Stack

    I would love to use esp-idf and start to make some tutorial videos on it, but every time I try to set up the development environment no matter which guide i'm following or which OS i'm on, I always seem to hit a brick wall.



  • @rob-biernat

    @rob-biernat said in Using native idf instead of arduino:

    Idf works fine with m5 stack for everything on the esp32 chip.

    The issue is some bright spark assumed everyone uses arduino

    Thats mostly because most of us came from Atmega / arduino boards, we are common with it, so why not using it?
    I'm trying to stick with UIFlow / VS Code but its definetly easier to implent most of stuff with 100 years old arduino IDE.

    However, I will give idf ide a try, hopefully I can make it run, Im bit worried Ill burn m5stack's bootloader (still unsure how its realized here)



  • @lukasmaximus i just cloned their gig repo ran a script and away we went



  • @thrasher yeah i understand the background but 90 percent of the code should have been idf with a 10 percent layer for Arduino


  • M5Stack

    gig repo? I followed the official esp-idf guide and got as far as it recognizing the xtensa toolchain, but then when I try to make I always get errors and googling those errors hasn't got me anywhere



  • @lukasmaximus said in Using native idf instead of arduino:

    gig repo? I followed the official esp-idf guide and got as far as it recognizing the xtensa toolchain, but then when I try to make I always get errors and googling those errors hasn't got me anywhere

    Same with me



  • Im using idf 4.1 whereas you guys are probrably on the older stuff which was crap.

    Its cmake based now. Python self installers etc.

    Anyway I have recompiled arduino as an idf component and got a couple of errors in some libraries but am working through it.

    I also converted m5 to an idf lib and most of that compiles to apart from the dependecy on arduino SD lib.


  • M5Stack

    Any links would be much appreciated, I really want to get stuck in with idf development. I wasn't aware there were any python installer scripts, please enlighten me. I was almost considering an idf docker image I read about.





  • Hi guys, I came across this thread while trying to fix some M5StickC issues and thought I could chime in with some useful info. You can use Arduino as an ESP-IDF component however, it currently only works up to v3.2.3 of ESP-IDF.

    If you install v3.2.3 you can then use Arduino as a component from this repo here.

    Hope this helps.