mongoose-os / mos

The Mongoose OS Command Line Tool - https://mongoose-os.com/docs/mongoose-os/quickstart/setup.md
Other
45 stars 31 forks source link

Add bootloader stub generator for ESP32-C3 #70

Closed duncandrennan closed 2 years ago

duncandrennan commented 2 years ago

@rojer

I managed to get the stub code for the ESP32-C3 to compile and generate a stub. I have no idea whether this will work - it will definitely need a review.

duncandrennan commented 2 years ago

Noting that https://github.com/torvalds/linux/blob/master/include/uapi/linux/elf-em.h lists

#define EM_RISCV 243 /* RISC-V */

so the 0xf3 is correct in wrap_stub.py

rojer commented 2 years ago

looks reasonable overall but you should make sure it works. i suggest using mos flash-read and mos flash-write to read and write flash, while we cannot yet generate working firmware.

duncandrennan commented 2 years ago

I'll work towards that as the next step.

rojer commented 2 years ago

ok, cool