Why I have issue using arduino portable version with esp32 boards only? - compilation

I am trying portable arduino ide, following this tutorial :
https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE
if I compile empty sketch for arduino AVR boards, it works, but if I do that for esp32 boards, I have this issue :
c:\users\pasca\downloads\arduino-1.8.19-windows\arduino-1.8.19\portable\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32-elf\include\c++\8.4.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
I specify that I had add esp32 boards from :
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
I tried with arduino sam board and it is ok.
The empty sketch is :
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
arduino uno compile
esp32 compile with portable version
esp32 compile with "normal" version
Thanks for help

try to run Arduino IDE AS administration
and in the border choice ==> ESP32 DEV MODE

Related

ESP 32 Flash Download Tool showing SPIFFS partition not found

I have created a custom code for ESp32 in Arduino IDE. I flashed the program directly from IDE using UART with the help of TTL. I'm looking for an alternative method to flash the firmware of ESP32.
I'm trying to flash the esp32 binary file generated from Arduino IDE, using the flash downloader tool.
https://www.espressif.com/en/support/download/other-tools
I have used the configuration settings as follows
This settings flashed the firmware and the board reset worked perfectly. The SPIFFS did not however work.
Please find the log attached.
Also attached the reset log after flashing for reference
Thanks for the help.

Is there any simulator for ESP32-S2 or ESP32 chips?

I am working on an esp project and compiled my code by using the esp32s2 toolchain and created a binary that ready to run on a real device. But I don't have a real device to test my binary. Is there any simulator to simulate the ESP32-S2 chip or the ESP32 chip?
You can use Wokwi to simulate the ESP32, and soon also the ESP32-S2.The Wokwi is a free online simulator for electronics, and it runs in your browser. This means you can simulate code that interacts with 3rd-party sensors, display modules, LEDs and many other common parts. There's also initial support for WiFi simulation, and the developers are working on extending it to support connecting to any host on the internet (e.g. HTTPS/MQTT)
Simulator Examples
Arduino Examples
Blink
Seven segment counter
APA102 Color Cycles (TinyPico Board)
WiFi Scanning
MicroPython Examples
SSD1306 Example
NeoPixels
WiFi Scanning
ESP-IDF Examples
The following examples use the ESP-IDF functions. They are compiled using Arduino ESP32 Core:
Blink using FreeRTOS API
Binary LED counter using FreeRTOS tasks
GPIO button input + interrupts
https://docs.wokwi.com/guides/esp32
You can try QEMU from https://github.com/espressif/qemu or https://github.com/Ebiroll/qemu_esp32
Not sure if they are supporting ESP32-S2, but it seems to be working with ESP32.

which esp32 board should I select for "ESP32-S" in platformio?

I just bought an ESP32-S, which looks like this : https://99tech.com.au/product/esp32-s-ai/, except the one I bought only have the writing "ESP32-S" and the espressif symbol instead of AI thinker symbol.
I have been searching the internet for a week for a specific tutorial for this "board" and found nothing.
what I have found is mostly that there is ESP32, ESP32-S2, ESP32 WROOM, ESP32 WROVER... but which one is my esp32-S? is it the same with esp32 or is it the esp32 wroom or something else? if I am going to program this using platformio, which board should I pick? or does it matter which board?
thank you in advance
Try the "Espressif ESP32 Dev Module" it works for me with the Arduino framework. My chip has ESP32-WROOM-32D but it says ESP32-S on the back of the board.
It appears to be compatible with the ESP32 WROOM module.

How can i use Arduino uno as stand alone Atmega328p MCU?

I want to use debugger which is provided my atmel studio to walk through my program which i want to write in assembly or c but not in arduino script language.
P.S: i don't want to use visual micro because i tried it already but it doesn't go through my assembly code
The Arduino Uno exposes the RESET pin, which is all that is needed for a debug connection via debugWIRE. Alternatively, JTAG debugging requires (IIRC) the SPI and RESET pins, which are conveniently broken out via the ICSP header.

Missing serial port with SparkFun's Arduino Pro Micro and Atmel Studio

This is the same question that I've posted on the Arduino Forums, as there could be someone here who could help me :)
I'm using an Arduino Pro Micro 3.3V/8MHz from SparkFun for a project. I've installed the drivers, added support for the board on the IDE and tried uploading a sketch to it - it worked okay. I realize that the bootloader shipped with the board emulates a distinct serial port for uploading, as the normal port is COM5 and the upload port is COM6. Though for this project, code optimization is paramount, so I moved on to the Atmel Studio which I had already used successfully with the UNO. I constructed a simple blinky code for the Micro using the registers and functions:
#define ledpin PC6
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRC |= (1 << ledpin);
while(1)
{
PORTC |= (1 << ledpin);
_delay_ms(1000);
PORTC &= ~(1 << ledpin);
_delay_ms(1000);
}
}
I can upload it okay through Atmel Studio with the following command in avrdude:
C:\Program Files (x86)\Arduino\hardware/tools/avr/bin/avrdude -C"C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf" -v -v -patmega32u4 -cavr109 -P\\.\COM6 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i
To be able to do this, I have to press the reset button twice in less than 750 ms, as the hookup guide sugests (https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq#ts-reset).
The code works, but now I notice that the normal serial port (COM5) never comes back. What could be the cause? I can still upload new code to the Micro, so the bootloader should be okay right?
Thanks for the help in advance :)
I have sort of found the solution. As I posted on the Arduino forums:
I was able to revert the pro micro to the state it was delivered to me by SparkFun.
To do that, I used an Arduino Uno as ISP (with the ArduinoISP example) connected to the MISO, MOSI, SCLK and RST pins of the Micro and uploaded the bootloader through the Arduino IDE. At first, I got an error that read:
avrdude: verification error, first mismatch at byte 0x0000 0xfe != 0xce
Then, I went looking into how to set the fuse bits on the Pro Micro when I realized the boards.txt specifies the fuse bits to be used. All I had to do was change the "extended_fuses=0xfe" to "extended_fuses=0xce", restart the IDE and retry the bootloader upload. At last, success!
To test it, I wrote a simple UART "Hello world" application in the IDE, which worked flawlessly.
When uploading the bootloader, make sure you have the correct board selected (SparkFun 3.3V/8MHz) and select the COM port of the ISP Arduino.

Resources