If I remember correctly CONFIG_RAM_SIZE is not used for ESP32. And it was
supposed to be set to 0 to avoid confusion.

For ESP32 only the heap is a bit messed up. Many agents poke holes inside
the SRAM space for their own use. You can check
https://github.com/apache/nuttx/blob/master/arch/xtensa/include/esp32/memory_layout.h
And when SMP is enabled:
https://github.com/apache/nuttx/blob/master/boards/xtensa/esp32/esp32-devkitc/src/esp32_boot.c#L92

Things are better with the ESP32S2&S3 and ESP32C series.

On Fri, Apr 26, 2024 at 5:25 AM Bernd Walter <ti...@cicely7.cicely.de>
wrote:

> On Thu, Apr 25, 2024 at 09:36:25PM -0300, Alan C. Assis wrote:
> > Hi Bernd,
> >
> > You can use 320KB only if you don't need to use WiFi and BLE.
> >
> > The memory is used but the WiFi/BLE driver!
> >
> > Do you remember the old days where your video card used to eat your main
> > memory and you should define in the BIOS how much memory the video card
> > will use?
> >
> > Same thing here! ;-)
>
> 200k is a lot.
> Interestingly I started with the ethernet setup and my intention was
> ethernet
> only, but in the meantime I do need wifi as well.
> Anyways, ethernet is started and wifi compiled in as well.
> There was a problem (in my old nuttx codebase at least) that the ESP32_emac
> code didn't like to be compiled with CONFIG_ARCH_PHY_INTERRUPT, which the
> wifi enable enforced.
> I dissabled that in the esp32_emac code.
>
> However, I have ethernet started and wifi compiled in, but not started and
> that's my meminfo:
>            total       used       free    largest  nused  nfree
> Umem:     230384      19120     211264     12995
>
> So some RAM must have been added somewhere else.
>
> >
> > Best Regards,
> >
> > Alan
> >
> > On Thu, Apr 25, 2024 at 8:59 PM Bernd Walter <ti...@cicely7.cicely.de>
> > wrote:
> >
> > > The original ESP32 is said to have 320k RAM.
> > > All board configs have the following:
> > > CONFIG_RAM_SIZE=114688
> > >
> > > Are RAM sections added later in the startup process or is there another
> > > reason?
> > >
> > > --
> > > B.Walter <be...@bwct.de> https://www.bwct.de
> > > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
> > >
>
> --
> B.Walter <be...@bwct.de> https://www.bwct.de
> Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
>

Reply via email to