guoshichao
67ec447513
sched/clock/clock_getcpuclockid: fix code format, remove space
...
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-05 13:03:06 +08:00
simonatoaca
fd4dd59c3c
Made the PWM frequency of the RGB driver configurable from the menu.
...
Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>
2023-07-05 00:49:44 +08:00
guoshichao
bc084a8505
sched/clock/clock_getcpuclockid: add clock_getcpuclockid implementation
...
1. the implementation can pass the full
ltp/open_posix_testsuite/clock_getcpuclockid testcases
2. the modification are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-05 00:32:11 +08:00
Petro Karashchenko
dc6baf68a9
.github/workflows: run MAC OS builds based on macos-13 image
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-05 00:16:44 +08:00
raiden00pl
91be7781f5
arch/armv8-m/arm_secure_irq.c: fix writing to the NVIC_AIRCR register
...
Register key (VECTKEY) must be written, otherwise the write is ignored.
Reference:
https://developer.arm.com/documentation/100235/0004/the-cortex-m33-peripherals/system-control-block/application-interrupt-and-reset-control-register
2023-07-05 00:02:42 +08:00
SPRESENSE
a03b09c34d
arch: cxd56xx: Fix bug when watchdog restart
...
Fix a bug that watchdog is expired in less time than the specified time
when restarting without clearing interrupt.
2023-07-04 10:37:17 -03:00
Sunny
abfdffd879
libc/libvsprintf:fix vsnprintf bug with "%#.0f"
...
With double value=3.141593 initialized in va_list ap,
such code:
vsnprintf(buffer, sizeof(buffer), "%#.0f", ap);
expected output string: "3."
but real output string: ".3"
Signed-off-by: Sunny <zxcvbnm37425@gmail.com>
2023-07-04 10:36:31 -03:00
Xiang Xiao
6b11672310
arch/sim: Remove the unused sim_camera_uninitialize
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-04 20:15:30 +09:00
Xiang Xiao
af50cdd21b
arch/sim: Rename sim_video to sim_camera
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-04 20:15:30 +09:00
SPRESENSE
6611bf99c4
drivers: video: isx012: Fix system clock to HV mode
...
ISX012 doesn't work if CONFIG_CPUFREQ_RELEASE_LOCK is enabled
without this changes.
2023-07-04 12:34:13 +03:00
SPRESENSE
d0d787c1b0
drivers: video: isx019: Fix system clock to HV mode
...
ISX019 doesn't work if CONFIG_CPUFREQ_RELEASE_LOCK
is enabled without this changes.
Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
2023-07-04 12:34:13 +03:00
libei1
63774125d9
arch/sim : Audio driver add AUDIOIOC_GETLATENCY ioctl
...
add AUDIOIOC_GETLATENCY definition, and add reference code in sim alsa.
Signed-off-by: libei1 <libei1@xiaomi.com>
2023-07-04 13:48:58 +08:00
Beat Küng
cbbeec3183
ramtron.c: add FM25V02A-DGQ
2023-07-04 08:19:56 +08:00
Petro Karashchenko
cb2849b4ab
Revert "tools: Fix CONFIG_BASE_DEFCONFIG generation"
...
This reverts commit bc4266fa48
.
2023-07-03 19:18:32 -03:00
Petro Karashchenko
d7af2f4c0a
tools/ci: remove 'brew update' needed for AVR toolchain installation on OSX
...
Remove 'brew update' introduced by https://github.com/apache/nuttx-testing/pull/88
as it seems to be not longer needed
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-03 19:16:19 -03:00
guoshichao
42f8308423
sched/clock/clock_getres: add two CPUTIME_ID res support
...
1. make the clock_getres can pass the
ltp/open_posix_testsuite/clock_getres 7-1, 8-1 two cases
2. the modification are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-03 23:11:00 +03:00
Junbo Zheng
7c8adecca8
fs/mount: correct df -h
output format
...
config: ./tools/configure.sh sim:nsh
correct before
```
nsh> df
Block Number
Size Blocks Used Available Mounted on
0 0 0 0 /bin
64 8 8 0 /etc
0 0 0 0 /proc
512 985 2 983 /tmp
nsh>
nsh> df -h
Filesystem Size Used Available Mounted on
binfs 0B 0B 0B /bin
romfs 512B 512B 0B /etc
procfs 0B 0B 0B /proc
vfat 492K 1K 491K /tmp
nsh>
```
correct after
```
nsh> df
Block Number
Size Blocks Used Available Mounted on
0 0 0 0 /bin
64 8 8 0 /etc
0 0 0 0 /proc
512 985 2 983 /tmp
nsh> df -h
Filesystem Size Used Available Mounted on
binfs 0B 0B 0B /bin
romfs 512B 512B 0B /etc
procfs 0B 0B 0B /proc
vfat 492K 1K 491K /tmp
nsh>
```
config: ./tools/configure.sh ../vendor/sim/boards/miwear/configs/miwear -j16
correct before
```
nsh>
nsh> df
Block Number
Size Blocks Used Available Mounted on
0 0 0 0 /bin
4096 240075962 87644775 152431187 /data
64 3621 3621 0 /etc
4096 240075962 87644775 152431187 /font
4096 240075962 87644775 152431187 /i18n
0 0 0 0 /proc
4096 240075962 87644775 152431187 /resource/app
4096 240075962 87644775 152431187 /resource/misc
4096 240075962 87644775 152431187 /resource/recovery
4096 240075962 87644775 152431187 /resource/system
4096 240075962 87644775 152431187 /system
512 26 24 2 /tmp
4096 240075962 87644775 152431187 /vendor
4096 240075962 87644775 152431187 /watchface
nsh>
nsh> df -h
Filesystem Size Used Available Mounted on
binfs 0B 0B 0B /bin
hostfs 915G 334G 581G /data
romfs 226K 226K 0B /etc
hostfs 915G 334G 581G /font
hostfs 915G 334G 581G /i18n
procfs 0B 0B 0B /proc
hostfs 915G 334G 581G /resource/app
hostfs 915G 334G 581G /resource/misc
hostfs 915G 334G 581G /resource/recovery
hostfs 915G 334G 581G /resource/system
hostfs 915G 334G 581G /system
tmpfs 13K 12K 1K /tmp
hostfs 915G 334G 581G /vendor
hostfs 915G 334G 581G /watchface
```
correct after
```
nsh>
nsh> date
Mon, Jul 03 02:09:53 2023
nsh>
nsh> df
Block Number
Size Blocks Used Available Mounted on
0 0 0 0 /bin
4096 240075962 87644776 152431186 /data
64 3621 3621 0 /etc
4096 240075962 87644776 152431186 /font
4096 240075962 87644776 152431186 /i18n
0 0 0 0 /proc
4096 240075962 87644776 152431186 /resource/app
4096 240075962 87644776 152431186 /resource/misc
4096 240075962 87644776 152431186 /resource/recovery
4096 240075962 87644776 152431186 /resource/system
4096 240075962 87644776 152431186 /system
512 26 24 2 /tmp
4096 240075962 87644776 152431186 /vendor
4096 240075962 87644776 152431186 /watchface
nsh>
nsh> df -h
Filesystem Size Used Available Mounted on
binfs 0B 0B 0B /bin
hostfs 915G 334G 581G /data
romfs 226K 226K 0B /etc
hostfs 915G 334G 581G /font
hostfs 915G 334G 581G /i18n
procfs 0B 0B 0B /proc
hostfs 915G 334G 581G /resource/app
hostfs 915G 334G 581G /resource/misc
hostfs 915G 334G 581G /resource/recovery
hostfs 915G 334G 581G /resource/system
hostfs 915G 334G 581G /system
tmpfs 13K 12K 1K /tmp
hostfs 915G 334G 581G /vendor
hostfs 915G 334G 581G /watchface
nsh>
```
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-07-03 23:09:46 +03:00
tjwu1217
75d0312b4c
sched/init/nx_start.c: Fix typo and format
2023-07-03 23:06:55 +03:00
simbit18
79db26bda3
drivers/sensors/apds9960.c: Fix mistakes in comments snerr
...
Fix mistakes in comments snerr
APDS9960_GCONFIG3 -> APDS9960_GCONFIG4
2023-07-03 23:05:36 +03:00
Michal Lenc
d470c3f268
samv7/sam_serial.c: reset all DMA pointers on DMA setup
...
This small fix ensures all DMA pointers are correctly reseted during
DMA setup (when the driver is opened). Without this there could be rare
occurrence of driver pointer to incorrect (invalidate) DMA buffer and thus
saving incorrect characters to upper layer.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-07-03 17:09:20 +03:00
Michal Lenc
49f153abb1
samv7/sam_xdmac.c: use sam_freelinklist only if circular buffer not used
...
Circular buffer does not use DMA linked list therefore function
sam_freelinklist() cannot be called as it would fail on assertion (csa
not defined). Peripheral that calls DMA should care of buffer invalidation
instead.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-07-03 17:09:20 +03:00
liuwei35
63ac8fbdfd
sim/audio register mixer device
...
add amixer register code
Signed-off-by: liuwei35 <liuwei35@xiaomi.com>
2023-07-03 10:18:37 -03:00
zhanghongyu
27d6f1e0c4
documentation: correct the nfs command format
...
Change the command format to the actual one in the system
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-03 10:18:00 -03:00
Nicolas Caramelli
e82b762fb7
input/touchscreen: Translate raw X/Y data into pixel coordinates
2023-07-03 10:17:04 -03:00
qiaohaijiao1
de5c35382a
sim/sim_alsa.c: add paused variable instead of snd_pcm_pause.
...
snd_pcm_hw_params_can_pause return false on sim.
add paused variable to support pause.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-07-03 13:51:09 +08:00
Zhe Weng
210c72a651
errno: Adjust help string for EALREADY and ESTALE
...
EALREADY:
Both Linux(asm-generic/errno.h) and FreeBSD(sys/sys/errno.h) regard it as "Operation already in progress"
ESTALE:
Linux specifically removed the "NFS" description, and we may not only use it for NFS
0ca4343518
The ECANCELED and EOWNERDEAD also use different strings from Linux's header, but their meanings are same, and NuttX's description are more likely to obey POSIX 1003.1-2008, so not changing them.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-03 13:38:02 +08:00
guoshichao
af53d7a178
libs/libc/aio/lio_listio: fix the heap use-after-free bug
...
1. the lio_sigsetup() method use a universal sighand instance across all
aiocb instances, but inside the lio_sighandler() method, if one aiocb is
handle finished, then this method will free the sighand instance that
come along with current aiocb instance. thus when handle next aiocb
instance, use-after-free crash will happen. in order to solve this
problem, we make each aiocb instance have their own sighand instance
2. make the lio_listio implementation can pass the
ltp/open_posix_testsuite/lio_listio testcases
3. the modification are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/lio_listio.html
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-03 13:37:34 +08:00
Petro Karashchenko
b1dd5d1189
drivers/wireles/gs2200m: add NET_TCP dependency to NFS_DONT_BIND_TCP_SOCKET option
...
The NFS_DONT_BIND_TCP_SOCKET should be selected only TCP networking is enabled
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-03 13:32:31 +08:00
wanggang26
57d521cc59
binfmt: Immediately exit from elf_loadbinary if elf format isn't supported
2023-07-03 00:52:16 +08:00
raiden00pl
76cf66165a
arch/nrf91: simplyfy modem option names
2023-07-03 00:52:01 +08:00
raiden00pl
1a6d507422
arch/{nrf52|nrf53|nrf91}: rename NRFxx to nRFxx to be compatible with the manufacturer's nomenclature
2023-07-03 00:52:01 +08:00
raiden00pl
cfdc305297
Documentation: initial doc for NRF91
2023-07-02 10:10:35 -03:00
raiden00pl
3d9a64ce27
boards: initial support for nrf9160-dk
2023-07-02 10:10:35 -03:00
raiden00pl
56961d9f34
arch/arm: initial support for NRF91
...
Port based on arch/arm/nrf53.
Modem not fully supported yet. At the moment, initialization and AT interface work.
Sockets and GNSS interface will be added later.
2023-07-02 10:10:35 -03:00
guoshichao
4af8c58b93
libs/libc/locale/langinfo: implement the nl_langinfo function
...
1. the nl_langinfo can help to pass the
ltp/open_posix_testsuite/strftime testcases
2. the implementation are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/nl_langinfo.html
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-02 13:57:36 +08:00
Petro Karashchenko
46facd44b3
drivers/net/netdev: improve granularity of 'quota' locking
...
There is no need to use global spinlock to protect netdev
specific data counters. Allocate per-netdev specific spinlock
to get better locking granularity.
Move C/C++ atomic support checking to compiler.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-01 15:27:09 -03:00
Masayuki Ishikawa
e78eade641
boards: qemu-armv8a: Add defconfigs for hypervisor
...
Summary:
- This commit adds netnsh_hv and netnsh_smp_hv to run the NuttX
with hypervisor environments
- Also updates README.txt
Impact:
- None
Testing:
- Tested with qemu=7.1 + kvm on raspi3b+ (ubuntu server 20.04)
- Tested with qemu-7.1 + hvf on M1/MBP (macOS 12.6.1)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-07-01 10:22:00 -03:00
tjwu1217
4969f8faf9
risc-v Toolchain.defs compatibility.
...
Reference:https://xpack.github.io/blog/2022/05/18/riscv-none-elf-gcc-v12-1-0-2-released/
RISC-V ISA updates
Compared to previous releases, starting from 12.x, the compiler implements the new RISC-V ISA, which introduces an incompatibility issue, and builds might throw error messages like unrecognized opcode csrr.
The reason is that csr read/write (csrr*/csrw*) instructions and fence.i instruction were separated from the I extension, becoming two standalone extensions: Zicsr and Zifencei.
The solution is to add _zicsr and/or _zifencei to the -march option, e.g. -march=rv32imac becomes -march=rv32imac_zicsr_zifencei.
2023-07-01 13:19:30 +08:00
Masayuki Ishikawa
248fe7529a
drivers: wireless: select NFS_DONT_BIND_TCP_SOCKET for GS2200M
...
Summary:
- https://github.com/apache/nuttx/pull/3707
Impact:
- None
Testing:
- Tested with spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-07-01 13:18:27 +08:00
Masayuki Ishikawa
c2af551355
fs: nfs: Introduce CONFIG_NFS_DONT_BIND_TCP_SOCKET
...
Summary:
- Some network drivers such as GS2200M do not support to bind
a local port for TCP client socket. In this case, this config
disables to bind the port.
- See also https://github.com/apache/nuttx/pull/3707
Impact:
- None
Testing:
- Tested with spresense:wifi_smp (Kconfig will be updated later)
- Tested with sabre-6quad:netnsh_smp (QEMU)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-07-01 13:18:27 +08:00
Masayuki Ishikawa
221d919b77
Revert "fs: nfs: Do not bind to a local port in TCP mode"
...
This reverts commit e1b14271c8
.
2023-07-01 13:18:27 +08:00
Alan Carvalho de Assis
245db6742c
esp32s2: Fix UART1 default pins
...
The default pins to UART1 should be 17 (TXD) and 18 (RXD).
2023-07-01 13:11:39 +08:00
Masayuki Ishikawa
8bbe7a8825
boards: Enable virtio-blk and FAT for virt configurations
...
Summary:
- I noticed that virtio-blk and FAT are not enabled for some
virt configurations.
- This commit enables them for testing.
Impact:
- None
Testing:
- Tested with qemu-7.1
- NOTE: file copy with rv-virt:knetnsh64 is sometimes unstable.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-07-01 13:10:40 +08:00
guoshichao
1466a9e2b6
libs/libc/aio: refactor the fd flags check procedure
...
1. make the implementation compatible with c89
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-06-30 20:23:09 -03:00
Xiang Xiao
5af99c65de
fs: Define __USE_FILE_OFFSET64 when CONFIG_FS_LARGEFILE is enabled
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-30 20:22:10 -03:00
Jani Paalijarvi
78a2c91a04
risc-v/mpfs: cache: Fix cache and scratchpad init
...
Initialize ICACHE way with correct mask.
Initialize scratchpad with constant g_init_marker as it has been done in HSS
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2023-06-30 20:19:54 -03:00
ThomasNS
f51d6b8c72
add userled driver initialization
2023-06-30 10:29:33 -03:00
ThomasNS
7864bf4870
spi4 working xmc4700-relax
2023-06-30 10:29:33 -03:00
Junbo Zheng
0d3252ba06
libs/libc: fix locale/lib_iconv.c:538:23: warning: dereference of NULL ‘scd’ [CWE-690] [-Wanalyzer-null-dereference] by -fanalyzer
...
CC: signal/sig_queue.c locale/lib_iconv.c: In function ‘iconv’:
locale/lib_iconv.c:538:23: warning: dereference of NULL ‘scd’ [CWE-690] [-Wanalyzer-null-dereference]
538 | if (!scd->state)
| ~~~^~~~~~~
‘iconv’: events 1-5
|
| 413 | x = 0;
| | ~~^~~
| | |
| | (1) ‘scd’ is NULL
| 414 | scd = NULL;
| 415 | if (((size_t)cd & 1) == 0)
| | ~
| | |
| | (2) following ‘false’ branch...
|......
| 421 | to = extract_to(cd);
| | ~~~~~~~~~~~~~~
| | |
| | (3) ...to here
|......
| 428 | if (in == NULL || *in == NULL || *inb == 0)
| | ~ ~~~
| | | |
| | | (5) ...to here
| | (4) following ‘false’ branch (when ‘in’ is non-NULL)...
|
‘iconv’: events 6-8
|
| 428 | if (in == NULL || *in == NULL || *inb == 0)
| | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | | |
| | | | (7) ...to here
| | | (8) following ‘false’ branch...
| | (6) following ‘false’ branch...
|
‘iconv’: event 9
|
|cc1:
| (9): ...to here
|
‘iconv’: events 10-14
|
| 433 | for (; *inb; *in += l, *inb -= l)
| | ^~~
| | |
| | (10) following ‘true’ branch...
| 434 | {
| 435 | c = *(FAR unsigned char *)*in;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (11) ...to here
|......
| 438 | switch (type)
| | ~~~~~~
| | |
| | (12) following ‘case 200:’ branch...
|......
| 529 | case UCS2:
| | ~~~~
| | |
| | (13) ...to here
|......
| 538 | if (!scd->state)
| | ~~~~~~~~~~
| | |
| | (14) dereference of NULL ‘scd’
|
locale/lib_iconv.c:565:23: warning: dereference of NULL ‘scd’ [CWE-690] [-Wanalyzer-null-dereference]
565 | if (!scd->state)
| ~~~^~~~~~~
‘iconv’: events 1-5
|
| 413 | x = 0;
| | ~~^~~
| | |
| | (1) ‘scd’ is NULL
| 414 | scd = NULL;
| 415 | if (((size_t)cd & 1) == 0)
| | ~
| | |
| | (2) following ‘false’ branch...
|......
| 421 | to = extract_to(cd);
| | ~~~~~~~~~~~~~~
| | |
| | (3) ...to here
|......
| 428 | if (in == NULL || *in == NULL || *inb == 0)
| | ~ ~~~
| | | |
| | | (5) ...to here
| | (4) following ‘false’ branch (when ‘in’ is non-NULL)...
|
‘iconv’: events 6-8
|
| 428 | if (in == NULL || *in == NULL || *inb == 0)
| | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | | |
| | | | (7) ...to here
| | | (8) following ‘false’ branch...
| | (6) following ‘false’ branch...
|
‘iconv’: event 9
|
|cc1:
| (9): ...to here
|
‘iconv’: events 10-14
|
| 433 | for (; *inb; *in += l, *inb -= l)
| | ^~~
| | |
| | (10) following ‘true’ branch...
| 434 | {
| 435 | c = *(FAR unsigned char *)*in;
| | ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (11) ...to here
|......
| 438 | switch (type)
| | ~~~~~~
| | |
| | (12) following ‘case 202:’ branch...
|......
| 557 | case UTF_32:
| | ~~~~
| | |
| | (13) ...to here
|......
| 565 | if (!scd->state)
| | ~~~~~~~~~~
| | |
| | (14) dereference of NULL ‘scd’
|
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-06-30 16:11:10 +08:00
Masayuki Ishikawa
9861d49cd4
arch: arm64: Add arm64_gic_raise_sgi() for SMP
...
Summary:
- I noticed that arm64_gic_raise_sgi() is not implemented for
GICv2 which is used for SMP + hypervisor such as qemu + kvm.
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with qemu-7.1 + kvm (linux) and qemu-7.1 + hvf (macOS)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-30 16:10:26 +08:00