USB and COM port, it is flashed through one, but Serial works through the other in ESP32-S3

I have a Mac with an ARM chip and Arduino IDE 2.3.3, ESP32-S3-N16R8-WROOM-1, but when I try to load via the COM port it gives an error about "target RAM"(A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)), if I load the script via USB, I won't have work Serial. Also based on the boot data, my 16MB flash and 8MB RAM are not connected, since I have around 1KB available here and there, what should I do?

Sketch uses 311941 bytes (23%) of program storage space. Maximum is 1310720 bytes.
Global variables use 18928 bytes (5%) of dynamic memory, leaving 308752 bytes for local variables. Maximum is 327680 bytes.


I think all of this was triggered by the same problem, so I wrote this together.

I think this is related to programming, since there is most likely a problem with the ESP32-S3 settings

I changed UART to USB because I wrote it wrong at first

I don't use ESP32 based boards. But I did find in the past on this forum that for some ESP32 based boards you need to set the below to enabled if you want be able to send / receive serial data to / from a PC. So you can try that.

image

I have no idea about your memory question.

1 Like

What do you mean "COM" port?
You can only upload code via the USB-UART connection

1 Like

it has a name - COM port

Then do as @sterretje suggested

1 Like

the photo of post 5 looks like a

when programming it using the Arduino IDE I connect to the USB port labeled COM
EDIT: the IDE serial monitor works thru the COM port as well
the USB port labeled USB is for USB OTG applications

Tools>Board I used ESP32S3 Dev Board

1 Like

You showed me screenshot from Windows, it doesn't have such problems as in Mac where you get this error: A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)

see post #3

1 Like

Yes, and @sterretje, I was setting up it, but one thing confused me, according to the datasheet of CDC, it says: "You can now upload your sketch to the device. After flashing for the first time, you need to manually reset the device", so what should I do, if boot and rest has been already mentioned there in the previous steps?

https://docs.espressif.com/projects/arduino-esp32/en/latest/tutorials/cdc_dfu_flash.html

And problem with flash hasn't been solved, I tried to change Partion sheme to 8M with spiffs(I also have variant of ffat, but I do not know the meaning of Spiffs and ffat), if I choose ESP 16M SR, MCU gives error:
usage: esptool write_flash [-h] [--erase-all] [--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}] [--flash_mode {keep,qio,qout,dio,dout}] [--flash_size {detect,keep,256KB,512KB,1MB,2MB,2MB-c1,4MB,4MB-c1,8MB,16MB,32MB,64MB,128MB}] [--spi-connection SPI_CONNECTION] [--no-progress] [--verify] [--encrypt] [--encrypt-files <address> <filename> [<address> <filename> ...]] [--ignore-flash-encryption-efuse-setting] [--force] [--compress | --no-compress] <address> <filename> [<address> <filename> ...] esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: ...

changing my Tools>Board settings to match yours in post 1 as soon as I set Flash Size "16MB (128MB)" the code appears to load OK but crashes when I hit reset

serial monitor crash report

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x109c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xb50
load:0x403cc700,len:0x2fe4
entry 0x403c98ac
E (88) spi_flash: Detected size(8192k) smaller than the size in the binary image header(16384k). Probe failed.

assert failed: do_core_init startup.c:350 (flash_ret == ESP_OK)


Backtrace: 0x403762be:0x3fceb170 0x4037b021:0x3fceb190 0x40380149:0x3fceb1b0 0x420091aa:0x3fceb2e0 0x403765c7:0x3fceb310 0x403cdb0e:0x3fceb340 0x403cdea5:0x3fceb380 0x403c9919:0x3fceb4b0 0x40045c01:0x3fceb570 0x40043ab6:0x3fceb6f0 0x40034c45:0x3fceb710




ELF file SHA256: 8ea79edc0b4231c7

E (160) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
E (168) esp_core_dump_elf: Elf write init failed!
E (172) esp_core_dump_common: Core dump write failed with error=-1
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)

Flash size 4MB or 8MB loads and runs OK

try changing your flash size setting?

When I have 16 mb in that setting, it doesn’t give any errors, but it doesn’t add space either, I had problems with the Partion sheme. As I understand it (your error is not familiar to me, I have never encountered it) is due to the fact that you have N8R8( (88) spi_flash: Detected size(8192k) smaller than the size in the binary image header( 16384k). Probe failed.), but I have an N16R8 in which these 16 are not used exactly the same as 8MB RAM.

And also @sterretje and @jim-p, however, the appearance of the Serial monitor does not solve the problem of memory (I still don’t understand what they said in espressif about “manually reset” and now Serial works for me, but when I disconnect the ESP32-S3 and connect it after a while to load a new script, it requires reset and boot due to a verify and serial data recieved error, what do I need to do?),
so it’s better to ask a separate question about memory.

You can program or upload code to those ESP32S3 Dev boards either through the port labeled USB or COM\UART.

The COM\UART port is easier to use, less messing about getting to see the Serial output in the Serial Monitor.

It doesn't work with Macs

@jim-p , @horace , @sterretje, @srnet, so does anybody know how to solve problem with reset and boot and the meaning of "manually reset" in espressif docs?

I don't have an S3 a Mac or IDE 2.3.3

I have a couple of S3's and Windows and Linux hosts which work OK but no MAC
no idea what "manually reset" is

Got a esp32s3 cam, only ever used the uart to upload, never had any issues..
I don't erase all flash before uploading, so you could try disabling that..
A quick google search..
Looks like you are having a driver issue and seems to be affecting mostly macs..
Don't have a mac so won't be much help, sorry..
But if your port shows up as usbmodem, that's probably the issue..

there's a few hits on the board here too..

good luck.. ~q

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.