Hi All;

    From the discussion the reason for CONFIG_DEBUG_NOOPT to fail is already known. Is this true?

Confused and ignorant
Bill Rees

On 9/18/2023 8:55 AM, Tiago Medicci Serrano wrote:
Hi Mike,

NuttX + Espressif's SoCs are intended to be built with optimization
enabled. Otherwise, few practical applications would be possible and you'd
need to reconsider stack sizes, for instance. So, please don't disable
optimization while building practical applications.

Usually, it isn't needed to disable optimization to debug the code, but If
you really need to turn it off to debug a specific function, consider using
the attribute `__attribute__((optimize(0)))`.

Best regards,

Em seg., 18 de set. de 2023 às 12:05, Alan C. Assis <acas...@gmail.com>
escreveu:

Hi Mike,

I remember facing similar issue with ESP32 in the past.

Because I started using NuttX with ARM chip and in the past the GCC
toolchain has some issue with you are trying to compile debug symbols
(-g) and optimization enabled (-O2) I always disabled optimization
while enabling debugging. (Fortunately those day are gone, currently
gcc for ARM Cortex chips work fine with -g and -O2 at same time).

So when I started working with Xtensa I replicated this same behavior,
disabling the optimization and enabling the debug. So it started to
fail.

So some friends with more experience in Xtensa instructed me to just
use the -g and -O2 at same time. And I never investigate further about
it.

Probably this same issue will happen on ESP-IDF (just guessing, I
didn't check it). I think it could be a good place to start your
investigation.

BR,

Alan

On 9/18/23, Mike Moretti <nu...@mordent.com.invalid> wrote:
Hi,

I'm using NuttX 12.2.1 with ESP32S3 and have been trying for days to
figure out why it crashes on boot with our custom board/app.  It turns
out that turning off CONFIG_DEBUG_FULLOPT and turning on
CONFIG_DEBUG_NOOPT is what's causing my issue (via menuconfig).  The
default from all the other esp32s3 configurations has FULLOPT on and
NOOPT off.  So, to verify it wasn't just in our custom board/app, I
tried this on the default esp32s3-devkit:wifi configuration, and IT DID
THE SAME THING, it crashes!  This is the second time I've had an issue
with random configuration settings causing the nuttx code to crash
arbitrarily.  (The first was enabling CONFIG_DEBUG_ASSERTIONS for esp32
doing the same thing, which I previously posted about).

What the heck is going on?  Is the esp32/s3 port really this unstable?

-m



Reply via email to