Commit graph

4502 commits

Author SHA1 Message Date
wangjianyu3
5fabe091f3 boards/xtensa/esp32s3: Treat return value that greater than zero as succ
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>
2024-11-26 16:33:26 +08:00
wangjianyu3
22e8e65789 boards/esp32s3: Add depends ESP32-S3-WROOM-1-N8R8 for ESP32S3_DEVKIT
Env

  esp32s3-devkit:usbnsh

Problem

  The `CONFIG_ARCH_BOARD_ESP32S3_DEVKIT` will be disabled if `CONFIG_ARCH_CHIP_ESP32S3WROOM1N8R8` selected

    $ diff defconfig boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig
    7a8
    > # CONFIG_ARCH_LEDS is not set
    10a12
    > CONFIG_ARCH_BOARD="esp32s3-devkit"
    12,15c14
    < CONFIG_ARCH_BOARD_CUSTOM=y
    < CONFIG_ARCH_BOARD_CUSTOM_DIR=""
    < CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
    < CONFIG_ARCH_BOARD_CUSTOM_NAME=""
    ---
    > CONFIG_ARCH_BOARD_ESP32S3_DEVKIT=y
    18c17
    < CONFIG_ARCH_CHIP_ESP32S3WROOM1N8R8=y
    ---
    > CONFIG_ARCH_CHIP_ESP32S3WROOM1N4=y

  And command make fails

    No directory at /workspace/nuttx//src
    make[1]: *** [tools/Unix.mk:320: arch/xtensa/src/board/board] Error 1
    make: *** [tools/Unix.mk:700: menuconfig] Error 2

With this patch

  $ diff defconfig boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig
  17c17
  < CONFIG_ARCH_CHIP_ESP32S3WROOM1N8R8=y
  ---
  > CONFIG_ARCH_CHIP_ESP32S3WROOM1N4=y

Link: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-devkitc-1/user_guide.html

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-26 14:06:31 +08:00
wangmingrong1
d2dc2c796d Path Error
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-26 13:50:53 +08:00
cuiziwei
8e58245524 sim: Fix sim m32 start up crash issue.
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>
2024-11-23 01:47:34 +08:00
wangjianyu3
ccefe43149 esp32s3-devkit/adb: Enable ROMFS/etc for ADB auto start
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-22 13:28:44 -03:00
wangjianyu3
9e08bb2d25 esp32s3-devkit: Add initialize scripts for ROMFS/etc
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-22 13:28:44 -03:00
wangjianyu3
385de9d850 esp32s3-devkit/adb: Reusing configuration of usb_device
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-22 13:28:44 -03:00
wangjianyu3
9a63f9a881 esp32s3-devkit/adb: Initializing configuration for ADB
Build & Flash

  ./tools/configure.sh -l esp32s3-devkit:adb
  make -j16
  make flash ESPTOOL_PORT=/dev/ttyACMx

Runtime

  $ adb -s 1234 shell
  nsh> uname -a
  NuttX 0.0.0  Nov 22 2024 11:41:43 xtensa esp32s3-devkit

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-22 13:28:44 -03:00
yinshengkai
0194c2f88a gcov: update gcov compilation parameters
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>
2024-11-22 19:08:08 +08:00
Jouni Ukkonen
74cdb53027 tools/imx9: Add norimage support to bootloader
Fetch fspi header and fcb generation script,
using mkimage generate nor bootable image.
compile bootloader using -mstrict-align

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-22 18:53:21 +08:00
wangjianyu3
27f278af90 lm3s6965-ek/qemu: Using default max command line length
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>
2024-11-21 14:08:17 -03:00
wangmingrong1
1d04884812 gcov: Add toolchain gcov dependency option
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-21 21:32:06 +08:00
cuiziwei
42ea6fd7a0 Revert "sim/make: fix macos sim:nsh make break, no -mcmodel in clang"
This reverts commit 56c920ce5d.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-11-21 18:16:30 +08:00
cuiziwei
f0e03f6c3c Unify the linking options for 32-bit and 64-bit to text-segment=0x30000000.
In order to be compatible with 32-bit and 64-bit compilation, set the text-segment to 0x30000000.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-11-21 16:13:52 +08:00
cuiziwei
feb38c43f2 sim/m64: Fix ld error.
/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>
2024-11-21 12:13:14 +08:00
Peter Bee
c0f776dbc3 follow upstream change & fix minor things
Signed-off-by: Peter Bee <pbjd97@gmail.com>
2024-11-20 16:32:05 -03:00
Peter Bee
48ded21e30 refine driver
Signed-off-by: Peter Bee <pbjd97@gmail.com>
2024-11-20 16:32:05 -03:00
Marco Casaroli
dac3f315a1 uf2 2024-11-20 16:32:05 -03:00
Marco Casaroli
18ee2d9130 board(rp23xx): add Pimoroni Pico 2 Plus 2024-11-20 16:32:05 -03:00
Marco Casaroli
8d0fce0e30 fixup! board(rp23xx): add Raspberry Pi Pico 2 2024-11-20 16:32:05 -03:00
Marco Casaroli
566f31f14c board(rp23xx): add Raspberry Pi Pico 2 2024-11-20 16:32:05 -03:00
stbenn
8def1764a4 arch/stm32h5: add basic ADC support
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
2024-11-20 08:51:27 +08:00
zhangyuan29
b524179572 xtensa/esp32: Remove duplicate board Make.defs
$(TOPDIR)/Make.defs was already include in common/Makefile.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-11-20 02:07:10 +08:00
chao an
8ffe5bdc1e arm/efm32: fix build break caused by undeclared error
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>
2024-11-19 20:50:33 +08:00
raiden00pl
79e220d43b boards/Kconfig: fix bad indent
fix bad indent in boards/Kconfig
2024-11-19 13:28:42 +01:00
raiden00pl
7e42ca2538 boards/stm32: split nucleo-f4x1re into separate boards
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
2024-11-19 13:28:42 +01:00
raiden00pl
af5252c8f9 boards/arm/stm32/nucleo-f4x1re/stm32_adc.c: remove dependency on AJOYSTICK
remove dependency on AJOYSTICK, ADC can be used without analog joystick,
so there is no reason to depends on it
2024-11-18 16:56:43 -03:00
raiden00pl
f04b7137c6 boards/arm/stm32/nucleo-f4x1re/src/stm32_adc.c: fix typo
fix typo, should include ADC file, not PWM file
2024-11-19 00:55:35 +08:00
ska
f03da09122 Revert "sim/m64:Fix ld error with .rodata can not be used when making a PIE o…"
This reverts commit 4253001656.
2024-11-17 15:43:01 +08:00
Xiang Xiao
2c9d412d1c serial/pci: Remove the product specific config
since the driver could detect them automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:40:26 +01:00
Xiang Xiao
d7209fabf4 pci: Remove igc produt config
to simplify the configuration since the driver could detect the device correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-17 08:40:26 +01:00
yezhonghui
775ff286a4 pci e1000 net delete produce config
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-11-17 08:40:26 +01:00
Xiang Xiao
34cc7e8100 boards/arm/qemu/qemu-armv7a: Fix the typo error in dramboot.ld
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 17:42:09 +01:00
Xiang Xiao
4c2c41f9a6 boards/arm64: Remove the unused vdk/vdk-armv8r/scripts/dramboot.ld
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 17:42:09 +01:00
stbenn
caaee545b1 arch/stm32h5: Simplify PLL configuration.
The PLL clock configuration was simplified on the assumption the clocks are correctly set in the board.h file. Instead of seperate conditions
for register components, assume the relevant PLL registers are fully defined in board.h. This should result in easier to understand defines in board.h
and simpler code flow in the standard clock configuration function.

Changes were mad in the board file alongside changing the arch files. Changes to board/stm32h5:
  - PLL1 has been configured to use integer instead of fractional mode to reach the 250 MHz target. PLL2 and PLL3 configurations were
    removed since they are currently unused in the H5 configuration.
  - PLL1 output was verified by testing for changes in serial baud rate.
2024-11-16 01:55:32 +08:00
Yongrong Wang
07c986905d sim/configs/rpserver/rpproxy_virtio: Change the sim 32bit to 64bit compilation
1.macOS doesn't support 32bit anymore(CONFIG_SIM_M32=y)
2.fix b4bit compile warning:
CC:  ioexpander/ioe_rpmsg.c ioexpander/ioe_rpmsg.c:368:14: warning:
cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
      return (FAR void *)(ret + 1);
             ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-11-15 14:01:11 +08:00
xuxin19
71b169e5fd build(bugfix):pac sim elf ONLY in Linux platform
avoid SIM compilation post build issues on other platforms

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-15 12:21:24 +08:00
Eero Nurkkala
f2949f84a3 arm64/imx9: add imx93-evk ddr training
This performs the DDR training for imx93-evk. In addition to the source code,
it downloads binaries which are included in the final image. The bootloader
must be ARCH_CORTEX_A53 instead of A55 due to atomic instructions that don't
work with the OCRAM / EL3 combination.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-11-15 09:56:31 +08:00
wangmingrong1
17ce9b86c1 gcov: Correct existing gcov configuration
1. add CONFIG_COVERAGE_ALL to replace CONFIG_SCHED_GCOV_ALL
2. Correct all SCHED_GCOV, SCHED_GCOV_ALL

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-15 01:05:16 +08:00
buxiasen
f53f0ecf0e sama5/at25_main: fix direct use of nput, convert to int
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-15 01:05:04 +08:00
p-szafonimateusz
bab1a5d714 boards/x86_64/intel64/qemu-intel64: add lvgl and fb examples
Add lvgl and fb examples for qemu-intel64.

NOTE: multiboot framebufer doesn't work with -kernel argument in QEMU,
NuttX image must be loaded with -cdrom argument.

QEMU command to run examples:

  qemu-system-x86_64 -m 2G -cpu host -enable-kvm -cdrom disk.iso -serial mon:stdio

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-15 01:04:52 +08:00
p-szafonimateusz
bb98911a11 arch/x86_64/intel64: add support for framebuffer
arch/x86_64/intel64: add support for framebuffer

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-15 01:04:52 +08:00
xuxin19
d2a7e454bb build(qemu):add a qemu compilation configuration with application
enable various types of common applications and libraries, and enable CMake CI checks.
To avoid regression issues in the build system

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-14 22:50:49 +08:00
raiden00pl
e306689436 boards/x86_64/intel64/qemu-intel64: add jumbo configuration
merge pcitest and smp into jumbo and enable more port features
2024-11-14 22:48:38 +08:00
wangjianyu3
85eed31443 mps3-an547:ap: Disable cmd_wait() as it depends on procfs currently
More details please see https://github.com/apache/nuttx-apps/pull/2848

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-14 13:42:34 +08:00
wangmingrong1
ec3c064ff0 arm64/nsh: Enable gprof
Let's turn off kasan to prevent gprof from running recursively. And turn on gprof to add this profile library to the CI build.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-14 13:30:05 +08:00
wangjianyu3
7e0ee8c74a sim:nsh: Enable PIPES to make nsh pipeline available
More details, please see https://github.com/apache/nuttx-apps/pull/2737

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-14 01:16:29 +08:00
Federico Braghiroli
3d90079f50 boards/stm32f103-minimum: fix unaligned pointer to .data section in ld.script
This patch fix _eronly value which is used during boot process to initialize
.data section to sram.

Since .data section is 4 byte aligned in flash, also _eronly must follow this
alignment to stay coherent with the start address of .data.

If one of the sections preceeding .data has a size which is not 4 byte aligned,
the _eronly value does not match with .data physical address resulting in wrong
copy of data section to sram and thus an almost immediate hardfault.

Signed-off-by: Federico Braghiroli <federico.braghiroli@gmail.com>
2024-11-13 21:59:24 +08:00
Jouni Ukkonen
e2a9c84260 arch/arm64/imx9: Add trdc support
Trdc is configured in EL3 bootloader
Clock pre-initialization is also executed there.
Trdc board configuration for imx93evk included

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-13 16:46:04 +08:00
Henry Rovner
f22685fb69 arm/rp2040: Add support for Waveshare RP2040 Zero board
This change adds a few simple configurations for the Waveshare RP2040 Zero board, along with accompanying documentation.
2024-11-13 09:53:36 +08:00