avr-libc-dev
[Top][All Lists]
Advanced

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

Something wrong somewhere


From: BERTRAND Joël
Subject: Something wrong somewhere
Date: Thu, 17 Jun 2021 15:31:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.7.1

        Hello,

        I'm trying to use a LoRa module on an ATmega1284 MPU and in an
pre-existant firmware.

        This firmware ran loke a charm before I have tried to use this module.
MPU reboots in LDL_MAC_otaa(&mac) from lora_device_lib library :

=================
 Systella L100-A
=================

Booting firmware 2021061711
SPI initialized
Reset LORA
Reset LORA done
LoRaWAN 1.1
Initialization SX1262
Initialization SX1262 done
0004A30B0013EF57
MAC initialization
cb type=11
write
end write
MAC initialization done
tentative d'accès au lambda8
read
end read
après tentative d'accès au lambda8
13
22 00 00
lora_send
write
end write
write
end write
write
end write
write
end write
write
end write
write
end write
read
end read
write
end write
write
end write
cb type=0
LDL_MAC_ready
LDL_MAC_otaa

=================
 Systella L100-A
=================

Booting firmware 2021061711
SPI initialized
Reset LORA
Reset LORA done
LoRaWAN 1.1

        I have tried to find a memory corruption on real hardware without
success. Simavr crashes in the same function and gives more information :

(gdb) bt
#0  0x00009334 in LDL_MAC_otaa () at /usr/lib/avr/include/util/atomic.h:71
#1  0x00003184 in lora_send (frame=0x8009ba "coucou") at lorawan.c:344
#2  0x00013e92 in main () at main.c:464

        OK. I have restarted this program in gdb with a breakpoint @lora_send.

(gdb) file firmware.elf
Reading symbols from firmware.elf...
(gdb)
(gdb) target remote :1234
Remote debugging using :1234
0x00000000 in __vectors ()
(gdb) break lora_send
Breakpoint 1 at 0x3164: file lorawan.c, line 345.
Note: automatically using hardware breakpoints for read-only addresses.
(gdb)

        When I execute program step by step, I see that LDL_MAC_ready(&mac) (in
lorawan.c:329) directly calls

static __inline__ void __iRestore(const  uint8_t *__s)

in /usr/lib/avr/include/util/atomic.h.

        Why ? I suppose I have done a mistake somewhere, but where...

        Firmware to reproduce this issue is downloadable at
https://hilbert.systella.fr/public/firmware.tar.gz

        Help will be welcome,

        JB



reply via email to

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