Re: Port to M5Stamp-C3U

2022-12-09 Thread James Dougherty
That's sweet! I am updating an existing design from
ESP32-WROOM-32U-N4/platformio to ESP32-S3-WROOM-1U-N16/nuttx
so I got this new S3 board -
https://www.mouser.com/ProductDetail/356-ESP32S3DEVKTM1N8

I will have to try it out! Thank you!


On Fri, Dec 9, 2022 at 6:17 AM Sebastien Lorquet 
wrote:

> (Note that I did write "use" not port :p)
>
> I got it working very fast by reading all the provided docs! This was
> very well made this time, the level of support for this chip is very pro.
>
> I could even recompile the required second stage bootloader from source.
>
> It's fun that this bootloader requires a riscv32 toolchain whereas nuttx
> is compiled with another riscv64 toolchain!
>
> All that would remain to do is write a board config for the name
> "m5stamp-c3u" instead of "esp32c3-devkit" but I'm too lazy for that,
> sorry :p
>
> Sebastien
>
> Le 09/12/2022 à 13:14, Alan C. Assis a écrit :
> > Hi Sebastien,
> >
> > On 12/9/22, Sebastien Lorquet  wrote:
> >> Hi,
> >>
> >> As an introduction to the RISCV, I would like to use NuttX on my M5stamp
> >> C3U, which I can get for 8 dollars at a local store.
> >>
> >> https://docs.m5stack.com/en/core/stamp_c3u
> >>
> > This M5stamp C3U uses that ESP32-C3 that is already completely
> > supported on NuttX.
> >
> > So, if your plan was to do a port, you arrived too late in the party :-D
> >
> >> The module does not use a usb serial chip but direct USB connection
> >> (there is a schematic in the bottom of the page).
> >>
> > The USB serial on ESP32-C3 is already support on NuttX mainline too.
> >
> >> I wonder how it works: Is serial on USB supported by an internal
> >> bootloader or does this require firmware support that will disappear
> >> after I flash this board for the first time?
> >>
> > It doesn't require a firmware and normally will not require a host
> > driver because it is a generic USB CDC Serial internal.
> >
> > Espressif create a nice thing that all MCU should have: a USB Serial /
> > JTAG internally integrated in the chip.
> >
> > So, you don't need an external programmer neither an external
> > USB/Serial. Just a USB cable and you can program the chip and get a
> > console interface.
> >
> > You can get more info about it reading the "USB Serial/JTAG
> > Controller" chapter of the ESP32-C3 TRM.
> >
> > BR,
> >
> > Alan
>


Re: Port to M5Stamp-C3U

2022-12-09 Thread Alan C. Assis
Hi Sebastien,

On 12/9/22, Sebastien Lorquet  wrote:
> Hi,
>
> As an introduction to the RISCV, I would like to use NuttX on my M5stamp
> C3U, which I can get for 8 dollars at a local store.
>
> https://docs.m5stack.com/en/core/stamp_c3u
>

This M5stamp C3U uses that ESP32-C3 that is already completely
supported on NuttX.

So, if your plan was to do a port, you arrived too late in the party :-D

> The module does not use a usb serial chip but direct USB connection
> (there is a schematic in the bottom of the page).
>

The USB serial on ESP32-C3 is already support on NuttX mainline too.

> I wonder how it works: Is serial on USB supported by an internal
> bootloader or does this require firmware support that will disappear
> after I flash this board for the first time?
>

It doesn't require a firmware and normally will not require a host
driver because it is a generic USB CDC Serial internal.

Espressif create a nice thing that all MCU should have: a USB Serial /
JTAG internally integrated in the chip.

So, you don't need an external programmer neither an external
USB/Serial. Just a USB cable and you can program the chip and get a
console interface.

You can get more info about it reading the "USB Serial/JTAG
Controller" chapter of the ESP32-C3 TRM.

BR,

Alan


Re: Port to M5Stamp-C3U

2022-12-09 Thread Sebastien Lorquet

Hi,

OK I got the bootloading part figured out (eg, it shoud work because the 
esp32c3 has a serial bootloader mode in ROM that should support usb CDC, 
and I see a serial port by pushing the GPIO9 button while plugging it 
in), I will try to use my board as a esp32c3 devkit for now, it shoud be 
similar.


(later)

So the esp32c3-devkit:usbconsole configuration works on the m5stamp-c3u.

nsh> uname -a
NuttX 10.1.0-RC1 512be93c36 Dec  9 2022 12:32:21 risc-v esp32c3-devkit

Nice.

Sebastien


Le 09/12/2022 à 11:21, Sebastien Lorquet a écrit :

Hi,

As an introduction to the RISCV, I would like to use NuttX on my 
M5stamp C3U, which I can get for 8 dollars at a local store.


https://docs.m5stack.com/en/core/stamp_c3u

The module does not use a usb serial chip but direct USB connection 
(there is a schematic in the bottom of the page).


I wonder how it works: Is serial on USB supported by an internal 
bootloader or does this require firmware support that will disappear 
after I flash this board for the first time?


I ask this dumb question here because I know there are ESP32 people on 
this list.


Thanks for the help,

Sebastien