rt thread版本4.1.0
使用paho mqtt软件包
运行一段时间后出现
psr: 0x21000000
r00: 0x5036fc8f
r01: 0x5036fc88
r02: 0x00000000
r03: 0x5036fc8f
r04: 0x00000007
r05: 0x00000063
r06: 0x00005f70
r07: 0x2001f1d8
r08: 0xdeadbeef
r09: 0xdeadbeef
r10: 0xdeadbeef
r11: 0xdeadbeef
r12: 0xffffffff
lr: 0x0804f0ab
pc: 0x0802086e
hard fault on thread: mqtt0
thread pri status sp stack size max used left tick error
-------- --- ------- ---------- ---------- ------ ---------- ---
mqtt0 10 running 0x0000023c 0x00002000 16% 0x00000001 000
mtimeout 23 suspend 0x000000b0 0x00000800 36% 0x0000005f 000
umqtt 13 ready 0x000002b0 0x00000800 55% 0x00000017 000
can_jk 14 suspend 0x00000144 0x00000264 54% 0x0000005f 000
can_mqd 5 suspend 0x00000138 0x00000400 30% 0x00000064 000
bmq_task 9 suspend 0x000000b4 0x000005f4 13% 0x00000063 000
tle 12 suspend 0x00000160 0x000005f4 59% 0x00000058 000
sht20 26 suspend 0x00000134 0x00000320 79% 0x00000062 000
rgbled 25 suspend 0x000000b0 0x0000012c 58% 0x00000063 000
myfal 28 suspend 0x000000ac 0x00000514 78% 0x00000033 000
rfidseri 13 suspend 0x000000c8 0x000005f4 35% 0x00000061 000
music_wa 25 suspend 0x000000b8 0x000005f4 12% 0x0000005f 000
mbussend 7 suspend 0x000000ac 0x00000200 46% 0x00000064 000
u4mbusse 8 suspend 0x00000134 0x00000400 30% 0x00000002 000
lcdd 16 suspend 0x000001b0 0x000004b0 80% 0x0000001f 000
lcd_seri 25 suspend 0x000000a4 0x0000012c 54% 0x00000007 000
csbsampl 6 suspend 0x00000134 0x000005f4 20% 0x00000063 000
cput 16 suspend 0x000000b4 0x00000400 17% 0x0000005d 000
modbusin 12 suspend 0x000000ac 0x00000200 46% 0x00000057 000
mbusseri 21 suspend 0x00000134 0x00000400 33% 0x00000002 000
at24c 12 suspend 0x000000ac 0x00000400 51% 0x0000005b 000
aii 16 suspend 0x000000f0 0x00000400 26% 0x00000063 000
ai_seria 25 suspend 0x000000a4 0x00000200 32% 0x0000000a 000
tshell 20 suspend 0x00000144 0x00001000 08% 0x00000009 000
acon 9 suspend 0x00000114 0x00000800 13% 0x00000064 000
telnet 26 suspend 0x000001fc 0x00000800 39% 0x00000064 000
syswatch 0 suspend 0x000000a8 0x00000320 61% 0x0000000d 000
sys work 23 suspend 0x00000084 0x00000800 64% 0x00000001 000
tcpip 10 suspend 0x000000f8 0x00000800 39% 0x00000010 000
etx 12 suspend 0x000000b4 0x00000400 17% 0x0000000b 000
erx 12 suspend 0x000000c4 0x00000400 50% 0x00000003 000
tidle0 31 ready 0x00000060 0x00000100 62% 0x00000005 000
timer 4 suspend 0x000000b0 0x00000200 34% 0x00000009 000
main 10 suspend 0x00000140 0x00000800 41% 0x00000009 000
FPU active!
bus fault:
SCB_CFSR_BFSR:0x82 PRECISERR SCB->BFAR:5036FC88
更改这里为2048后出问题的概率更高了
继续搜索RT_PIPE_BUFSZ,发现根本就没有定义这个,可能是新版本的改成RT_USING_POSIX_PIPE_SIZE这个名字了,将paho_mqtt_pipe.c里这个地方改成2048后解决。
也可以将这里的RT_PIPE_BUFSZ替换成RT_USING_POSIX_PIPE_SIZE