Commit Graph

54919 Commits

Author SHA1 Message Date
wangmingrong1
5c511443fe mm/kasan: Using arrays instead of linked lists
1. Modify the Kasan global variable script to support array storage of region addresses
2. Due to the lack of formatting in the previous attempt, a formatting script was created

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-20 21:47:23 +08:00
wangmingrong1
7796161ee2 mm/kasan:Remove compiler restrictions
The latest version of clang also supports kasan

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
raiden00pl
cafd563da1 github/workflows: add auto labeler for PR
this commit adds initial support for auto labeler for PR
based on https://github.com/actions/labeler
2024-09-20 10:02:18 -03:00
Shoukui Zhang
985e539e02 i2c: Optimize access to private data
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-09-20 13:28:03 +02:00
Shoukui Zhang
2c543c27bf Fix greater-than-or-equal-to-zero issue
unsigned_compare: This greater-than-or-equal-to-zero comparison without a signed value is always true. ndx >= 0U

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-09-20 12:34:27 +02:00
wangjianyu3
44cce29d12 libs/gnssutils: Ignore source zip
Log:
  Untracked files:
    (use "git add <file>..." to include in what will be committed)
          libs/libc/gnssutils/db46128e73cee26d6a6eb0482dcba544ee1ea9f5.zip

  nothing added to commit but untracked files present (use "git add" to track)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-20 14:38:43 +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
simbit18
6a0c0722e2 CI: Improvement to speed up compilation and reduce download errors.
The simple improvement is designed to speed up compilation and reduce download errors on github and local.

Added a folder nxtmpdir for storing third-party packages

nuttxworkspace
|
|- nuttx
|- apps
|- nxtmpdir

tools/Unix.mk:
added export NXTMPDIR := $(WSDIR)/nxtmpdir

tools/configure.sh:
added option -S creates the nxtmpdir folder for third-party packages.

tools/Config.mk:
added macro
CLONE - Git clone repository.
CHECK_COMMITSHA - Check if the branch contains the commit SHA-1.

tools/testbuild.sh:
added option -S

For now I added in the folder this package

ESP_HAL_3RDPARTY_URL = https://github.com/espressif/esp-hal-3rdparty.git

ARCH
arch/xtensa/src/esp32/Make.defs
arch/xtensa/src/esp32s2/Make.defs
arch/xtensa/src/esp32s3/Make.defs
arch/risc-v/src/common/espressif/Make.defs
arch/risc-v/src/esp32c3-legacy/Make.defs

but you can also add other packages (maybe also of apps)
2024-09-20 11:26:01 +08:00
Stuart Ianna
b60a8b216b arch/risc-v/src/litex_ticked: Set initial tick count to known value.
The tick count should be manually set as there is no guarantee that the
previous boot stage hasn't modified this count since reset.
2024-09-20 10:51:45 +08:00
chao an
b82717b9e6 arm/cortex-a,r: replace cp15 instruct to macros to align operation
This is continue work of https://github.com/apache/nuttx/pull/13486

Discussion here:
https://github.com/apache/nuttx/pull/13486#discussion_r1764354675

1. move cp15.h to arch public
2. replace cp15 instruct to macros to align operation
3. add memory barrier to avoid compiler optimization

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-20 09:29:57 +08:00
xuxin19
e627850442 build(bugfix):ensure compatibility between kconfig-frontend and kconfiglib in kernel build
Because kconfiglib recognizes MODULE configuration but not modules attributes,
and kconfig-frontend is compatible with the latest modules attributes of Linux,
we can only use the old version to use MODULE configuration plus options modules to be compatible with both.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-20 07:26:32 +08:00
raiden00pl
31b2438ac1 github/workflows: add PR size labeler
add workflow that assigns labels based on the PR's size
2024-09-19 22:19:12 +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
bdddc76997 nuttx/uorb: Fix incompatible type error
Related: b17c074a18

Log:
  Error: sensors/ms56xx_uorb.c:145:20: error: initialization of 'int (*)(struct sensor_lowerhalf_s *, struct file *, uint32_t *)' {aka 'int (*)(struct sensor_lowerhalf_s *, struct file *, unsigned int *)'} from incompatible pointer type 'int (*)(struct sensor_lowerhalf_s *, struct file *, long unsigned int *)' [-Werror=incompatible-pointer-types]
    145 |   .set_interval  = ms56xx_set_interval,
        |                    ^~~~~~~~~~~~~~~~~~~
  sensors/ms56xx_uorb.c:145:20: note: (near initialization for 'g_sensor_ops.set_interval')
  cc1: all warnings being treated as errors

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 19:54:38 +08:00
wangjianyu3
3ab62370cb nuttx/uorb: Fix initialization error of variable of type struct sensor_ops_s
Related change:
  .flush    : 403469336f
  .get_info : 703bb7e7b3

Error Log:
  1153  Building NuttX...
  1154Error: sensors/bme680_uorb.c:428:3: error: initialization of 'int (*)(struct sensor_lowerhalf_s *, struct file *, long unsigned int)' from incompatible pointer type 'int (*)(struct sensor_lowerhalf_s *, struct file *, int,  long unsigned int)' [-Werror=incompatible-pointer-types]
  1155  428 |   bme680_control    /* control */
  1156      |   ^~~~~~~~~~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 19:54:38 +08:00
wanggang26
f6c1d88931 mmcsd: fix a build error
Error: mmcsd/mmcsd_sdio.c:1419:12: error: 'mmcsd_setblockcount' defined
but not used [-Werror=unused-function]
1172 1419 | static int mmcsd_setblockcount(FAR struct mmcsd_state_s
*priv,

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-19 15:44:59 +08:00
guoshichao
f01a2c70fd greenhills: fix the enumerated type mixed using warning
CC:  obstack/lib_obstack_printf.c "mmap/fs_rammap.c", line 126: warning #188-D: enumerated type mixed with
          another type
    enum mm_map_type_e type = (uintptr_t)entry->priv.p & 3;
                              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-09-19 14:08:07 +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
wanggang26
1a6e8b9c99 mmcsd: fix a logic error
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-19 07:29:33 +02:00
wangjianyu3
d2b58a520e sensor.c: Rename container_of to list_container_of
https://github.com/apache/nuttx/pull/11805

Log:
    /github/workspace/sources/nuttx/drivers/sensors/usensor.c: In function 'usensor_get_info':
    Warning: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:228:44: warning: implicit declaration of function 'container_of'; did you mean 'list_container_of'? [-Wimplicit-function-declaration]
      228 |   FAR struct usensor_lowerhalf_s *ulower = container_of(lower,
          |                                            ^~~~~~~~~~~~
          |                                            list_container_of
    Error: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:229:44: error: expected expression before 'struct'
      229 |                                            struct usensor_lowerhalf_s,
          |                                            ^~~~~~
    /github/workspace/sources/nuttx/drivers/sensors/usensor.c: In function 'usensor_control':
    Error: /github/workspace/sources/nuttx/drivers/sensors/usensor.c:241:44: error: expected expression before 'struct'
      241 |                                            struct usensor_lowerhalf_s,
          |                                            ^~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 11:45:11 +08:00
likun17
71876ae098 lib_libvscanf.c:Add buffer data type conversion interface.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 11:44:47 +08:00
likun17
89a3f28a76 lib_libvsprintf.c:Add buffer data type conversion interface.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 11:44:47 +08:00
Petro Karashchenko
f0267bc507 arch/arm/samv7: add support of SocketLIN interface
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-19 09:39:54 +08:00
Petro Karashchenko
549ad08013 can/sja1000: drop driver dependency on __builtin functions
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-19 09:39:04 +08:00
xuxin19
1d3dd328dd modify BUILD_LOADABLE to MODULES which backwards-compatible Kernel
maintains the same semantics as Kernel’s module build
and compatible with Kconfiglib implementation.

The problem of kconfiglib not being able to use tri-states is this:
linux is here torvalds/linux@6dd85ff
The module option is extracted from one of the triate three states into a MODULE keyword.
Kconfiglib supports the default implementation of module to be MODULE for compatibility with the linux kernel, and triate degenerates into bool two states
Refer to this code: 061e71f7d7/kconfiglib.py (L4274-L4284)

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-19 08:32:03 +08:00
hujun5
0561b55860 arm: optimize up_interrupt_context used in armv[6/7/8]-m
resson:
using percpu storage for g_current_regs or leveraging interrupt status
registers to determine if code is running within an interrupt context can enhance performance.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-19 08:30:09 +08:00
hujun5
6a3a32b185 arch: move up_interrupt_context to arch specific irq.h
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-19 08:30:09 +08:00
hujun5
a754c517cc irq: use per-cpu reg to replace g_current_regs
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-19 08:30:09 +08:00
Shoukui Zhang
5d3d123272 BCH: Add readonly configuration for BCH devices
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-09-19 03:53:20 +08:00
anjiahao
e085f0ee80 armv8-m:arch libc function need save ip register use pacbti
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-19 03:50:53 +08:00
YAMAMOTO Takashi
df090a86f9 libc: add missing preadv/pwritev in CMakeLists.txt 2024-09-19 03:49:29 +08:00
yinshengkai
f326f15b40 sched: move DUMP_ON_EXIT to sched
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-19 03:49:12 +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
607b8effe9 driver/sensors: Let gnss geofence follow the existing naming rules
ORB_ID(sensor_gnss_geofence_event)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangjianyu3
ffac2a314b driver/sensors: Support GNSS Geofence
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangjianyu3
bf83b3fafc driver/sensors: Support GNSS Measurement & Clock
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangjianyu3
e830db0316 driver/sensors: Add constellation for GNSS
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
xuxin19
e03fba1ad4 cmake:fix 7300 cmake build fail,init gpsutils cmake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-19 03:44:49 +08:00
dongjiuzhu1
b17c074a18 nuttx/uorb: change unsigned long to uint32 to fix size issue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 03:44:49 +08:00
dongjiuzhu1
abbd9c7da9 drivers/sensors: Limit notification events to user
1. notify POLLIN to reader.
2. notify POLLPRI to writer,
in addition, notify POLLPRI to the user who completed the flush .

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 03:44:49 +08:00
dongjiuzhu1
403469336f driver/sensors: support sensor flush operation
Supports the flush operation of the sensor.

The application can initiate a flush action through ioctl SNIOC_FLUSH
to trigger flush, and the call will be returned immediately.
Using SNIOC_GET_EVENTS to clear flush event,

However, the flush implementation is asynchronous, when all the flush
data is push to upper circbuffer, the POLLPRI event(FLUSH_COMPLETED)
will be reported.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 03:44:49 +08:00
likun17
703bb7e7b3 sensor.c: Added new interface for obtaining and setting sensor device information.
When there is an actual physical sensor, the driver must implement the get info interface. The upper layer can obtain the actual physical sensor information through SNIOC_GET_INFO.
SNIOC_SET_INFO can only set the information of the local virtual sensor, which means it is bound to the local advertisement. Remote subscribers cannot set the information.

Usage:
  struct sensor_device_info dev_info;
  orb_ioctl(fd, SNIOC_GET_INFO, (unsigned long)(uintptr_t)&dev_info);

  or:
  ret = orb_set_info(fd, &dev_info);
  ret = orb_get_info(fd, &dev_info);

Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 03:44:49 +08:00
dongjiuzhu1
c0674b34d6 sensors/gps: using config to adjust gps recv size
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 03:44:49 +08:00
wangyingdong
84f326a66b Fix the bug that netlink receive wait does not hang up
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2024-09-19 03:19:15 +08:00
wanggang26
ff0194fb74 mmcsd: make a compatibility change for cmd12 and cmd23
For some sd cards don't support cmd23 or support cmd23 indicated by
bit33 in scr

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-19 03:17:48 +08:00
buxiasen
395c449884 critmon: update document about the critmon configurations usage.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-19 03:16:14 +08:00
yanghuatao
236678d730 toolchain/ghs: Fix CONFIG_SCHED_CRITMONITOR_MAXTIME_XXX "zero used for undefined preprocessing identifier" warnings
"~/nuttx/include/nuttx/sched.h", line 631: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 637: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 642: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 789: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 793: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 631: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_THREAD >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 637: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 642: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 789: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_PREEMPTION >= 0
      ^

"~/nuttx/include/nuttx/sched.h", line 793: warning #193-D:
          zero used for undefined preprocessing identifier
          "CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION"
  #if CONFIG_SCHED_CRITMONITOR_MAXTIME_CSECTION >= 0

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-09-19 03:16:14 +08:00
buxiasen
b33e20a586 critmon: fix context switch critmon pause err.
Elapsed time statistic up to now when sched happen

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-19 03:16:14 +08:00