avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory corruption (?) I don't understand


From: BERTRAND Joël
Subject: Re: Memory corruption (?) I don't understand
Date: Wed, 23 Jun 2021 13:44:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.7.1

Senthil Kumar a écrit :
> What version of the compiler are you using?

        I have seen this bug with Debian compiler :

hilbert:[~] > avr-gcc -v
Using built-in specs.
Reading specs from /usr/lib/gcc/avr/5.4.0/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/5.4.0/lto-wrapper
Target: avr
Configured with: ../gcc/configure -v --enable-languages=c,c++
--prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man
--bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib
--enable-shared --with-system-zlib --enable-long-long --enable-nls
--without-included-gettext --disable-libssp --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=avr CFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong -Wformat ' CPPFLAGS='-Wdate-time
-D_FORTIFY_SOURCE=2' CXXFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong -Wformat ' FCFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong' FFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong' GCJFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong' LDFLAGS=-Wl,-z,relro OBJCFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong -Wformat ' OBJCXXFLAGS='-g -O2
-fdebug-prefix-map=/build/gcc-avr-Q3AFj7/gcc-avr-5.4.0+Atmel3.6.2=.
-fstack-protector-strong -Wformat '
Thread model: single
gcc version 5.4.0 (GCC)

        I have tried to build another compiler from scratch :
hilbert:[~] > /usr/local/cross/avr/bin/avr-gcc -v
Using built-in specs.
Reading specs from
/usr/local/cross/avr/lib/gcc/avr/11.1.0/device-specs/specs-avr2
COLLECT_GCC=/usr/local/cross/avr/bin/avr-gcc
COLLECT_LTO_WRAPPER=/usr/local/cross/avr/libexec/gcc/avr/11.1.0/lto-wrapper
Target: avr
Configured with: /usr/local/cross/build/avr/src/gcc/configure
--build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
--target=avr --prefix=/usr/local/cross/avr
--exec_prefix=/usr/local/cross/avr
--with-local-prefix=/usr/local/cross/avr/avr
--with-headers=/usr/local/cross/avr/avr/include --with-newlib
--enable-threads=no --disable-shared --with-pkgversion='crosstool-NG
1.24.0.349_6d00833' --disable-__cxa_atexit --disable-libgomp
--disable-libmudflap --disable-libmpx --disable-libssp
--disable-libquadmath --disable-libquadmath-support
--with-gmp=/usr/local/cross/build/avr/buildtools
--with-mpfr=/usr/local/cross/build/avr/buildtools
--with-mpc=/usr/local/cross/build/avr/buildtools
--with-isl=/usr/local/cross/build/avr/buildtools --enable-lto
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic
-lm' --enable-target-optspace --disable-nls --enable-multiarch
--enable-languages=c
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.0 (crosstool-NG 1.24.0.349_6d00833)

        .S I have uploaded were compiled with 11.1.0.

> Can you make a reduced
> testcase containing just the LDL_MAC_otaa function?

        Firmware I have sent is a minimal example. Of course, a lot of code is
compiled but is not executed. This code only initializes real board and
sents a packet to my LoRaWAN base station.

        Regards,

        JKB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]