nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

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

Open shikoumuzi opened this issue 1 year ago • 3 comments

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.

shikoumuzi avatar Apr 07 '24 08:04 shikoumuzi

@masayuki2009 @xiaoxiang781216 any idea?

acassis avatar Apr 08 '24 15:04 acassis

please try the stock sim:libcxxtest first.

xiaoxiang781216 avatar Apr 08 '24 15:04 xiaoxiang781216

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

shikoumuzi avatar Apr 08 '24 15:04 shikoumuzi