hostfs will allow developers to access the current execution directory.
nsh> ls
/:
bin/
data/
dev/
etc/
proc/
tmp/
nsh> cd /data
nsh> ls
/data:
README.md
fs/
pass1/
cmake/
arch/
Signed-off-by: chao an <anchao@lixiang.com>
When running qemu/nsh_smp or sim/nsh configuration, run gcov -d /tmp/xxx
to save all gcov generated data and export them to the host. Use
./tools/gcov.sh to parse and generate reports. For details, see:
Documentation/applications/system/gcov/index.rst
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
knsh_romfs - for QEMU and legacy serial port
knsh_romfs_pci - for bare-metal Intel hardware and PCI serial port
Steps to build kernel image with user-space apps in romfs:
$ ./tools/configure.sh qemu-intel64/knsh_romfs
$ make -j
$ make export -j
$ pushd ../apps
$ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
$ make import -j
$ ./tools/mkromfsimg.sh
$ mv boot_romfsimg.h ../nuttx/arch/x86_64/src/board/romfs_boot.c
$ popd
$ make -j
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
USB ADB is enabled - Based on esp32s3-devkit/adb
Build
./tools/configure.sh -l esp32s3-devkit:txtable
make -j16
make flash ESPTOOL_PORT=/dev/ttyACMx
Test
$ adb -s 1234 shell
nsh> cat /etc/txtable.txt
TXTABLE0
data 0x100000 0
nsh> ls -l /dev/data
frw-rw-rw- 1044480 /dev/data
nsh>
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete.
Therefore, we need to rename up_set_current_regs to better reflect its actual meaning,
which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
board_spiflash_init() => init_storage_partition() => parse_mtd_partition()
`parse_mtd_partition()` may return value that greater than zero when succ
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
After compilation, when starting nsh, the following crash occurs.
==2500151==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==2500151==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff] range.
==2500151==Process memory map follows:
0x30000000-0x33dd4000 /nuttx/nuttx
To avoid overlaps, change the starting address of the text segment.
Using Ttext-segment=0x30000000 causes a crash when starting the 32-bit SIM.
Using -Ttext-segment=0x50000000 causes a crash when starting the 64-bit SIM.
Setting -Ttext-segment=0x40000000 resolves all issues perfectly.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
profile-generate is used to generate compilation feedback optimization data, not just code coverage data
It will rely on the toolchain library:
nuttx/libs/libc/misc/lib_utsname.c:94:(.text.uname+0x2c): undefined reference to `__gcov_indirect_call_profiler_v4'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x178): undefined reference to `__gcov_indirect_call'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x188): undefined reference to `__gcov_time_profiler_counter'
arm-none-eabi-ld: nuttx/staging/libc.a(lib_utsname.o):(.data..LPBX0+0x30): undefined reference to `__gcov_merge_time_profile'
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
The large max command line length may cause stack overflow.
Test
./tools/configure.sh lm3s6965-ek:qemu-flat
make -j16
qemu-system-arm -semihosting \
-M lm3s6965evb \
-device loader,file=nuttx.bin,addr=0x00000000 \
-netdev user,id=user0 \
-serial mon:stdio -nographic
Link: https://github.com/apache/nuttx-apps/pull/2850
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
/usr/bin/ld: nuttx.rel: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
Adds ADC support with minimal feature set (no DMA or Timers etc). A new nucleo-h563zi configuration was added to
provide easy testing with the adc example NSH addon.
Fix Kconfig spacing to tabs
Old upstream from @acassis:
d97227eddd/nuttx/configs/efm32gg-pnbfano/include/board.h
chip/efm32_clockconfig.c:860:24: error: 'BOARD_SWOPORT_LOCATION' undeclared (first use in this function);
did you mean 'BOARD_UART0_ROUTE_LOCATION'?
860 | regval |= ((uint32_t)BOARD_SWOPORT_LOCATION <<
| ^~~~~~~~~~~~~~~~~~~~~~
| BOARD_UART0_ROUTE_LOCATION
chip/efm32_clockconfig.c:860:24: note: each undeclared identifier is reported only once for each function it appears in
chip/efm32_clockconfig.c:866:20: error: 'BOARD_GPIO_SWOPORT' undeclared (first use in this function)
866 | efm32_configgpio(BOARD_GPIO_SWOPORT);
| ^~~~~~~~~~~~~~~~~~
Signed-off-by: chao an <anchao@lixiang.com>
Split nucleo-f4x1re into nucleo-f401re and nucleo-f411re.
These are separate boards and should be in separate directories as it's
done for all other nucleo boards in NuttX