Re: ESP32 (classic) RAM size question

2024-04-29 Thread Sebastien Lorquet
Hi, Random hangs can be related to insufficient stack sizes. Stack size requirements are sometimes surprising and the most unexpected. NuttX defaults are sometimes quite small and dont include size variations for different CPU architectures. Also, there are tons of stack size parameters,

Re: ESP32 (classic) RAM size question

2024-04-27 Thread Bernd Walter
On Fri, Apr 26, 2024 at 09:17:30PM +0200, Bernd Walter wrote: > On Fri, Apr 26, 2024 at 07:58:00PM +0200, Tomek CEDRO wrote: > > Can you please elaborate more on why / how system hangs? I've found two bugs in my http code related to that. I have had random hangs when doing a ping, however,

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Bernd Walter
On Fri, Apr 26, 2024 at 07:58:00PM +0200, Tomek CEDRO wrote: > Can you please elaborate more on why / how system hangs? Nothing I can easily answer. I have a complex codebase for a custom SAM4X board that I ported over to a custom ESP32 board. As part of that there is running HTTP code that I

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Tomek CEDRO
Can you please elaborate more on why / how system hangs? Do you know the cause? Does that happen only with your firmware or clean examples too? How often hangs happen? Do you get any sort of traces or device just gets unresponsive? What NuttX version do you work on? I also experience random

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Bernd Walter
On Fri, Apr 26, 2024 at 11:01:20AM -0300, Alan C. Assis wrote: > Yes, Abdelatif is right, I think only Bluetooth requires a reserved area of > the RAM. > > For WiFi the driver itself on the NuttX kernel is enough. > > Currently there is no support to direct boot on ESP32 (to avoid using the >

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Alan C. Assis
Yes, Abdelatif is right, I think only Bluetooth requires a reserved area of the RAM. For WiFi the driver itself on the NuttX kernel is enough. Currently there is no support to direct boot on ESP32 (to avoid using the bootloader), only ESP32-C3 and newer chips have support for it. Best Regards,

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Abdelatif Guettouche
200KB should be the remaining SRAM size. BLE uses 32KB of SRAM. I don't remember Wifi having a fixed carevout in SRAM. Then there are other areas used by the ROM bootloader that can be revoked once the system has fully booted. On Fri, Apr 26, 2024 at 2:22 PM Nathan Hartman wrote: > I

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Nathan Hartman
I recommend to add a comment there, to explain that although the board has 320KB in total, ~200KB is used for WiFi and BLE. On Thu, Apr 25, 2024 at 8:36 PM 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

Re: ESP32 (classic) RAM size question

2024-04-26 Thread Abdelatif Guettouche
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

Re: ESP32 (classic) RAM size question

2024-04-25 Thread Bernd Walter
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

Re: ESP32 (classic) RAM size question

2024-04-25 Thread Alan C. Assis
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! ;-)

ESP32 (classic) RAM size question

2024-04-25 Thread Bernd Walter
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 https://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.