Commit Graph

53243 Commits

Author SHA1 Message Date
Inochi Amaoto
5f1201ede6 boards: rv-virt: Add example S mode flat build config
Add "flats" and "flats64" config to test S mode flat build.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Inochi Amaoto
e37348aeba arch/risc-v: Add support for S-mode flat build
There is no need to use kernel build for S-mode all the time. As cpu
scratch is supported for non kernel mode build, it is possible to use
flat build for S-mode.

Add flat build support for risc-v S mode.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Yanfeng Liu
8ebc3aa9e8 arch/risc-v: initial qemu-rv64ilp32 support
This applies uintreg_t in risc-v commons and fixes araised ci issues
for multiple devices. The FLAT build runs on qemu-rv64ilp32 target.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-14 19:50:00 +08:00
Yanfeng Liu
33afbaadb9 arch/risc-v: add rv64ilp32 toolchain
This adds support of rv64ilp32 toolchain available from Github repo
`ruyisdk/riscv-gnu-toolchain-rv64ilp32`. With this 32-bit nuttx can
be generated for RV64 devices.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-14 19:50:00 +08:00
zhushiqi
d029e88472 nuttx/net: fixed bind can not return error when used same addr.
Signed-off-by: zhushiqi <hiccupzhu@gmail.com>
2024-06-13 22:00:41 +08:00
Neale Ferguson
73b15a87dc Fix SHMODULEFLAGS so that we link dynamically correctly
* arch/risc-v/src/common/Toolchain.defs
  arch/xtensa/src/lx6/Toolchain.defs
  arch/xtensa/src/lx7/Toolchain.defs
  - Define SHMODULEFLAGS etc. for sotest/dynload
  - Add --entry=__start to SHMODULEFLAGS

* boards/arm64/qemu/qemu-armv8a/scripts/Make.defs
  boards/sim/sim/sim/scripts/Make.defs
  - Define SHMODULEFLAGS etc. for sotest/dynload
2024-06-12 23:21:16 -03:00
cuiziwei
71c9f4e094 nuttx:generate nuttx.map file when enable debug link map.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-06-12 23:21:16 -03:00
Neale Ferguson
5033966d8c Add flags for building shared objects for architectures supporting dynamic loading
* arch/arm/src/common/Toolchain.defs
  arch/risc-v/src/common/Toolchain.defs
  boards/sim/sim/sim/scripts/Make.defs
  - Add SHCCFLAGS and SSHLDFLAGS
2024-06-12 23:21:16 -03:00
Neale Ferguson
0cd401e6c4 Add -shared flags to SHMODULEFLAGS
* boards/sim/sim/sim/scripts/Make.defs
  - Add -shared flag. Doesn't seem to be required for most
    architectures but going with the documentation
2024-06-12 23:21:16 -03:00
Eren Terzioglu
0cf7676aca esp32[c3|c6|h2]: Add SPI Slave support 2024-06-12 22:53:19 -03:00
raiden00pl
3345e0caf9 include/nuttx/timers/oneshot.h: fix gcc14 errors
/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/timers/oneshot.h: In function 'oneshot_max_delay':
/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/timers/oneshot.h:272:3: error: implicit declaration of function 'timespec_from_tick' [-Wimplicit-function-declaration]
  272 |   timespec_from_tick(ts, tick);
      |   ^~~~~~~~~~~~~~~~~~
/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/timers/oneshot.h: In function 'oneshot_start':
/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/timers/oneshot.h:285:10: error: implicit declaration of function 'timespec_to_tick'; did you mean 'timespec_get'? [-Wimplicit-function-declaration]
  285 |   tick = timespec_to_tick(ts);
      |          ^~~~~~~~~~~~~~~~
      |          timespec_get
2024-06-13 02:21:29 +08:00
raiden00pl
11ae500fab drivers/1wire/ds28e17.c: fix printf warnings 2024-06-13 02:21:29 +08:00
raiden00pl
b076b5dfb6 drivers/motor: fix printf warnings 2024-06-13 02:21:29 +08:00
raiden00pl
6c5f8bd61f drivers/contactless: fix gcc14 errors 2024-06-13 02:21:29 +08:00
raiden00pl
e700bb5051 drivers/1wire/1wire.c: fix printf warning 2024-06-13 02:21:29 +08:00
raiden00pl
84fb99b118 drivers/wireless/gs2200m.c: fix warning
/home/raiden00/git/RTOS/nuttx/nuttx/drivers/wireless/gs2200m.c:2071:3: note: ‘snprintf’ output between 7 and 9 bytes into a destination of size 8
 2071 |   snprintf(cmd, sizeof(cmd), "ATE%d\r\n", on);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-06-13 02:21:29 +08:00
chao an
04eeef06a7 arch/tricore: update the function prototype as mainline
Signed-off-by: chao an <anchao@lixiang.com>
2024-06-12 23:36:11 +08:00
chao an
e081892316 compiler: fix build break on niche platform
ctc E208: ["include/stdlib.h" 236/52] syntax error - token ";" inserted before "realloc_like2"

Signed-off-by: chao an <anchao@lixiang.com>
2024-06-12 23:36:11 +08:00
Eren Terzioglu
62af2993a4 esp32h2: Change delimiter constant with variable 2024-06-12 23:35:24 +08:00
Eren Terzioglu
99ea8b7832 esp32[c3|c6|h2]: Add gspi master support 2024-06-12 23:35:24 +08:00
jfbblue0922
73949ac223 add stm32h755II chip 2024-06-12 16:22:52 +08:00
Tiago Medicci Serrano
6c3eeb7d5c espressif: Remove outdated config about IDF bootloader
For newer devices, IDF bootloader is not supported because the
devices are able to boot directly into NuttX or use MCUBoot to
enable OTA and security features.
2024-06-12 16:11:56 +08:00
Tiago Medicci Serrano
480ad6b631 esp: Make the legacy bootloader (IDF bootloader) option visible
This commit enables users to select the legacy bootloader (IDF
bootloader) in `menuconfig` directly. Please note, that this is a
legacy option intended to support devices already deployed and it
isn't recommended for new designs.
2024-06-12 16:11:56 +08:00
Yanfeng Liu
56a7bd7972 sched/kconfig: add PID_INITIAL_COUNT
This adds config for initial pid limit so that to reduce reallocations
quickly after boot.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-12 16:10:35 +08:00
Yanfeng Liu
caff9eba28 lib/math32.h: add IS_POWER_OF_2 macro
This adds IS_POWER_OF_2 macro to help catching config errors at
build time.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-12 16:10:35 +08:00
adriendesp
6f49637e23 Added xmc4_vadc.c to Make.defs 2024-06-11 20:19:49 +08:00
Yanfeng Liu
afb368afd2 docs/wamr: initial WAMR guide
This briefs how to get started with WAMR in NuttX.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-11 10:13:20 +08:00
raiden00pl
027e3df637 boards/thingy53: add sensors support
Add support for sensors: ADXL362, BH1749NUC, BMI270, BMM150
2024-06-11 02:55:24 +02:00
Yanfeng Liu
ce0c98f0fd fs/lock: prefer nxsched_self for modularity
Use of nxsched_self() is preferred from outside of the sched/ folder.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-09 20:22:02 +08:00
buxiasen
b53b449847 pm: make compile dummy when PM not enabled.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 12:04:18 +08:00
Xu Xingliang
5fd03186af tools/minidumpserver: fix 32bit crash log parsing
Need to distinguish between 32bit and 64bit registers, format the gdb reply message using struct.pack with correct format.
'<I' is used for 32bit registers, '<Q' for 64bit

Do not raise exeption for unrecognized registers in log, since they are
not used.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-06-08 12:02:51 +08:00
buxiasen
3d1b3ba1f5 pm: shorten the pm procfs domain lock time.
snprintf and procfs_memcpy don't have to do inside lock.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 12:02:13 +08:00
buxiasen
112e67f863 driver/1wire: update pm callback use container_of
pretty the code using container_of inside nuttx.h

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 11:59:59 +08:00
buxiasen
30188dc587 watchdog: fix idle callback maybe not upperhalf
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 11:59:26 +08:00
dependabot[bot]
c885ba7080 build(deps): bump tornado from 6.3.2 to 6.4.1 in /Documentation
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.3.2 to 6.4.1.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](https://github.com/tornadoweb/tornado/compare/v6.3.2...v6.4.1)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 10:12:04 +08:00
buxiasen
bdcda24a68 mm: fix mm_curused calculate err
before fix, the maxused shown in free command is not accurate.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-07 03:29:02 +08:00
chao an
cd169e9b2c sched/pthread: simplify pthread_create() branch logic
remove redundant branch logic

Signed-off-by: chao an <anchao@lixiang.com>
2024-06-07 01:32:42 +08:00
chao an
e456c88c09 Revert "sched: replace some global variables to macro"
sched implementation not depends on macro abstraction, so revert below commit:

This reverts commit 4e62d0005a
This reverts commit 0f0c370520
This reverts commit ad0efd04ee

Signed-off-by: chao an <anchao@lixiang.com>
2024-06-06 22:00:25 +08:00
meijian
f4d9005bea netlink: fix IPV6 macro bug
Signed-off-by: meijian <meijian@xiaomi.com>
2024-06-06 09:27:50 +02:00
Hudson C. Dalpra
fb1ff61d0d boards/raspberrypi-pico: Remove early return for error cases in initialization functions.
Signed-off-by: Hudson C. Dalpra <hudson@bduncanltd.com>
2024-06-06 09:35:14 +08:00
Matheus Catarino
c6eea4ad8b add LDC2 (dlang) support
*Note:* ldmd2 is ldc2-wrapper, allow using dmd frontend flags.
      This support may be extended to gdc (gnu) if nuttx developers demand it
  or are interested in it.
2024-06-06 09:32:56 +08:00
zhanghongyu
ee4c25f34e sem_open: return error code, sem returned by parameter
pointer comparison is unsigned, when returning -errno will be converted
to a large positive number, can not enter the error handling branch,
therefore, the error code is returned directly and the sem is returned
through the parameters.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-06-06 02:40:50 +08:00
Tiago Medicci Serrano
96f83bb03a net: Enable CONFIG_NET_ARP_SEND by default
Enable logic to send ARP requests if the target IP address mapping
does not appear in the ARP table.

Please check the comment in https://github.com/apache/nuttx/issues/12446#issuecomment-2145856778
2024-06-06 02:40:16 +08:00
Alan Carvalho de Assis
f830376ef2 DOC: Add how to get application on NSH
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-06-06 02:39:56 +08:00
zhanghongyu
9472426f69 net/inet: Rename ttl to s_ttl in sconn.
uniform naming convention

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-06-05 23:22:15 +08:00
Jani Paalijarvi
b32a1dfd3d risc-v/mpfs: Add error handling for PMP conf
Check return value of mpfs_board_pmp_setup() and
jump to mpfs_board_pmp_error() in case of error.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-06-05 12:07:02 -03:00
Takuya Miyashita
072890c1bf arch/arm/src/armv7-m/arm_vectors.c : Add the address alignment.
Add the address alignment to keep the constraint of ARMv7-M architecture same as RAM vector.

ARMv7-M architecture describes the vector table address alignment as following.
The Vector table must be naturally aligned to a power of two
whose alignment value is greater than or equal to (Number of Exceptions supported x 4),
with a minimum alignment of 128 bytes.

I wonder why the implementation of arm_vectors.c does not follow
this constraint of address alignment about ARMv7-M architecture.
Although RAM vector is taken care about it.

I think, as the result it was done by linker script on each board.
At our system, NuttX will be started by bootloader.
To fix the address of entry point(__start) I set the address of entry point to beginning of binary,
so the beginning of binary is not a vector table.
At this case, keeping the address alignment constraint of arm_vectors.c is needed.
2024-06-05 21:47:57 +08:00
Almir Okato
4178f3ede4 esp32s2: remove legacy bootloader support
Deprecate Legacy Boot for ESP32-S2.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
Almir Okato
16f8966fa9 esp32s2: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s2 targets and removes the need
for running 'make bootloader' command for it.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-06-04 18:53:14 -03:00
Xu Xingliang
b5f8498142 mm: check double free before adding to delaylist
If free memory is delayed, check case of double free in the first
place.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-06-04 17:42:28 -03:00