egos-2000 icon indicating copy to clipboard operation
egos-2000 copied to clipboard

Can it run on ESP32-C3 a RISC V chipset?

Open gshiva opened this issue 2 years ago • 5 comments

Can it run on https://www.espressif.com/en/products/socs/esp32-c3 ?

From the website

ESP32-C3 is a single-core Wi-Fi and Bluetooth 5 (LE) microcontroller SoC, based on the open-source RISC-V architecture. It strikes the right balance of power, I/O capabilities and security, thus offering the optimal cost-effective solution for connected devices. The availability of Wi-Fi and Bluetooth 5 (LE) connectivity not only makes the device's configuration easy, but it also facilitates a variety of use-cases based on dual connectivity.

gshiva avatar May 20 '23 23:05 gshiva

Thanks for the pointer. I take a look at the document of ESP32C3 and I feel that it is possible to port egos-2000 on it. It has enough memory and flash storage.

yhzhang0128 avatar May 21 '23 04:05 yhzhang0128

@yhzhang0128 thanks for the prompt reply. Just plug it in and upload the code? Any guidance would be greatly appreciated

gshiva avatar May 21 '23 04:05 gshiva

I think it could take some time to port egos-2000 to ESP32-C3. The key is to adjust the memory regions for this processor. I could image the following needs to be done.

  1. Put the earth layer to the 384 KB ROM
  2. Put the 4MB disk image to the embedded flash
  3. Adjust other memory regions into the 400 KB SRAM.

In order to do this, you will need to read and modify

  1. All the lds files in this repo
  2. The memory map defined here: https://github.com/yhzhang0128/egos-2000/blob/main/library/egos.h#L53

It is a good exercise though. I went through the exercise myself with several months when I played with the Arty board.

yhzhang0128 avatar May 21 '23 04:05 yhzhang0128

This is very helpful. Is there a way to test it using a ESP32-C3 emulator?

gshiva avatar May 22 '23 06:05 gshiva

When I played with SiFive FE310, the chip company, SiFive, provides an open-sourced QEMU patch that I can use for emulation. I guess you may need to see whether the company producing ESP32-C3 provides something similar.

yhzhang0128 avatar May 22 '23 06:05 yhzhang0128