hujun5
400239877d
risc-v: remove g_running_tasks[this_cpu()] = NULL
...
reason:
We hope to keep g_running_tasks valid forever.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 17:41:16 +08:00
Alin Jerpelea
19e42a8978
arch/tricore: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
3013ff9ba9
arch/renesas: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
3dde10adaa
arch/risk-v: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
eea3d77a6e
arch/sim: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
7d3fe64a6a
arch/sparc: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
b6a32301ee
arch/x86: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
5e0347b20a
arch/x86_64: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
8d50457dfc
arch/xtensa: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-02 17:23:25 +08:00
Alin Jerpelea
b3e1e21c65
arch/z16: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
2024-12-02 17:23:25 +08:00
Alin Jerpelea
99d8641cdd
arch/z80: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
2024-12-02 17:23:25 +08:00
chao an
9127d8f59b
sim/tflm: enable tflm hello world
...
tflm hello world is a basic test program to verify whether the tflm function works properly
refrash defconfig and enable tflm hello world:
Test on sim/tflm
$ cmake -B build -DBOARD_CONFIG=sim/tflm -GNinja
$ cmake --build build
$ ./build/nuttx
NuttShell (NSH) NuttX-10.4.0
nsh> tflm_hello
0 (id=0): size=16, offset=0, first_used=0 last_used=1
1 (id=1): size=64, offset=64, first_used=1 last_used=2
2 (id=2): size=64, offset=0, first_used=2 last_used=3
3 (id=3): size=16, offset=64, first_used=3 last_used=3
0: 0000000000...................................................................... (1k)
1: 0000000000..............................1111111111111111111111111111111111111111 (1k)
2: 22222222222222222222222222222222222222221111111111111111111111111111111111111111 (1k)
3: 22222222222222222222222222222222222222223333333333.............................. (1k)
"Unique Tag","Total ticks across all events with that tag."
FULLY_CONNECTED, 0
"total number of ticks", 0
[RecordingMicroAllocator] Arena allocation total 2344 bytes
[RecordingMicroAllocator] Arena allocation head 128 bytes
[RecordingMicroAllocator] Arena allocation tail 2216 bytes
[RecordingMicroAllocator] 'TfLiteEvalTensor data' used 240 bytes with alignment overhead (requested 240 bytes for 10 allocations)
[RecordingMicroAllocator] 'Persistent TfLiteTensor data' used 128 bytes with alignment overhead (requested 128 bytes for 2 tensors)
[RecordingMicroAllocator] 'Persistent buffer data' used 1152 bytes with alignment overhead (requested 1100 bytes for 7 allocations)
[RecordingMicroAllocator] 'NodeAndRegistration struct' used 192 bytes with alignment overhead (requested 192 bytes for 3 NodeAndRegistration structs)
0 (id=0): size=16, offset=0, first_used=0 last_used=1
1 (id=1): size=64, offset=64, first_used=1 last_used=2
2 (id=2): size=64, offset=0, first_used=2 last_used=3
3 (id=3): size=16, offset=64, first_used=3 last_used=3
0: 0000000000...................................................................... (1k)
1: 0000000000..............................1111111111111111111111111111111111111111 (1k)
2: 22222222222222222222222222222222222222221111111111111111111111111111111111111111 (1k)
3: 22222222222222222222222222222222222222223333333333.............................. (1k)
0 (id=0): size=16, offset=16, first_used=0 last_used=1
1 (id=1): size=16, offset=0, first_used=1 last_used=2
2 (id=2): size=16, offset=16, first_used=2 last_used=3
3 (id=3): size=16, offset=0, first_used=3 last_used=3
0: ................0000000000000000................................................ (1k)
1: 11111111111111110000000000000000................................................ (1k)
2: 11111111111111112222222222222222................................................ (1k)
3: 33333333333333332222222222222222................................................ (1k)
~~~ALL TESTS PASSED~~~
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-02 15:27:47 +08:00
hujun5
3c32517b94
riscv: syscall SYS_switch_context and SYS_restore_context use 0 para
...
reason:
simplify context switch
sys_call0(SYS_switch_context)
sys_call0(SYS_restore_context)
size nuttx
before
text data bss dec hex filename
148021 921 26944 175886 2af0e nuttx
after
text data bss dec hex filename
147995 921 26928 175844 2aee4 nuttx
size reduce -42
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 14:44:37 +08:00
xuxingliang
08139fb1db
nxgdb/thread: fix ps command
...
Fix ps command reports wrong running stack corruption.
To get running tcb registers, need to read from frame register not the tcb context.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-12-02 13:43:52 +08:00
xuxingliang
1d55f111f3
gdb: check if pid is valid
...
Add check to make sure pid is valid.
Remove stack check for interrupt context.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-12-02 13:43:52 +08:00
xuxingliang
1f2435641d
nuttxgdb: fix memdump busyloop when nodesize is 0
...
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-12-02 13:43:52 +08:00
xuxingliang
659e3f87a0
gdb/mmleak: add diagnose API to report details of the leak
...
Example of json dump:
{
"title": "Memory Leak Report",
"summary": "Total 105 blks, 22768 bytes leaked",
"result": "fail",
"command": "mm leak",
"data": [
{
"count": 1,
"pid": 0,
"size": 48,
"address": 1100447608,
"seqno": 0,
"alive": true,
"backtrace": []
},
{
"count": 1,
"pid": 4,
"size": 368,
"address": 1100549056,
"seqno": 1041,
"alive": false,
"backtrace": [
{
"address": 1076428472,
"function": "<mm_zalloc+8>",
"source": "mm_heap/mm_zalloc.c:45"
},
{
"address": 1076424018,
"function": "<mm_calloc+18>",
"source": "mm_heap/mm_calloc.c:57"
},
{
"address": 1076419750,
"function": "<calloc+22>",
"source": "umm_heap/umm_calloc.c:73"
},
....
]
},
}
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-12-02 13:43:52 +08:00
Zhe Weng
3ad53656b9
tools/gdb: Fix gdbinit to unload all nuttxgdb related modules
...
There are many modules like nuttxgdb.* that we need to unload
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-02 13:43:52 +08:00
trns1997
7d2d38f899
install kconfiglib using apt repo
2024-12-02 13:43:29 +08:00
wangjianyu3
f446fd5451
esp32s3-devkit/usbmsc: Add bind for MTD
...
And fix error: Unsupported sector size 256.
Test
# Build & Flash
./tools/configure.sh -l esp32s3-devkit:usbmsc
make flash ESPTOOL_PORT=/dev/ttyACMx
# Runtime (Device)
nsh> mkrd -m 10 -s 512 640
nsh> ls -l /dev/esp32s3flash
frw-rw-rw- 1048576 /dev/esp32s3flash
nsh> msconn
mcsonn_main: Creating block drivers
mcsonn_main: Configuring with NLUNS=2
mcsonn_main: handle=0x3fcdecc8
mcsonn_main: Bind LUN=0 to /dev/ram10
mcsonn_main: Bind LUN=1 to /dev/esp32s3flash
mcsonn_main: Connected
Log (Host)
[1478371.410664] usb 1-5: new full-speed USB device number 22 using xhci_hcd
[1478371.539471] usb 1-5: New USB device found, idVendor=584e, idProduct=5342, bcdDevice= 3.99
[1478371.539475] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1478371.539476] usb 1-5: Product: Mass Storage
[1478371.539477] usb 1-5: Manufacturer: NuttX
[1478371.539478] usb 1-5: SerialNumber: 0101
[1478371.542497] usb-storage 1-5:1.0: USB Mass Storage device detected
[1478371.542851] scsi host5: usb-storage 1-5:1.0
[1478372.582401] scsi 5:0:0:0: Direct-Access NuttX Mass Storage 0101 PQ: 0 ANSI: 2
[1478372.582785] scsi 5:0:0:1: Direct-Access NuttX Mass Storage 0101 PQ: 0 ANSI: 2
[1478372.582990] sd 5:0:0:0: Attached scsi generic sg3 type 0
[1478372.583167] sd 5:0:0:1: Attached scsi generic sg4 type 0
[1478372.584150] sd 5:0:0:0: [sdd] 640 512-byte logical blocks: (328 kB/320 KiB)
[1478372.801405] sd 5:0:0:0: [sdd] Write Protect is off
[1478372.801410] sd 5:0:0:0: [sdd] Mode Sense: 0f 00 00 00
[1478373.021406] sd 5:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[1478373.023228] sd 5:0:0:1: [sde] 2048 512-byte logical blocks: (1.05 MB/1.00 MiB)
[1478373.241405] sd 5:0:0:1: [sde] Write Protect is off
[1478373.241410] sd 5:0:0:1: [sde] Mode Sense: 0f 00 00 00
[1478373.461442] sd 5:0:0:1: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[1478374.353460] sde: sde1
[1478374.353725] sd 5:0:0:1: [sde] Attached SCSI disk
[1478374.363233] sd 5:0:0:0: [sdd] Attached SCSI disk
[1478375.442736] FAT-fs (sde1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-02 13:41:26 +08:00
hujun5
8b46a4d916
lc823450_usbdev: use small lock in arch/arm/src/lc823450/lc823450_usbdev.c
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:35:14 +08:00
hujun5
c116b6578a
max32660_wdt: use small lock in arch/arm/src/max326xx/max32660/max32660_wdt.c
...
reason:
we plan to remove all instances of spin_lock_irqsave(NULL)
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:34:53 +08:00
pengyiqiang
257339a442
video/fb: fix integer overflow issue
...
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-12-02 13:30:50 +08:00
hujun5
a0420df332
xtensa: remove g_running_tasks[this_cpu()] = NULL
...
reason:
We hope to keep g_running_tasks valid forever.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-02 13:29:59 +08:00
wangmingrong1
2aaf6641a2
Fix compile error
...
'ret' may be used uninitialized
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-02 11:32:48 +08:00
hujun5
30940d9251
imxrt_serial: use small lock in arch/arm/src/imxrt/imxrt_serial.c
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-01 18:02:10 +08:00
liamHowatt
0bdc9d24ab
libc/puts: newline was omitted for empty string
...
`puts("");` did not print a newline. The standard
behavior is to print a newline even if the string
is empty.
Signed-off-by: liamHowatt <liamjmh0@gmail.com>
2024-12-01 17:58:06 +08:00
Simon Filgis
6135892d66
driver for STUSB4500
...
right now it is only possible to change the delivered power on the fly
by
1. selecting PDO2 slot
2. write to POO2
3. renegotiate power delivery by sw reset command
2024-11-30 08:40:08 -03:00
wangjianyu3
5fbf377214
sensors/fakesensor_uorb: Using different nbuffer for each topic of GNSS
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
074c494f8f
nrf91: Support using different nbuffer for each topic
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
d2dd747e09
drivers/sensors/gnss: Different nbuffer for each topic
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
hujun5
16f39fbb56
fs: use small lock to protect filelist
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 03:25:17 +08:00
hujun5
fe2af95222
add spinlock_type.h
...
reason:
Due to incomplete handling of spinlock_t in arch/spinlock.h,
it should not be used directly by external code.
Furthermore, because pthread.h and nuttx/spinlock.h have a circular
dependency, pthread.h cannot successfully include nuttx/spinlock.h.
Therefore, we have split spinlock_type.h from spinlock.h.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 03:25:17 +08:00
wangjianyu3
f1a57f4265
drivers/sensors/gnss: Add suffix to macro of geofence index
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 03:16:25 +08:00
hujun5
ab0fb80e2b
arm64: change some format
...
fix the comment in https://github.com/apache/nuttx/pull/14980
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 03:15:54 +08:00
hujun5
74dfcdfbd6
cxd56xx: use small lock in arch/arm/src/cxd56xx/cxd56_clock.c
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 03:15:02 +08:00
Eero Nurkkala
53f4216977
risc-v/mpfs: clear IPIs at boot
...
Inter-processor interrupts (IPIs) are not cleared via mie/mip registers but
rather, at the MPFS_CLINT_BASE + mhartid * 4 (a word or 4-byte offset for
each hart).
If there's an IPI waiting, the system will continue to boot altough it's
expected to stay at the wfi loop waiting for the IPI.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-11-30 03:14:10 +08:00
Eero Nurkkala
e111c9a256
risc-v/mpfs: introduce CONFIG_MPFS_CLKINIT flag
...
This CONFIG_MPFS_CLKINIT is set with bootloaders by default. However,
this gives an option to have it unset. In some cases, the clocks
may be already set so it becomes unnecessary to re-initialize them.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-11-30 03:14:10 +08:00
buxiasen
7a4fac0df6
coredump: add BOARD_CRASHDUMP_CUSTOM support
...
For only board specific crashdump and no syslog/blk/mtd coredump
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 03:08:35 +08:00
buxiasen
ddf428d66c
coredump: support mtdoutstream
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 03:08:35 +08:00
wanggang26
3add14714e
coredump: fit sostream, mtdoutstream use alloc, info use stack
...
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 03:08:35 +08:00
buxiasen
88aaba29ba
coredump: update coredump method to choice, default NONE
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 03:08:35 +08:00
buxiasen
eca83c4a73
blk/mtdoutstream: use lib_sostream_s to support seek
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 03:08:35 +08:00
hujun5
321419491e
missing update running_task
...
This commit fixes the regression from https://github.com/apache/nuttx/pull/14865
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-30 02:48:58 +08:00
hujun5
635da96bae
xtensa: remove up_set_current_regs/up_current_regs
...
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>
2024-11-30 02:48:58 +08:00
wangmingrong1
137ca05249
arm64/toolchain: Cmake alignment makefile writing
...
They should be a relationship of choice:
ifeq ($(CONFIG_ARCH_CORTEX_A53),y)
ARCHCPUFLAGS += -mcpu=cortex-a53
else ifeq ($(CONFIG_ARCH_CORTEX_A55),y)
ARCHCPUFLAGS += -mcpu=cortex-a55
else ifeq ($(CONFIG_ARCH_CORTEX_A57),y)
ARCHCPUFLAGS += -mcpu=cortex-a57
else ifeq ($(CONFIG_ARCH_CORTEX_A72),y)
ARCHCPUFLAGS += -mcpu=cortex-a72
else ifeq ($(CONFIG_ARCH_CORTEX_R82),y)
ARCHCPUFLAGS += -mcpu=cortex-r82
else ifeq ($(CONFIG_ARCH_ARMV8A),y)
ARCHCPUFLAGS += -march=armv8-a
else ifeq ($(CONFIG_ARCH_ARMV8R),y)
ARCHCPUFLAGS += -march=armv8-r
endif
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-29 18:37:21 +08:00
chao an
8257b11944
arm/isr: move up_set_interrupt_context() to chip define
...
up_set_interrupt_context() is chip specific implement, move this function to correct place
Signed-off-by: chao an <anchao@lixiang.com>
2024-11-29 18:37:08 +08:00
chao an
2961ecab9f
sim/tflm: add tflite-micro demo into ci build
...
$ cmake -B build -DBOARD_CONFIG=sim/tflm -GNinja
$ cmake --build build
$ ./build/nuttx
NuttShell (NSH) NuttX-10.4.0
nsh> tflm -h
Utility to use tflite micro on nuttx.
[ -C ] Compile tflite model into c++ codes.
[ -E ] Do once evaluation (for profiling).
[ -i <str> ] Readable model file path.
[ -o <str> ] Writable c++ file path.
[ -p <str> ] Prefix of compiled code.
[ -a <int> ] Arena size (mempool).
[ -h ] Print this message.
nsh> tflm -E -i /data/MobileNet-v3-Small.tflite -o /data/MbileNet-v3-Small.out
0 (id=0): size=602112, offset=0, first_used=0 last_used=1
1 (id=1): size=602112, offset=602112, first_used=1 last_used=2
2 (id=2): size=602112, offset=0, first_used=2 last_used=3
3 (id=3): size=607504, offset=802816, first_used=3 last_used=4
...
* (id=114): size=4096, offset=0, first_used=114 last_used=115
* (id=115): size=4000, offset=4096, first_used=115 last_used=115
0: 00000000000000000000000000...................................................... (588k)
1: 0000000000000000000000000011111111111111111111111111............................ (1176k)
2: 2222222222222222222222222211111111111111111111111111............................ (1176k)
3: 22222222222222222222222222........333333333333333333333333333................... (1182k)
...
"Event","Tag","Ticks"
0,SUB,0
1,MUL,0
2,PAD,0
3,CONV_2D,1
4,HARD_SWISH,0
5,PAD,0
...
110,MEAN,0
111,FULLY_CONNECTED,0
112,FULLY_CONNECTED,0
113,MUL,0
114,FULLY_CONNECTED,0
"Unique Tag","Total ticks across all events with that tag."
SUB, 0
MUL, 0
PAD, 0
CONV_2D, 3
...
"total number of ticks", 3
nxai done!
Signed-off-by: chao an <anchao@lixiang.com>
2024-11-29 18:34:10 +08:00
anjiahao
68ac081bd1
mps3-an547:update Documentation
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-29 18:33:18 +08:00
Michal Lenc
a8d4ed910d
st7789: add configuration option to set default background color
...
ST7789 fills the display with 0xffff color during its initialization.
This color may or may not be overwritten by a higher layer (framebuffer
or lcd driver for example). The color remains on the display until
application UI is started if not overwritten by the higher layer before.
This commit adds configuration option LCD_ST7789_DEFAULT_COLOR that
allows to set the default background color. This may avoid shining
display with, for example, white color for an extensive amount of time.
The default value is set to 0xffff previously hard-coded in the driver,
therefore current implementations will not notice the change.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-29 18:32:22 +08:00