apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.52k stars 1.07k forks source link

when i start nuttx (sim:nsh), it throw a signal which is SIGSEGV #12086

Open shikoumuzi opened 3 months ago

shikoumuzi commented 3 months ago

i want to use cpp stl in nuttx program, so i set

140 CONFIG_HAVE_CXX=y
141 CONFIG_HAVE_CXXINITIALIZE=y
142 CONFIG_UCLIBCXX=y
143 CONFIG_LIBSUPCXX=y
144 CONFIG_CXX_STANDARD="gnu++17"
145 CONFIG_CXX_EXCEPTION=y
146 CONFIG_CXX_RTTI=y

in meanuconfig

when i start nuttx in gdb, it get me this message

image

how should i do to solve it, thank you.

acassis commented 3 months ago

@masayuki2009 @xiaoxiang781216 any idea?

xiaoxiang781216 commented 3 months ago

please try the stock sim:libcxxtest first.

shikoumuzi commented 3 months ago

please try the stock sim:libcxxtest first.

i did that, but when i use 'make distclean' it still going to have this problem. However, a while ago, I compared the configuration of cxxtest and nsh and found that need to turn on an optimization level at least -O1 in menuconfig, and then it work properly. thank you for your reply