ESP32 board support


#1

How can I use ESP32 with XOD?


#2

Try to add the https://dl.espressif.com/dl/package_esp32_index.json URL to:

C:\Users\You\xod\__packages__\extra.txt

Then restart IDE and hit Deploy → Upload to Arduino → Refresh boards list


#3

Thx a lott!
Before restarting IDE we shall manualy download json file to packages dir. Otherwise there will be an error.


#4

Ah made a mistake to open the subject, I answer here.
The compilation error can be due to an error when selecting the pin, for the configuration with correct see pins_arduino.h
C:\Users*User*\Documents\Arduino\hardware\espressif\esp32\variants\ ( you board)

Example: LED_BUILTIN = 2 , declare D2

    if (!isValidDigitalPort(port)) {
        emitValue<output_ERR>(ctx, 1);
        return;
    }

If the port is not correct, it returns error

error: ‘::analogWrite’ has not been declared
::analogWrite(port, val);
^

it may be the correct pin


#5

Hi.
I make static port to 2 in pwm-write:

::pinMode(port, OUTPUT);
::analogWrite(2, val);
emitValue<output_DONE>(ctx, 1);

And have same error:

C:\Temp\xod_temp_sketchbook2a0njU\xod_1544168735833_sketch\xod_1544168735833_sketch.ino: In function ‘void xod::xod__gpio__pwm_write::evaluate(xod::xod__gpio__pwm_write::Context)’:
C:\Temp\xod_temp_sketchbook2a0njU\xod_1544168735833_sketch\xod_1544168735833_sketch.ino:1108:5: error: ‘::analogWrite’ has not been declared
::analogWrite(2, val);
^

Error: exit status 1
Compilation failed.

Now i think maybe mistake that this is not analog port? Because there is no analog ports on ESP32.


#6

Now I create clean patch. Error on upload:

Uploading compiled code to the board…
No new serial port detected.

usage: esptool write_flash [-h] [–flash_freq {keep,40m,26m,20m,80m}]
[–flash_mode {keep,qio,qout,dio,dout}]
[–flash_size FLASH_SIZE]
[–spi-connection SPI_CONNECTION] [–no-progress]
[–verify] [–compress | --no-compress]
[ …]
esptool write_flash: error: argument : [Errno 2] No such file or directory: ‘C:\Temp\xod_temp_sketchbook2a0njU\xod_1544169358487_sketch/xod_1544169358487_sketch.esp32.esp32.esp32.partitions.bin’

Error: exit status 2
Error during upload.
Upload failed
Command C:\Program Files\XOD IDE\resources\arduino-cli.exe --config-file=C:\Temp\arduino-cliFDxphp\.cli-config.yml upload --fqbn esp32:esp32:esp32:UploadSpeed=115200 --port COM13 --verbose -t C:\Temp\xod_temp_sketchbook2a0njU\xod_1544169358487_sketch failed with code 1
Make sure the board is connected, the cable is working, the board model set correctly, the upload port belongs to the board, the board drivers are installed, the upload options (if any) match your board specs.


#7

you must change the port in the node inspector., do not need to change the C ++ code

the vast majority of the pins are analog-digital

Change the speed to 921600, it could also be that XOD is not compatible


#8

Hi gilyazov
I have been looking into the ESP32 for a while now and I have tried a lot of different things. Zod can compile the code perfectly fine but it seems to have issues uploading still. If you export the code into the Arduino IDE and compile and upload you should have less problems. That said some of the code that is used in incorporating external libraries into Zod does not seem to be compatible with the ESP32 compiler.
The ESP32 libraries for Arduino are still very young and a lot of not been implemented yet.