Commit Graph

4186 Commits

Author SHA1 Message Date
Neo Xu
7e6f83a2b8 boards/arm/stm32/stm32f429i-disco: use serial console by default
Make it easy to access for beginners, using the default serial as console.
Enable wdog sched note.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-25 19:04:02 +08:00
xuxingliang
dceb26c7b2 drivers/segger: add heap data plot
Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-25 19:04:02 +08:00
xuxingliang
17cbaadce8 task: use get_task_name where possible
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-25 19:04:02 +08:00
hujun5
9dc3e4ee41 arm64: fix fvp smp faild to boot
reason:
we should give a busy wait addr

This commit fixes the regression from https://github.com/apache/nuttx/pull/13640

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-24 18:04:49 +08:00
Xiang Xiao
002d89885e net: Remove IFF_DOWN flag to compatible with Linux/*BSD
turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-15 22:40:22 +08:00
wangmingrong1
0b98e9e680 board_reset: flush cache before reset
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-11 01:30:51 +08:00
hujun5
d573952790 irq: use up_interrupt_context to replace up_current_regs
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-09 18:16:43 +08:00
raiden00pl
dff79e8e54 boards/stm32f7/stm32f746g-disco: fix FMC pin
during migration from legacy pinout some of the FMC pins were ommited because
their names were identical to the new pinout, which didn't cause a compilation error.

This fixes LCD examples.

Also update incomplete stm32f769i-disco FMC support to avoid this kind of bug in the future
2024-10-09 00:04:57 +08:00
buxiasen
77d1f78996 board/arm/stm32: highpri up_interrupt_context to is_nesting_interrupt
up_interrupt_context indicates that we self inside interrupt/handler mode,
replaced to private function is_nesting_interrupt to make less confused.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:53:57 +08:00
buxiasen
431b848c79 board/arm/nrf52: fix use up_interrupt_context to is_nesting_interrupt
The case want to determine if a interrupt with higher priority and the
interrupt preemption occurred, but up_interrupt_context indicates that we
self inside interrupt/handler mode. As we previously did not handle the
ramvector interrupt correctly, after update breaked the case. We should
use a more clear private function is_nesting_interrupt.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-08 23:53:57 +08:00
chenxiaoyi
3100deda9d sim: add windows64 defconfig
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-10-08 23:51:33 +08:00
ouyangxiangzhen
c6861ea931 Revert "olimex-stm32-p407: adjust memory layout"
This reverts commit 9a9d0a647e.
2024-09-23 12:29:36 +08:00
wangjianyu3
898a5d501f sim:thermal: Remove CPUFreq realted
CPUFreq has not upstreamed to apache:nuttx

Warning/Error:
  $ make distclean
  $ ./tools/configure.sh -l sim:thermal
  $ make savedefconfig
  $ diff defconfig boards/sim/sim/sim/configs/thermal/defconfig
  18a19
  > CONFIG_CPUFREQ=y
  73a75
  > CONFIG_THERMAL_CDEV_CPUFREQ=y
  74a77
  > CONFIG_THERMAL_DUMMY_CPUFREQ=y

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-23 08:57:29 +08:00
wangjianyu3
6442683359 sim:thermal: move etc romfs mount from nsh to sched/init
Ref: I7afe1047369e91662583c8ef9c98fffcf567fbb7
```
sched: move etc romfs mount from nsh to sched/init
```
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-23 08:57:29 +08:00
wangjianyu3
2480f599c6 Add default config for thermal framework based on sim:nsh
Test: ./tools/configure.sh -l sim:thermal && make -j8

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-23 08:57:29 +08:00
Rodrigo Sim
a5754a2f03 arm/stm32f401rc-rs485: Add support to LCD 16x2 with I2C Backpack
Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-09-21 14:42:54 -03:00
Tiago Medicci Serrano
72acec7275 esp32s3: Fix faulty esp32s3-devkit:stack example
This defconfig is an example of the recorded stack and it became
faulty recently after the implementation of the `up_current_regs`
functions. The `noinstrument_function` directive must be used for
preventing it from being looped when instrumentation is enabled.
Also, this commit places `sched/instrument/stack_record.c` in IRAM.
2024-09-21 10:42:06 +08:00
wangmingrong1
0d8b6de03a mm/kasan: Map the generated shadow area to the fixed segment
Since the size of the shadow area will change during the script merging of global variables, it will lead to unpredictable number of links. After fixing, only three links are required.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:47:23 +08:00
wangmingrong1
0916461f8b arm/qemu: Add mounting of tmpfs
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:24:50 +08:00
wangjianyu3
b14b15ac2d nrf91: Update GPS to GNSS
Related: 03f4ec7765ed8b3551f1a2bc8198c5007a542788

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-20 14:38:43 +08:00
wangjianyu3
1fabad67ec lilygo_tbeam_lora_gps/gps: Enable GNSSUTILS_MINMEA_LIB for EXAMPLES_GPS
Log:
  ./gps_main.c:33:10: fatal error: minmea/minmea.h: No such file or directory
     33 | #include <minmea/minmea.h>
        |          ^~~~~~~~~~~~~~~~~
  compilation terminated.
  ERROR: xtensa-esp32-elf-gcc failed: 1
         command: xtensa-esp32-elf-gcc -MT ./gps_main.c.github.workspace.sources.apps.examples.gps.o  -M '-fno-common' '-Wall' '-Wstrict-prototypes' '-Wshadow' '-Wundef' '-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-Os' '-fno-strict-aliasing' '-fomit-frame-pointer' '-ffunction-sections' '-fdata-sections' '-mlongcalls' '-isystem' '/github/workspace/sources/nuttx/include' '-D__NuttX__' '-DNDEBUG' '-D__KERNEL__' '-Wno-cpp' '-Werror' '-I' '/github/workspace/sources/apps/include' ./gps_main.c
  gps_main.c:33:10: fatal error: minmea/minmea.h: No such file or directory
     33 | #include <minmea/minmea.h>
        |          ^~~~~~~~~~~~~~~~~
  compilation terminated.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 22:13:42 +08:00
wangjianyu3
012dcc41a2 sim/minmea: Fix defconfig warning
Warning/Error:
  $ ./tools/configure.sh -l sim:minmea
  $ make defconfig
  $ make savedefconfig
  $ diff defconfig boards/sim/sim/sim/configs/minmea/defconfig
  38d37
  < CONFIG_GNSSUTILS_MINMEA_LIB=y
  39a39
  > CONFIG_GNSSUTILS_MINMEA_LIB=y

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 13:49:55 +08:00
wangjianyu3
f5c5f18934 boards/arm/nrf91/nrf9160-dk: Update GPSUTILS_MINMEA_LIB to GNSSUTILS_MINMEA_LIB
See https://github.com/apache/nuttx/pull/13459 for more details.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangjianyu3
c652f41c87 nuttx/uorb: Rename GPS to GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangjianyu3
e607137142 boards: Update EXAMPLES_SOTEST_DEVMINOR to EXAMPLES_SOTEST_DEVMINOR_MAX
See https://github.com/apache/nuttx-apps/pull/2579 for more details

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 12:15:44 +08:00
simbit18
583f025422 Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
2024-09-17 22:16:41 +08:00
ligd
9a9d0a647e olimex-stm32-p407: adjust memory layout
LD: nuttx
arm-none-eabi-ld: /home/ligd/platform/mainline/nuttx/nuttx section `.bss' will not fit in region `ksram'
arm-none-eabi-ld: region `ksram' overflowed by 40 bytes
make[1]: *** [Makefile:212: nuttx] Error 1
make: *** [tools/Unix.mk:538: nuttx] Error 2

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-17 12:15:14 +08:00
zhangshoukui
756faf3cc9 stm3240g-eval:knxwm and olimex-stm32-p407:kmodule remove FS_REFCOUNT
arm-none-eabi-ld: /github/workspace/sources/nuttx/nuttx section `.bss' will not fit in region `ksram'
arm-none-eabi-ld: region `ksram' overflowed by 16 bytes

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-09-17 12:01:53 +08:00
Jorge Guzman
e3dabcd999 boards/esp32s3: add support to esp32s3-lhcbit board
The esp32s3-lhcbit is a board with lora, sdcard, display TFT, etc.

Signed-off-by: Jorge Guzman jorge.gzm@gmail.com
2024-09-17 01:30:44 +08:00
wanggang26
872208fdf8 boardctl: add board control api to start slave core
This interface may be used by application specific logic to start
specified slave cpu core under the pseudo AMP case which is different
with armv7-a/armv8-a SMP. Support for this function is required by
board-level logic if CONFIG_BOARDCTL_START_CPU is selected.

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-16 13:03:33 +08:00
wanggang26
a4883d8fa6 nucleo-h745zi: fix potential bl jump to app failed issue
After changing sp, following functions calling will result
in unpredictable behavior in case of jumping

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-16 12:20:47 +08:00
Masayuki Ishikawa
df298c186f Revert "build depend:Revert Make.dep intermediate ddc file"
This reverts commit ddc3119c4e.
2024-09-15 19:29:47 +08:00
xuxin19
ddc3119c4e build depend:Revert Make.dep intermediate ddc file
Revert "Parallelize depend file generation"
This reverts commit d5b6ec450f.

parallel depend ddc does not significantly speed up compilation,
intermediately generated .ddc files can cause problems if compilation is interrupted unexpectedly

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-15 10:01:58 +08:00
Nonpawit Ekburanawat
10ee7ffb46 Add new line to defconfig
Signed-off-by: Nonpawit Ekburanawat <nonpawit.ek@gmail.com>
2024-09-15 09:56:29 +08:00
Nonpawit Ekburanawat
46ef3f4f88 boards/arm/stm32h7/stm32h745i-disco: Add RPTUN support
- Edited linker script for shmem to have condition according to cores selected.
- Added new configuration for nsh_cm7_rptun and nsh_cm4_rptun.
- Appended RPTUN bringup code in stm32_bringup.c

Signed-off-by: Nonpawit Ekburanawat <nonpawit.ek@gmail.com>
2024-09-15 09:56:29 +08:00
p-szafonimateusz
60b0f44369 boards/x86_64/qemu-intel64: add configs with PCI serial console
add configs with PCI serial console for qemu-intel64 so we can run NuttX on bare
metal Intel HW with serial port card

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
p-szafonimateusz
ceb2921d79 drivers: prepare 16550 UART driver to support PCI
prepare 16550 UART driver to support PCI:

- [breaking change] change argument of uart_ioctl() from `struct file *filep` to `FAR struct u16550_s *priv`
  Also fix moxart_16550.c build related to this change

- [breaking change] change argument of uart_getreg() and uart_putreg from `uart_addrwidth_t base` to `FAR struct u16550_s *priv`
  Also fix arch/x86/src/qemu/qemu_serial.c and arch/x86_64/src/intel64/intel64_serial.c related to this change

- [breaking change] change argument of uart_dmachan() from `uart_addrwidth_t base` to `FAR struct u16550_s *priv`

- move `struct u16550_s` to public header

- generalize UART_XXX_OFFSET so we can use it with any register increment

- make u16550_bind(), u16550_interrupt(), u16550_interrupt() public

- remove arch/or1k/src/common/or1k_uart.c and use common 16550 MIMO interfacve

- change irq type in `struct u16550_s` from uint8_t to int to match MSI API

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
p-szafonimateusz
c7e8fd43a4 drivers/uart_16550: configure MCR_OUT2 bit from Kconfig
move MCR_OUT2 configuration from qemu-intel64/src/qemu_boot.c to common code
also leave this option disabled for qemu-intel64 as it's not required

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
p-szafonimateusz
a0e00b993a intel64: register PCI controller early but postpone PCI drivers init
Some of PCI drivers require OS interfaces that can't be executed in the INIT context.
In that case we have to postpone PCI drivers probing and call it for example
in board initialization logic.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
ligd
ff1b54bff3 pthread_cleanup: move clenup down to tls
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-14 20:15:12 +08:00
hujun5
908df725ad arch: use up_current_regs/up_set_current_regs replace CURRENT_REGS
reason:
1 On different architectures, we can utilize more optimized strategies
  to implement up_current_regs/up_set_current_regs.
eg. use interrupt registersor percpu registers.

code size
before
    text    data     bss     dec     hex filename
 262848   49985   63893  376726   5bf96 nuttx

after
       text    data     bss     dec     hex filename
 262844   49985   63893  376722   5bf92 nuttx

size change -4

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-13 23:18:58 +08:00
Martin Vajnar
c5be5c2db4 esp32c6-devkitc: Add Quadrature Encoder support and example configuration
Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
2024-09-13 01:49:28 +08:00
Huang Qi
55e4a98df7 docs: Migrate network documentation of sim to Documentations
Move the docs in boards of sim to common place.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-13 01:41:10 +08:00
Huang Qi
75e4bd1389 docs: Migrate MPS board documentation
Migrate docs of MPS board from its board directory to
common Documentation place.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-12 10:26:08 -03:00
p-szafonimateusz
53d0425ae3 boards/x86_64/qemu-intel64: enable debug messages for PCI test configs
enable debug messages for PCI configuration in qemu-intel64
so we know exactly what happen during execution

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-12 18:10:46 +08:00
Stuart Ianna
29ee9aacb3 arch/risc-v/common: provide architecture specific perfmon bindings.
Provides two implementations:
 - CSR_CYCLE: Cores which implement hardware performance monitoring.
 - CSR_TIME: Uses the machine time registers.

Using the up_perf_xx bindings directory is more efficient than performing a nanosecond conversion on every gettime event.
2024-09-12 15:04:02 +08:00
shizhenghui
17405d4c38 sim/alsa: update defconfig
CONFIG_AUDIOUTILS_LAME=y
CONFIG_AUDIOUTILS_LIBMAD=y

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-10 20:25:48 +08:00
YAMAMOTO Takashi
0078896456 esp32: fix a way to test a config
found by GCC -Wundef
2024-09-09 10:48:09 +02:00
yanghuatao
c43c91816d toolchain/ghs: add ghs link script for mps2-an500 platform
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-09-09 01:26:13 +08:00
guoshichao
99df615c9b toolchain/ghs: fix the ghs build warning
CXX:  libcxxmini/libxx_new.cxx cxarm: cxarm: cxarm: cxarm: Warning: cxarm: cxarm: Unknown option "--gnu++17" passed to linker
Warning: Warning: Warning: Warning: cxarm: Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Warning: Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Unknown option "--gnu++17" passed to linker
Warning: Unknown option "--gnu++17" passed to linker
CXX:  libcxxmini/libxx_newa.cxx cxarm: Warning: Unknown option "--gnu++17" passed to linker

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-08 21:42:13 +08:00