Re: debugging user app crashes
Everything you need to know is in that referenced wiki page: https://cwiki.apache.org/confluence/display/NUTTX/Debugging+ELF+Loadable+Modules I don't know anything about QEMU or RISC-V. But assuming that NSH is your init application... * NSH is not in memory when you start the OS; it resides in your init file. The OS will automatically start NSH as the init application (if properly configured). * Since there is no gdbserver or ptrace, there is not elegant way to break into the program. Some kludgey ways to do that are described in the referenced wiki page. * Then just follow the instructions in the wiki page: o Start the debugger o Load the symbol table of the NSH application. You probably don't need as load offset as described in the wiki page. o Set a breakpoint at nsh_parse, and o Continue I have nothing to add to that. On 1/10/2024 7:36 PM, yfliu2008 wrote: Spudaneco, Can you share more details about how to break in "nsh_parse()" with "rv-virt/knsh64"? Regards, yf Original From:"spudaneco"
Problems adding a New Board Configuration
Hi, I am working with a nucleo-l432kc board and need to add multiple occurrences of identical peripherals (INA260 current sensor). I thought I would create a new board configuration, based on the nucleo-l432kc to make the any changes in. I used the NUTTX Porting Guide webpage to see what I needed to do (https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide#newboardconfig). The changes I made were: In file nuttx/boards/Kconfig: 1 - Added section: config ARCH_BOARD_NUCLEO_L432KC_CUST bool "STM32L432 Nucleo-32 L432KC Custom" depends on ARCH_CHIP_STM32L432KC select ARCH_HAVE_LEDS select ARCH_HAVE_BUTTONS select ARCH_HAVE_IRQBUTTONS ---help--- STMicro Nucleo-32 L432KC custom board based on the STMicro STM32L432KCU6 MCU. 2 - Added: default "nucleo-l432kc-custom" if ARCH_BOARD_NUCLEO_L432KC_CUST 3 - Added towards the end of the file: if ARCH_BOARD_NUCLEO_L432KC_CUST source "boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig" endif I Copied nuttx/boards/arm/stm32l4/nucleo-l432kc directory to nuttx/boards/arm/stm32l4/nucleo-l432kc-custom In file boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig: 1 - Changed: if ARCH_BOARD_NUCLEO_L432KC to: if ARCH_BOARD_NUCLEO_L432KC_CUST 2 - Changed: endif # ARCH_BOARD_NUCLEO_L432KC to: endif # ARCH_BOARD_NUCLEO_L432KC_CUST I then ran the following: stewart@stewart-HP-250-G6-Notebook-PC:/data/Nuttx/nuttx$ make distclean stewart@stewart-HP-250-G6-Notebook-PC:/data/Nuttx/nuttx$ tools/configure.sh -l nucleo-l432kc-custom:nsh Copy files Select CONFIG_HOST_LINUX=y Refreshing... CP: arch/dummy/Kconfig to /data/Nuttx/nuttx/arch/dummy/dummy_kconfig CP: boards/dummy/Kconfig to /data/Nuttx/nuttx/boards/dummy/dummy_kconfig LN: platform/board to /data/Nuttx/apps/platform/dummy LN: include/arch to arch/arm/include LN: include/arch/board to /data/Nuttx/nuttx/boards/arm/stm32l4/nucleo-l432kc-custom/include LN: drivers/platform to /data/Nuttx/nuttx/drivers/dummy LN: include/arch/chip to /data/Nuttx/nuttx/arch/arm/include/stm32l4 LN: arch/arm/src/chip to /data/Nuttx/nuttx/arch/arm/src/stm32l4 LN: arch/arm/src/board to /data/Nuttx/nuttx/boards/arm/stm32l4/nucleo-l432kc-custom/src mkkconfig in /data/Nuttx/apps/audioutils mkkconfig in /data/Nuttx/apps/benchmarks mkkconfig in /data/Nuttx/apps/boot mkkconfig in /data/Nuttx/apps/canutils mkkconfig in /data/Nuttx/apps/crypto mkkconfig in /data/Nuttx/apps/examples/mcuboot mkkconfig in /data/Nuttx/apps/examples mkkconfig in /data/Nuttx/apps/fsutils mkkconfig in /data/Nuttx/apps/games mkkconfig in /data/Nuttx/apps/graphics mkkconfig in /data/Nuttx/apps/industry mkkconfig in /data/Nuttx/apps/interpreters/luamodules mkkconfig in /data/Nuttx/apps/interpreters mkkconfig in /data/Nuttx/apps/logging mkkconfig in /data/Nuttx/apps/lte mkkconfig in /data/Nuttx/apps/math mkkconfig in /data/Nuttx/apps/mlearning mkkconfig in /data/Nuttx/apps/netutils mkkconfig in /data/Nuttx/apps/sdr mkkconfig in /data/Nuttx/apps/system mkkconfig in /data/Nuttx/apps/testing mkkconfig in /data/Nuttx/apps/wireless/bluetooth mkkconfig in /data/Nuttx/apps/wireless/ieee802154 mkkconfig in /data/Nuttx/apps/wireless mkkconfig in /data/Nuttx/apps boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:24:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:27:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:41:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:44:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:61:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:64:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:77:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:92:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:104:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:126:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:129:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:144:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:147:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:150:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:165:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:168:warning: choice value used outside its choice group boards/arm/stm32l4/nucleo-l432kc-custom/Kconfig:171:warning: choice value used outside its choice group boards/arm/stm32l4/nuc