Menu

adding board support (XIAO ESP32-C3)

2023-11-03
2025-07-17
  • Woodpeckercz

    Woodpeckercz - 2023-11-03

    Hi,
    I would like to use the following board to make this focuser.
    Seeed studio XIAO ES32-C3.
    What would be the easiest way to add this board ?
    This board only has 11 GPIO pins so I'm guessing I would have to make a jsn file for this board and add it's option to the firmware boarddefs.h ?
    Here's the board pinout.

    The number of available pins will limit the options for this board.
    6 pins are needed for the DRV8825 stepper driver,
    1 pin for temperature,
    1 pin for home position switch (would like to use hall effect sensor at some point),
    3 pins are spare and could be used for either i2c for the display, In/Out leds or In/Out PB(none of which are necessary for me).
    Reason for this board is that its footprint is only slightly larger than the stepper driver board, which will allow for very small footprint.

    Regards

     

    Last edit: Woodpeckercz 2023-11-03
  • Woodpeckercz

    Woodpeckercz - 2023-11-03

    silly me. just noticed the customboard option in the firmware

     
  • Woodpeckercz

    Woodpeckercz - 2023-11-03

    I'll share the board design when I have it done.

     
  • brownrb

    brownrb - 2023-11-03

    Yeah, but I expect you will run into issues because the firmware does not support C3. It is mentioned in a number of places

    Regards
    Robert

     
    • Woodpeckercz

      Woodpeckercz - 2023-11-03

      Any particular reason why it's not supported? I couldn't find it referenced anywhere. Could be blind, that's always a possibility.
      I also have S3 version of the board, would that work?

       
  • brownrb

    brownrb - 2023-11-03

    Hi

    it is a little naive to think that all ESP32 devices are the same. I guess there are some that think esp32x = esp32y, sadly it is not the case that all esp32 devices are the same.

    For me to support the hundreds of different ESP32 variations, would require me to
    purchase each variation
    make firmware versions for each variation
    test and debug everything across all variations
    etc

    As someone on very limited funding, its hard finding funds for one variation, let alone many, There are also not enough hours in a day to do that, And I think users would find the result a spaghetti of changes, making firmware harder to configure and result in increased issues for users to deal with. (as well as complicate the support level etc).

    Hence, for projects, I put together something, and I say "use this and this" and if the user follows those instructions, they can have a certain degree of assurance they will end up at a successful journey end with a working system, with a minimal of stress and heartache. That is why the documentation is of a high standard, AND the firmware well documented/commented, and TEST programs provided, not to mention the free online support here or via email.

    The PDF and firmware is quite specific, esp32 dev module is the only esp32 chip supported. The Wemos version uses the same ESP32 chip, and is supported because of the help I received from other users of the project who provided WEMOS kit and assisted with all the testing etc that went with all of that,

    As stated, there are numerous esp32 chip variations. Hardly a week goes by and a new variant comes out. The esp32 dev module is cheap and widely available.

    The Arduino core for esp32 is done by the ExpressIF guys. And you cannot expect that the core generates the same code that runs generically on every esp32 chip. That is not the case. Each chip vaiation is selected via "Target CPU" so that when you compile for C3 the code is NOT the same as generated for "ESP32 Dev Module". This is especially true at the hardware level, which is important because many of the pins of the esp32 chip are used for interface purposes for devices like display, joysticks, push buttons, temperature probes etc. There are also differences in clock events/handling as well as WiFi differences,

    For example, one of the variations generated for the WEMOS chip is that the I2C pins are different from the ESP32 Dev, meaning that I2C devices will fail unless the hardwiring is changed to support the WEMOS boards. But its not just limited to the I2C bus, it also affects SPI and EEPROM amongst others. And some of the S2/C3 also have issues running the Hardware timers required for the state machine. Hence any C3/S3 variations are NOT supported.

    What you are suggesting is akin to this - Lets take the Car computer from a Checvy V8 and drop it into a Toyota four-cyclinder and expect it will work. Expressed on that level I think it becomes clear that "why not - it is an ESP32" is not the right question.

    I apologize if all this sounds negative or basic to you, that is not my intent, I am trying to highlight the difficulties any developer has with a plethora of devices and dealing with user expectations that are not easily achievable. The reason there are restrictions mentioned in the PDF and Firmware is to prevent (or limit) chaos as a result.

    Regards
    Robert

     

    Last edit: brownrb 2023-11-03
  • Woodpeckercz

    Woodpeckercz - 2023-11-03

    Thanks for the extensive reply, didn't realise there is such a disparity between the esp32 boards.
    I didn't mean to sound ungrateful, I'm astonished by the level of detail and work that has gone into your projects.
    My intention was to gain some guidance to be able to test this board rather than having you doing the work.
    I understand the need for limiting the chaos as you said.
    I have very little understanding of programing so most of the time I trial and error my way through projects to get them to suit my needs.
    I do not wish to waste your time on this.

     
  • Woodpeckercz

    Woodpeckercz - 2023-11-03

    I found some information on the boards, looks like the C3 is intended as an upgrade to esp8266 chips, S2 is meant as upgrade to ESP-Wroom-32 chip and the S3 is beefed up S2 with some built in AI stuff.

     
  • brownrb

    brownrb - 2023-11-07

    Hi again.

    One other tip - sometimes one just has to wait a while for the memory to find the right info, it takes longer to find the on switch as one gets older.

    The standard uploader for data sketch files does not work with the S2/C2/S3 chips.
    From memory the uploader for those chips is .. oh yes, my memory just flicked on a light

    Oh I found this. An email I got from Higany who converted the code to an S2. Hope it helps. I am unable to do this as I do not have any S2/S3 type boards. But he has done the work and it runs, so all credit to him for doing the work and sharing what he found.

    Regards
    Robert

    Higany
    
    
    Hello,
    
    Few years ago I built the project on a custom PCB with a Lolin D1 mini ESP8266 board & DRV8825 controlboard.
    The ESP8266 support was removed from the project, but Lolin came out a Lolin D1 Mini pin-compatible ESP32-S2 breakout board, called the Lolin S2-Mini.
    S2 Mini
    
    I didn't want to throw out my PCBs and enclosure, so I decided to upgrade my controller with the S2-Mini.
    
    There were a few pitfalls, but at the end it works.
    Here are my findings, maybe it will help others:
    
    1. Controller not starting:
    The ESP32-S has a native USB port, and the controller didn't start until I opened the serial monitor in Arduino IDE. This while cycle had to be commented out in myfp2esp32F.ino to make it work with the S2:
    
    //  while ( !Serial )
    //  {
    //    ;                                         // wait for serial port to start
    //  }
    
    2. Motor not moving & Board options
    Maybe my DRV8825 board had some hiccups, but I couldn't get the motor moving with the CUSTOMBRD & 99.json tweaking. It worked after I defined the DRVBRD PRO2ESP32DRV8825 instead and modified, 44.jsn according to my pins.
    
    { "board":"PRO2ESP32DRV8825","maxstepmode":32,"stepmode":1,"enpin":7,"steppin":9,"dirpin":11,"temppin":18,"hpswpin":-1,"inledpin":-1,"outledpin":-1,"pb1pin":-1,"pb2pin":-1,"irpin":-1,"brdnum":44,"stepsrev":-1,"fixedsmode":1,"brdpins":[-1,-1,-1,-1],"msdelay":4000 }
    
    3. I2C pins:
    Needed to modify in Controller_defines.h according to the D1 Mini -> S2 Mini pinout:
    
    // I2C
    #define I2CDATAPIN        33
    #define I2CCLKPIN         35
    
    4. ESP32 Sketch data downloader:
    
    The manual refers to an old version of the ESP32 sketch data downloader, which doesn't support the S2. This is the recent one, which supports the S2 chip: Arduino ESP32 filesystem uploader (SPIFFS has to be selected)
    
    SPECIAL NOTE
    Plugin required for PRO2ESP32LOLINS2MINI boards
    arduino-esp32fs-plugin  https://github.com/lorol/arduino-esp32fs-plugin
    
    Other:
    The S2-Mini has a double row of pins for extra GPIOs, so software selection of stepside would be also possible with 3 Dupont-wires on the existing PCB, but I am happy with the jumper selection, because it has to be only set once anyway.
    
    My PCB is a minimal D1 mini & DRV8825 board with temp sensor and LCD options.
    Pins:
    
    Function |D1 Mini |ESP8266 GPIO |ESP32-S GPIO  
            EN    | D5     |      14     |       7       
            STEP  | D6     |      12     |       9      
            DIR   | D7     |      13     |       11      
            SCL   | D1     |      5      |       35     
            SDA   | D2     |      4      |       33      
            TEMP  | D3     |      0      |       18
    
     
    • Woodpeckercz

      Woodpeckercz - 2023-11-08

      Thanks, I'll try this tonight.

       
      • brownrb

        brownrb - 2023-12-19

        How are things going?
        If you want, send me the board pin numbers etc, and I will look at defining and then integrating the board into ,yFP2ESP32. Another board was added recently, LilyGo T-Motor
        which Eric built. That will appear in the next update.

        Regards
        Robert

         
        • Eric Harant

          Eric Harant - 2023-12-23

          Hi Robert,
          I’am working on the XIA0 ESP32-C3.
          It’s like a rescent  ESP32 (S2, S3)
          The main issue is that Serial 2 is not defined.
          We have to add :
          //Define Serial2 devices mapped to the internal UARTs
          #ifdef ARDUINO_XIAO_ESP32C3
          HardwareSerial Serial2(0);
          #endif

          And to set it up :

          Serial2.begin(115200,SERIAL_8N1, 20, 21);

          At boot time some logs are sended on this serial port.

          So enable the Driver (TMCXXXX) after.

          I will test that within a week

          Pins are :

          And Pins number are define as :

          ifndef Pins_Arduino_h

          define Pins_Arduino_h

          include <stdint.h></stdint.h>

          static const uint8_t TX = 21;
          static const uint8_t RX = 20;

          static const uint8_t SDA = 6;
          static const uint8_t SCL = 7;

          static const uint8_t SS = 20;
          static const uint8_t MOSI = 10;
          static const uint8_t MISO = 9;
          static const uint8_t SCK = 8;

          static const uint8_t A0 = 2;
          static const uint8_t A1 = 3;
          static const uint8_t A2 = 4;
          static const uint8_t A3 = 5;

          static const uint8_t D0 = 2;
          static const uint8_t D1 = 3;
          static const uint8_t D2 = 4;
          static const uint8_t D3 = 5;
          static const uint8_t D4 = 6;
          static const uint8_t D5 = 7;
          static const uint8_t D6 = 21;
          static const uint8_t D7 = 20;
          static const uint8_t D8 = 8;
          static const uint8_t D9 = 9;
          static const uint8_t D10 = 10;

          endif / Pins_Arduino_h /

          Prototype schematics (5Vcc power via USB):

          Regards

          Eric

          Envoyé à partir de Courrier pour Windows

          De : brownrb
          Envoyé le :mardi 19 décembre 2023 10:29
          À : [myfocuserpro2-esp32:discussion]
          Objet :[myfocuserpro2-esp32:discussion] Re: adding board support (XIAO ESP32-C3)

          How are things going?
          If you want, send me the board pin numbers etc, and I will look at defining and then integrating the board into ,yFP2ESP32. Another board was added recently, LilyGo T-Motor
          which Eric built. That will appear in the next update.
          Regards
          Robert

          adding board support (XIAO ESP32-C3)

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/
          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

          --
          Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
          www.avast.com

           
  • Marco Gulino

    Marco Gulino - 2024-08-12

    Hello, how is this going?
    I saw that the newest version has integrated support for PRO2ESP32TMC2209XIAOC3 by Eric, and I'm trying to adapt this for my setup (ESP32 C3 Supermini + a4988), but when I start the code, it immediately crashes after connecting to the WiFi AP.
    This is when using MultiAP:

    13:37:12.155 > multiap connected successfully
    13:37:12.160 > Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.
    13:37:12.160 > 
    13:37:12.160 > Core  0 register dump:
    13:37:12.160 > MEPC    : 0x4200992c  RA      : 0x4200a9ee  SP      : 0x3fc9e950  GP      : 0x3fc8e400  
    13:37:12.171 > TP      : 0x3fc70990  T0      : 0x4005890e  T1      : 0x40388cd8  T2      : 0x00000000  
    13:37:12.182 > S0/FP   : 0x3fc96da8  S1      : 0x3fc96e30  A0      : 0x00000000  A1      : 0x3fc9e95f  
    13:37:12.182 > A2      : 0x00000000  A3      : 0x00000004  A4      : 0x3fc96da8  A5      : 0x00000000  
    13:37:12.193 > A6      : 0xfa000000  A7      : 0x00000003  S2      : 0x00000002  S3      : 0x3fc96dbc  
    13:37:12.204 > S4      : 0x00000000  S5      : 0x3fc97000  S6      : 0x00000000  S7      : 0x00000000  
    13:37:12.215 > S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  
    13:37:12.215 > T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000000  T6      : 0x00000000  
    13:37:12.226 > MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000005  MTVAL   : 0x0000003a  
    13:37:12.237 > MHARTID : 0x00000000  
    13:37:12.237 > 
    13:37:12.237 > Stack memory:
    13:37:12.237 > 3fc9e950: 0x00000000 0x00000002 0x00000000 0x3fc96dbc 0x00000000 0x3fc97000 0x3fc97000 0x4200abfe
    13:37:12.780 >   #0  0x3fc97000 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
    13:37:12.780 >   #1  0x3fc97000 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
    13:37:12.780 >   #2  0x4200abfe in loop() at src/main.cpp:1723
    13:37:12.780 > 
    13:37:12.780 > 3fc9e970: 0xfa000000 0x00000003 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x9d1ea2cc
    13:37:13.471 > 3fc9e990: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9e9b0: 0x00000000 0x3fc97000 0x00000000 0x42030d0c 0x00000000 0x00000000 0x00000000 0x40389afc
    13:37:13.471 >   #0  0x3fc97000 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
    13:37:13.471 >   #1  0x42030d0c in loopTask(void*) at /home/marco/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51
    13:37:13.471 >   #2  0x40389afc in _prvTaskExitError at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:126
    13:37:13.471 >       (inlined by) prvTaskExitError at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:140
    13:37:13.471 > 
    13:37:13.471 > 3fc9e9d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
    13:37:13.471 > 3fc9e9f0: 0xa5a5a5a5 0xbaad5678 0x00000160 0xabba1234 0x00000154 0x3fc9e930 0x00002e98 0x3fc9364c
    13:37:13.471 > 3fc9ea10: 0x3fc9364c 0x3fc9ea04 0x3fc93644 0x00000018 0x3fca59f8 0x3fca59f8 0x3fc9ea04 0x00000000
    13:37:13.471 > 3fc9ea30: 0x00000001 0x3fc9c9f4 0x706f6f6c 0x6b736154 0xa4172900 0x00700354 0x00000000 0x3fc9e9f0
    13:37:13.471 > 3fc9ea50: 0x00000001 0x00000000 0x3fca3e38 0x4203b942 0x00000000 0x3fc98644 0x3fc986ac 0x3fc98714
    13:37:13.471 >   #0  0x4203b942 in pthread_local_storage_thread_deleted_callback at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/pthread/pthread_local_storage.c:129
    13:37:13.471 > 
    13:37:13.471 > 3fc9ea70: 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x420af26e 0x00000000
    13:37:13.471 >   #0  0x420af26e in _cleanup_r at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/findfp.c:229
    13:37:13.471 > 
    13:37:13.471 > 3fc9ea90: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9eab0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9ead0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9eaf0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9eb10: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9eb30: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
    13:37:13.471 > 3fc9eb50: 0x00000000 0x54000000 0xbaad5678 0x00000060 0xabba1234 0x00000054 0x00000000 0x3fc9eb68
    13:37:13.471 > 3fc9eb70: 0x00000000 0x00000000 0x00000000 0x3fc9eb80 0xffffffff 0x3fc9eb80 0x3fc9eb80 0x00000000
    13:37:13.471 > 3fc9eb90: 0x3fc9eb94 0xffffffff 0x3fc9eb94 0x3fc9eb94 0x00000001 0x00000001 0x00000000 0x3e00ffff
    13:37:13.471 > 3fc9ebb0: 0x00000000 0xb33fffff 0x00000000 0xbaad5678 0x00000160 0xabba1234 0x00000154 0x3fc9ec20
    13:37:13.471 > 3fc9ebd0: 0x3fc9ec39 0x3fc9ed20 0x3fc9ed1f 0x00000000 0x3fc9ebe4 0xffffffff 0x3fc9ebe4 0x3fc9ebe4
    13:37:13.471 > 3fc9ebf0: 0x00000000 0x3fc9ebf8 0xffffffff 0x3fc9ebf8 0x3fc9ebf8 0x00000019 0x00000100 0x00000001
    13:37:13.471 > 3fc9ec10: 0xf800ffff 0x00000000 0xb33fffff 0x00000000 0x72617473 0x65732074 0x6c616972 0x0a0d0a0d
    13:37:13.471 > 3fc9ec30: 0x64616f4c 0x6e6f4320 0xd6bb4574 0xdd6ed98e 0xc9806200 0xa2708573 0x61c08673 0x2015651e
    13:37:13.471 > 3fc9ec50: 0xd5bd21f2 0xf1b7ad96 0x4bcfb1fb 0xbbb7d28c 0x742b0677 0x00c0d438 0x148de0b3 0x290f20b1
    13:37:13.471 > 3fc9ec70: 0x9dd5fdbc 0xf9caedab 0xb2ced7c2 0x94f5cd7b 0x85f00602 0x912dd485 0x24808a36 0x49a0b684
    13:37:13.471 > 3fc9ec90: 0xefda7fb5 0xebdc9f3e 0xdb51adfb 0x4a4be555 0x0bbf7780 0xdc081664 0x8cc2bae0 0xf25cba45
    13:37:13.471 > 3fc9ecb0: 0xdad212de 0xdfc6ddbc 0x47fb760b 0x79f7ce1c 0x174b0e90 0x59444a7f 0x057e55f2 0x7f9a3149
    13:37:13.471 > 3fc9ecd0: 0x03e19fdf 0xfd56edfb 0x9ef5e7d1 0x6374a9f1 0x31238899 0x86b58734 0x271c686c 0x22a9b828
    13:37:13.471 > 3fc9ecf0: 0x7dc22774 0xded5d77f 0xc8f8f1bd 0xe67f4611 0x8b4cd700 0x083d016b 0x2211bd2f 0x282a18a1
    13:37:13.471 > 3fc9ed10: 0xec157fcf 0x19be09e7 0x8bf76925 0xe7ee8cb9 0xbaad5678 0x000000f8 0xabba1234 0x000000ec
    13:37:13.471 > 3fc9ed30: 0x00000100 0x00000100 0x00000002 0x4038677c 0x40386272 0x40385b66 0x40386720 0x40386704
    13:37:13.471 >   #0  0x4038677c in prvCheckItemFitsByteBuffer at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:327
    13:37:13.471 >   #1  0x40386272 in prvCopyItemByteBuf at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:488
    13:37:13.471 >   #2  0x40385b66 in prvGetItemByteBuf at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:579
    13:37:13.471 >   #3  0x40386720 in prvReturnItemByteBuf at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:669
    13:37:13.471 >   #4  0x40386704 in prvGetCurMaxSizeByteBuf at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:747
    

    I then tried to disable multiAP and hardcode the stations info in the relative header, as I saw something funky going on (there's probably a return missing in the setup), and instead I got this, which at least seem to be more explicit about what's going wrong:

    13:21:57.228 > [ 10742][E][esp32-hal-timer.c:190] timerBegin(): Timer number 2 exceeds available number of Timers.
    13:21:57.237 > Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.
    13:21:57.237 > 
    13:21:57.237 > Core  0 register dump:
    13:21:57.237 > MEPC    : 0x4202f38a  RA      : 0x4200a138  SP      : 0x3fc9e940  GP      : 0x3fc8e400  
    13:21:57.248 > TP      : 0x3fc70d38  T0      : 0x4005890e  T1      : 0x00000000  T2      : 0x00000000  
    13:21:57.259 > S0/FP   : 0x3fc96eac  S1      : 0x3fc96d90  A0      : 0x00000000  A1      : 0x40380316  
    13:21:57.259 > A2      : 0x00000001  A3      : 0x40380316  A4      : 0x00000000  A5      : 0x60000000  
    13:21:57.270 > A6      : 0xa0000000  A7      : 0x0000000a  S2      : 0x3fc97000  S3      : 0x3fc96ef4  
    13:21:57.282 > S4      : 0x3fcac4a8  S5      : 0x3fcaa454  S6      : 0x00000000  S7      : 0x00000000  
    13:21:57.292 > S8      : 0x00000000  S9      : 0x00000003  S10     : 0x00000000  S11     : 0x00000000  
    13:21:57.292 > T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000000  T6      : 0x00000000  
    13:21:57.303 > MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000005  MTVAL   : 0x00000001  
    13:21:57.315 > MHARTID : 0x00000000  
    13:21:57.315 > 
    13:21:57.315 > Stack memory:
    13:21:57.315 > 3fc9e940: 0x3fc97000 0x3fc96d90 0x3fc92000 0x4200bcc2 0x4202f654 0x40389afc 0x00000000 0xffffffff
    13:21:58.048 >   #0  0x3fc97000 in ?? at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
    13:21:58.048 >   #1  0x3fc96d90 in ?? at src/main.cpp:143
    13:21:58.048 >   #2  0x4200bcc2 in setup() at src/main.cpp:1575
    13:21:58.048 >   #3  0x4202f654 in loopTask(void*) at /home/marco/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:41
    13:21:58.048 >   #4  0x40389afc in _prvTaskExitError at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:126
    13:21:58.048 >       (inlined by) prvTaskExitError at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:140
    

    The only thing that comes to mind is that I've used PRO2ESP32DRV8825 as my profile base (changing the pinouts where necessary) instead of PRO2ESP32TMC2209XIAOC3, but when looking at all the places where the latter define is used, it doesn't look like there's anything major going on there that might explain this crash.

    I also know that the C3 has only two timers (hence the exception) and IIRC one of the timers is also used by the wifi, but if somehow the C3 profile disabled some timer(s) I'd expect it to see underneath the relative ifdefs directives.

    Is the profile for PRO2ESP32TMC2209XIAOC3 actually working? Am I missing something?

     
    • Eric Harant

      Eric Harant - 2024-08-12

      Hi Marco.

      I will have a look later.

      I make it workd for PRO2ESP32TMC2209XIAOC3

      Some fixes may be missing int the latest release.

      I remember a buffer to small when printing the IP address in the debug
      log that cause similar issue.

      The main change for the C3 is Serial and only 2 timers.

      That have been addressed in my code.

      I haven't tested the DRV8825

      Best regards

      Le 12/08/2024 à 14:42, Marco Gulino a écrit :

      Hello, how is this going?
      I saw that the newest version has integrated support for
      PRO2ESP32TMC2209XIAOC3 by Eric, and I'm trying to adapt this for my
      setup (ESP32 C3 Supermini + a4988), but when I start the code, it
      immediately crashes after connecting to the WiFi AP.
      This is when using MultiAP:

      |13:37:12.155>multiapconnectedsuccessfully
      13:37:12.160>GuruMeditationError:Core0panic'ed(Loadaccessfault).Exceptionwasunhandled.
      13:37:12.160>13:37:12.160>Core0registerdump:
      13:37:12.160>MEPC:0x4200992cRA:0x4200a9eeSP:0x3fc9e950GP:0x3fc8e40013:37:12.171>TP:0x3fc70990T0:0x4005890eT1:0x40388cd8T2:0x0000000013:37:12.182>S0/FP:0x3fc96da8S1:0x3fc96e30A0:0x00000000A1:0x3fc9e95f13:37:12.182>A2:0x00000000A3:0x00000004A4:0x3fc96da8A5:0x0000000013:37:12.193>A6:0xfa000000A7:0x00000003S2:0x00000002S3:0x3fc96dbc13:37:12.204>S4:0x00000000S5:0x3fc97000S6:0x00000000S7:0x0000000013:37:12.215>S8:0x00000000S9:0x00000000S10:0x00000000S11:0x0000000013:37:12.215>T3:0x00000000T4:0x00000000T5:0x00000000T6:0x0000000013:37:12.226>MSTATUS:0x00001881MTVEC:0x40380001MCAUSE:0x00000005MTVAL:0x0000003a13:37:12.237>MHARTID:0x0000000013:37:12.237>13:37:12.237>Stackmemory:
      13:37:12.237>3fc9e950:0x000000000x000000020x000000000x3fc96dbc0x000000000x3fc970000x3fc970000x4200abfe
      13:37:12.780>#00x3fc97000in??at/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
      13:37:12.780>#10x3fc97000in??at/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
      13:37:12.780>#20x4200abfeinloop()atsrc/main.cpp:1723
      13:37:12.780>13:37:12.780>3fc9e970:0xfa0000000x000000030x000000000x000000000x000000000x000000000x000000000x9d1ea2cc
      13:37:13.471>3fc9e990:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9e9b0:0x000000000x3fc970000x000000000x42030d0c0x000000000x000000000x000000000x40389afc
      13:37:13.471>#00x3fc97000in??at/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
      13:37:13.471>#10x42030d0cinloopTask(void*)at/home/marco/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51
      13:37:13.471>#20x40389afcin_prvTaskExitErrorat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:126
      13:37:13.471>(inlinedby)prvTaskExitErrorat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:140
      13:37:13.471>13:37:13.471>3fc9e9d0:0x000000000x000000000x000000000x000000000x000000000xa5a5a5a50xa5a5a5a50xa5a5a5a5
      13:37:13.471>3fc9e9f0:0xa5a5a5a50xbaad56780x000001600xabba12340x000001540x3fc9e9300x00002e980x3fc9364c
      13:37:13.471>3fc9ea10:0x3fc9364c0x3fc9ea040x3fc936440x000000180x3fca59f80x3fca59f80x3fc9ea040x00000000
      13:37:13.471>3fc9ea30:0x000000010x3fc9c9f40x706f6f6c0x6b7361540xa41729000x007003540x000000000x3fc9e9f0
      13:37:13.471>3fc9ea50:0x000000010x000000000x3fca3e380x4203b9420x000000000x3fc986440x3fc986ac0x3fc98714
      13:37:13.471>#00x4203b942inpthread_local_storage_thread_deleted_callbackat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/pthread/pthread_local_storage.c:129
      13:37:13.471>13:37:13.471>3fc9ea70:0x000000000x000000000x000000010x000000000x000000000x000000000x420af26e0x00000000
      13:37:13.471>#00x420af26ein_cleanup_rat/builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/findfp.c:229
      13:37:13.471>13:37:13.471>3fc9ea90:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9eab0:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9ead0:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9eaf0:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9eb10:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9eb30:0x000000000x000000000x000000000x000000000x000000000x000000000x000000000x00000000
      13:37:13.471>3fc9eb50:0x000000000x540000000xbaad56780x000000600xabba12340x000000540x000000000x3fc9eb68
      13:37:13.471>3fc9eb70:0x000000000x000000000x000000000x3fc9eb800xffffffff0x3fc9eb800x3fc9eb800x00000000
      13:37:13.471>3fc9eb90:0x3fc9eb940xffffffff0x3fc9eb940x3fc9eb940x000000010x000000010x000000000x3e00ffff
      13:37:13.471>3fc9ebb0:0x000000000xb33fffff0x000000000xbaad56780x000001600xabba12340x000001540x3fc9ec20
      13:37:13.471>3fc9ebd0:0x3fc9ec390x3fc9ed200x3fc9ed1f0x000000000x3fc9ebe40xffffffff0x3fc9ebe40x3fc9ebe4
      13:37:13.471>3fc9ebf0:0x000000000x3fc9ebf80xffffffff0x3fc9ebf80x3fc9ebf80x000000190x000001000x00000001
      13:37:13.471>3fc9ec10:0xf800ffff0x000000000xb33fffff0x000000000x726174730x657320740x6c6169720x0a0d0a0d
      13:37:13.471>3fc9ec30:0x64616f4c0x6e6f43200xd6bb45740xdd6ed98e0xc98062000xa27085730x61c086730x2015651e
      13:37:13.471>3fc9ec50:0xd5bd21f20xf1b7ad960x4bcfb1fb0xbbb7d28c0x742b06770x00c0d4380x148de0b30x290f20b1
      13:37:13.471>3fc9ec70:0x9dd5fdbc0xf9caedab0xb2ced7c20x94f5cd7b0x85f006020x912dd4850x24808a360x49a0b684
      13:37:13.471>3fc9ec90:0xefda7fb50xebdc9f3e0xdb51adfb0x4a4be5550x0bbf77800xdc0816640x8cc2bae00xf25cba45
      13:37:13.471>3fc9ecb0:0xdad212de0xdfc6ddbc0x47fb760b0x79f7ce1c0x174b0e900x59444a7f0x057e55f20x7f9a3149
      13:37:13.471>3fc9ecd0:0x03e19fdf0xfd56edfb0x9ef5e7d10x6374a9f10x312388990x86b587340x271c686c0x22a9b828
      13:37:13.471>3fc9ecf0:0x7dc227740xded5d77f0xc8f8f1bd0xe67f46110x8b4cd7000x083d016b0x2211bd2f0x282a18a1
      13:37:13.471>3fc9ed10:0xec157fcf0x19be09e70x8bf769250xe7ee8cb90xbaad56780x000000f80xabba12340x000000ec
      13:37:13.471>3fc9ed30:0x000001000x000001000x000000020x4038677c0x403862720x40385b660x403867200x40386704
      13:37:13.471>#00x4038677cinprvCheckItemFitsByteBufferat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:327
      13:37:13.471>#10x40386272inprvCopyItemByteBufat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:488
      13:37:13.471>#20x40385b66inprvGetItemByteBufat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:579
      13:37:13.471>#30x40386720inprvReturnItemByteBufat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:669
      13:37:13.471>#40x40386704inprvGetCurMaxSizeByteBufat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_ringbuf/ringbuf.c:747
      |

      I then tried to disable multiAP and hardcode the stations info in the
      relative header, as I saw something funky going on (there's probably a
      return missing in the setup), and instead I got this, which at least
      seem to be more explicit about what's going wrong:

      |13:21:57.228>[10742][E][esp32-hal-timer.c:190]timerBegin():Timernumber2exceedsavailablenumberofTimers.
      13:21:57.237>GuruMeditationError:Core0panic'ed(Loadaccessfault).Exceptionwasunhandled.
      13:21:57.237>13:21:57.237>Core0registerdump:
      13:21:57.237>MEPC:0x4202f38aRA:0x4200a138SP:0x3fc9e940GP:0x3fc8e40013:21:57.248>TP:0x3fc70d38T0:0x4005890eT1:0x00000000T2:0x0000000013:21:57.259>S0/FP:0x3fc96eacS1:0x3fc96d90A0:0x00000000A1:0x4038031613:21:57.259>A2:0x00000001A3:0x40380316A4:0x00000000A5:0x6000000013:21:57.270>A6:0xa0000000A7:0x0000000aS2:0x3fc97000S3:0x3fc96ef413:21:57.282>S4:0x3fcac4a8S5:0x3fcaa454S6:0x00000000S7:0x0000000013:21:57.292>S8:0x00000000S9:0x00000003S10:0x00000000S11:0x0000000013:21:57.292>T3:0x00000000T4:0x00000000T5:0x00000000T6:0x0000000013:21:57.303>MSTATUS:0x00001881MTVEC:0x40380001MCAUSE:0x00000005MTVAL:0x0000000113:21:57.315>MHARTID:0x0000000013:21:57.315>13:21:57.315>Stackmemory:
      13:21:57.315>3fc9e940:0x3fc970000x3fc96d900x3fc920000x4200bcc20x4202f6540x40389afc0x000000000xffffffff
      13:21:58.048>#00x3fc97000in??at/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_phy/src/phy_override.c:21
      13:21:58.048>#10x3fc96d90in??atsrc/main.cpp:143
      13:21:58.048>#20x4200bcc2insetup()atsrc/main.cpp:1575
      13:21:58.048>#30x4202f654inloopTask(void*)at/home/marco/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:41
      13:21:58.048>#40x40389afcin_prvTaskExitErrorat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:126
      13:21:58.048>(inlinedby)prvTaskExitErrorat/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port/riscv/port.c:140
      |

      The only thing that comes to mind is that I've used PRO2ESP32DRV8825
      as my profile base (changing the pinouts where necessary) instead of
      PRO2ESP32TMC2209XIAOC3, but when looking at all the places where the
      latter define is used, it doesn't look like there's anything major
      going on there that might explain this crash.

      I also know that the C3 has only two timers (hence the exception) and
      IIRC one of the timers is also used by the wifi, but if somehow the C3
      profile disabled some timer(s) I'd expect it to see underneath the
      relative ifdefs directives.

      Is the profile for PRO2ESP32TMC2209XIAOC3 actually working? Am I
      missing something?


      adding board support (XIAO ESP32-C3)
      https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/thread/8f7129c566/?limit=25#18d7


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
      www.avast.com

       
      • Marco Gulino

        Marco Gulino - 2024-08-14

        I see,

        The main change for the C3 is Serial and only 2 timers.

        I'd say that's the thing I'm missing... I couldn't find where you disabled the extra timer(s), where would that be? I looked in the code for where "PRO2ESP32TMC2209XIAOC3" is used, but couldn't see anything related to timers, mostly just the TMC stuff (which I don't need).
        Thank you!
        Marco

         
    • brownrb

      brownrb - 2024-08-14

      Not so sure that multiap is not working, it says
      13:37:12.155 > multiap connected successfully
      meaning it connected ok
      then you had a crash

      Next when you did specify the multip by hand (which i think was unnecessary) you got
      Timer number 2 exceeds available number of Timers.
      Thats an obvious one. The chip you are using only supports timers 0 and 1.
      And mysqm+ requires three timers to work

      Regards
      Robert

       

      Last edit: brownrb 2024-08-14
      • Eric Harant

        Eric Harant - 2024-08-14

        Hello Robert

        I've made a change, in the past, to use only 2 timer for the XIAO C3.

        Best regards

        Eric

        Le 14/08/2024 à 12:56, brownrb a écrit :

        Not so sure that multiap is not working, it says
        13:37:12.155 > multiap connected successfully
        meaning it connected ok
        then you had a crash

        Next when you did specify the multip by hand (which i think was
        unnecessary) you got
        Timer number 2 exceeds available number of Timers.
        Thats an obvious one. The chip you are using only supports timers 0 and 1.

        Regards
        Robert


        adding board support (XIAO ESP32-C3)
        https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/thread/8f7129c566/?limit=25#18d7/7154


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
        www.avast.com

         
  • brownrb

    brownrb - 2024-08-14

    *13:37:12.155 > multiap connected successfully
    13:37:12.160 > Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
    13:37:12.160 > *

    At this point the thing to do is run the exception decoder to generate a back trace on the code.
    That may give you the offending code

    Howeverm as I previously stated above in this thread
    And some of the S2/C3 also have issues running the Hardware timers required for the state machine. Hence any C3/S3 variations are NOT supported.

    Your complie environment should be
    // Firmware 310+
    //
    // Arduino IDE 1.8.19
    // Expressif ESP32 Core 2.0.16 https://github.com/espressif/arduino-esp32
    //
    // NOTE
    // DO NOT Update to ESP32 Core 3.0.0 or higher

    as noted in the about.h file.
    We will only migrate to core 3,x,x when all the bugs in those core versions are fixed. There are signification changes in the base IDF version, first in v4 and then the recent update to v 5, and so the arduino core v3xxx is still playing catchup mode to the changes in the underlying IDF updates . I beleive I posted this on one of the esp32 projects recently

    https://sourceforge.net/p/mysqmproesp32/discussion/general/thread/eb00bc100c/?limit=25&page=4#0831

    Also take note that the esp32 chip should have 2 cores, not 1. This project is a killer app for esp32 and requires twin cores to operate reliably.

    Regards
    Robert

     

    Last edit: brownrb 2024-08-14
    • Marco Gulino

      Marco Gulino - 2024-08-14

      Not so sure that multiap is not working, it says

      Sorry, I probably didn't express myself well... I didn't mean to imply it's not working, just that it's somehow polluting/confusing the stacktrace (I did notice something odd in the multiAP code, but it's probably unrelated. I'll have a better look later)

      Next when you did specify the multip by hand (which i think was unnecessary) you got

      I just tried to simplify the workflow and reduce the number of factors involved (which kinda worked, as I got a more readable stacktrace).

      And mysqm+ requires three timers to work

      Uh.. what's that? And can it be disabled?

      At this point the thing to do is run the exception decoder to generate a back trace on the code.
      That may give you the offending code

      I'm already running the exception decoder, that's why I see at least a partial stacktrace. I assume some parts are not decoded because it's either in parts of the code that is unreachable by the exception decoder, or perhaps the Serial logger doesn't print the whole thing (I've seen this before).

      And some of the S2/C3 also have issues running the Hardware timers required for the state machine. Hence any C3/S3 variations are NOT supported.

      I know.. but still, if a C3 is already in the current release, I wouldn't see why my variation wouldn't work, especially with most of the optional stuff disabled (I plan to run just the basic focuser, webserver, and possibly an i2c display. Nothing more).

      // DO NOT Update to ESP32 Core 3.0.0 or higher

      Great, that's something else I missed :) I'll give it a go!

       
      • Eric Harant

        Eric Harant - 2024-08-14

        Hi Marco,

        ESP32 C3 Supermini and Xiao ESP32 C3 have a some different pinout and
        GPIO usage.

        I sure I will be able to make it work but there is some work to do and I
        have not this board ( I have a lot but not this one)

        Le 14/08/2024 à 13:54, Marco Gulino a écrit :

        Not so sure that multiap is not working, it says
        

        Sorry, I probably didn't express myself well... I didn't mean to imply
        it's not working, just that it's somehow polluting/confusing the
        stacktrace (I did notice something odd in the multiAP code, but it's
        probably unrelated. I'll have a better look later)

        Next when you did specify the multip by hand (which i think was
        unnecessary) you got
        

        I just tried to simplify the workflow and reduce the number of factors
        involved (which kinda worked, as I got a more readable stacktrace).

        And mysqm+ requires three timers to work
        

        Uh.. what's that? And can it be disabled?

        At this point the thing to do is run the exception decoder to
        generate a back trace on the code.
        That may give you the offending code
        

        I'm already running the exception decoder, that's why I see at least a
        partial stacktrace. I assume some parts are not decoded because it's
        either in parts of the code that is unreachable by the exception
        decoder, or perhaps the Serial logger doesn't print the whole thing
        (I've seen this before).

        And some of the S2/C3 also have issues running the Hardware timers
        required for the state machine. Hence any C3/S3 variations are NOT
        supported.
        

        I know.. but still, if a C3 is already in the current release, I
        wouldn't see why my variation wouldn't work, especially with most of
        the optional stuff disabled (I plan to run just the basic focuser,
        webserver, and possibly an i2c display. Nothing more).

        // DO NOT Update to ESP32 Core 3.0.0 or higher
        

        Great, that's something else I missed :) I'll give it a go!


        adding board support (XIAO ESP32-C3)
        https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/thread/8f7129c566/?limit=25#38f6/e5bb


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
        www.avast.com

         
        • Marco Gulino

          Marco Gulino - 2024-08-14

          ESP32 C3 Supermini and Xiao ESP32 C3 have a some different pinout and
          GPIO usage.
          I sure I will be able to make it work but there is some work to do and I
          have not this board ( I have a lot but not this one)

          Thank you :)
          But if it's easier for you to remember where this third timer is disabled, I already have all the pinout reshuffled here locally.
          I'll try after work to see if I can spot it on my own as well, it's just a bit overwhelming given all the amount of optional configs in the codebase!

           
          • Marco Gulino

            Marco Gulino - 2024-08-14

            Got there in the end :)
            It looks like the issue is that in

            void init_task_timer() {
              //Serial.println("Tasktimer started");
              init_task_counters();
              // using a define in place of 2, the task timer did not start
              task_timer = timerBegin(2, 80, true);
            

            we need to use

              task_timer = timerBegin(0, 80, true);
            

            instead.

            Also, I noticed that the controller waits indefinitely for the serial port to be available, so the infinite loop in setup needs to be disabled, such as for the PRO2ESP32LOLINS2MINI board (or possibly, move it to a timed wait, timing out after a few seconds, I do the same in some of my projects).

            Both these changes should be addressed, as I would assume that the current release shouldn't work with the XIAOMI C3 either. If not done earlier, I will add them to my patch once I finish wrapping up my board support (if that's desired of course)

             
  • brownrb

    brownrb - 2024-08-17

    Hi

    I noticed that the controller waits indefinitely for the serial port to be available,

    It does not.
    Some esp32 newer models may not have a serial port. I wrote this code for myesp32 Dev module. So obviously because it has a serial port, it will exit the while loop as soon as the serial port has started.

    It will of course for a device that does not have a serial port the while will not exit. The while() associated with the serial port is standard practice in the Arduino world.

    void setup() {
    // serial port is used for runtime messages and debugging support
    Serial.begin(SERIALPORTSPEED);

    if (myboardnumber != PRO2ESP32LOLINS2MINI) {
    while (!Serial) {
    ;
    }
    }

    You can always add another board check here.
    if ( (myboardnumber != PRO2ESP32LOLINS2MINI) || (myboard_numer != PRO2ESP32TMC2209XIAOC3) ) {

    On the question of using #define, I use that with this controller code By using the defines, it removes code from compilation when that would fail or reference code it cannot call, because of the chip type or options chosen. Without that, the linked file to upload would be excessive and not fit in the space of the esp32, because every nearly every class would ned to be included and that blows up all of memory then some more. Obviously if I only supported 1 drive chip and 1 cpu type then there would be very few parts that would need to be excluded.

    Now that project mysqm+ update has been posted, and the myFP2 updates completed, I am now focuing on the next focuser update 313 but more likely to be higher as it gets ready for release.

    I am working my way through the code update for myesp32 focuser, and there are a lot of new stuff as well as all the fixes to be applied.

    Regards
    Robert

     
  • hans joggel

    hans joggel - 2025-07-17

    Hi all,
    I'm wondering if th esp32-c3 code is working. in the fdiscussion here it is unclear if it is functional or not. c3 support would realy be very attractive since it is just so much smaller than the normal devboard.

    further, can the aarduino Ide 2 be used or do i still need v1?

     
    • Marco Gulino

      Marco Gulino - 2025-07-17

      On Thu, 17 Jul 2025 at 16:28, hans joggel hansjoggel@users.sourceforge.net
      wrote:

      Hi all,
      I'm wondering if th esp32-c3 code is working. in the fdiscussion here it
      is unclear if it is functional or not. c3 support would realy be very
      attractive since it is just so much smaller than the normal devboard.

      It does, but some patching is required (mostly the timer thing).

      There's also the esp32-s3-zero with a similar footprint, and a bit less
      patching required (probably just the custom pinout if necessary)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.