ducalex / retro-go

Retro emulation for the ODROID-GO and other ESP32 devices
GNU General Public License v2.0
489 stars 114 forks source link

Building for a custom board #89

Closed metanav closed 10 months ago

metanav commented 10 months ago

I am trying to build the launcher+prboom-go firmware for the target Nano ESP32 (ESP32-S3, 8MB PSRAM, 16 MB Flash) and an Adafruit ILI9341 LCD shield. I used the esplay-s3 target and have modified pins in the file components/retro-go/targets/esplay-s3/config.h.

$ ./rg_tool.py --target esplay-s3 build-img prboom-go
$ esptool.py --chip esp32s3 write_flash   --flash_size detect   0x00  retro-go_1.39-pre-dirty_esplay-s3.img

Here is the log that was displayed during the flashing process.

esptool.py v3.3.4-dev
Found 2 serial ports
Serial port /dev/cu.usbmodem142101
Connecting....
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 34:85:18:7a:e0:3c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00000000 to 0x0019ffff...
Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings.
Compressed 1703936 bytes to 1062813...
Wrote 1703936 bytes (1062813 compressed) at 0x00000000 in 12.9 seconds (effective 1054.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

The board continues to reboot despite successful firmware flashing. The serial console displays an error message.

Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40048839
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff

Did I miss any configuration or steps to build for my DIY custom setup?

metanav commented 10 months ago

It is fixed now. I had to change the bootloader.bin address from 0x1000 to 0x00 for ESP32S3 in the image build script.