Commit Graph

46755 Commits

Author SHA1 Message Date
chao an
09cc29af4d arch/armv6-m: fix compile error on LLVM clang
armv6-m/arm_exception.S:139:2: error: invalid instruction, any one of the following would fix this:
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:2: note: instruction requires: thumb2
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:10: note: invalid operand for instruction
 sub r1, #(4 * (10))
         ^
armv6-m/arm_exception.S:139:2: note: no flag-preserving variant of this instruction available
 sub r1, #(4 * (10))
 ^
armv6-m/arm_exception.S:139:10: note: operand must be a register in range [r0, r7]
 sub r1, #(4 * (10))
         ^
-----------------------------------------

bringup.c:125:18: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
          return ret;
                 ^~~
bringup.c:73:10: note: initialize the variable 'ret' to silence this warning
  int ret;
         ^
          = 0

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-25 00:52:00 +08:00
chao an
539f9a862e arm/cache: fix build warning on LLVM clang
armv7-m/arm_cache.c:93:24: warning: unused function 'arm_clz' [-Wunused-function]
static inline uint32_t arm_clz(unsigned int value)
                       ^

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-24 23:37:30 +08:00
SPRESENSE
00d1a7db29 boards: cxd56xx: Update imageproc driver
Fix raster operation bug in non-scaling case, and change the type
of return value to int with error code for some functions.
2022-10-24 22:54:46 +08:00
Jiuzhu Dong
d6423b5527 romfs: expand file cache by CONFIG_FS_ROMFS_FCACHE_NSECTORS
The default size of file cache is size of a sector, it may
not be good size for optimizing read/write speed in physical
device. So we can set the config according to speed test profile
to optimize access IO speed.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-10-24 20:49:09 +08:00
chao an
c629fd1b00 arm/phy62xx: fix compile warning ('while' clause does not guard)
chip/flash.c: In function '_spif_read_status_reg_x':
chip/flash.c:46:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   46 |         while ((AP_SPIF->fcmd &0x02)==0x02);         \
      |         ^~~~~
chip/flash.c:128:3: note: in expansion of macro 'SPIF_STATUS_WAIT_IDLE'
  128 |   SPIF_STATUS_WAIT_IDLE(SPIF_WAIT_IDLE_CYC);
      |   ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-24 20:23:59 +08:00
chao an
fa0577ebfb boards/arm/gcc: disable coverage analysis temporarily
**Please revert this change if arm resolved this issue in the next release**

ARM GNU toolchain 11.3.Rel1 missing gcov_* symbols:

https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53354/arm-gnu-toolchain-11-3-rel1-missing-gcov_-symbols

$ arm-none-eabi-gcc -v
...
gcc version 11.3.1 20220712 (Arm GNU Toolchain 11.3.Rel1)

$ cat main.c
int __start(void)
{
  return 0;
}

Compiler with arm GCC-11.3:

$ arm-none-eabi-gcc -c -Wstrict-prototypes -Os -fno-strict-aliasing -fomit-frame-pointer -fprofile-generate \
-ftest-coverage -mthumb --coverage -fno-common -Wall -Wshadow -Wundef -ffunction-sections -fdata-sections -g \
-mlittle-endian -mcpu=cortex-m0 -mthumb -mfloat-abi=soft main.c -o main.o

$ arm-none-eabi-ld --entry=__start -nostdlib --gc-sections -Tpimoroni-tiny2040-flash.ld -o test_gcov --start-group main.o \
~/gcc/linux/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v6-m/nofp/libgcov.a --end-group
arm-none-eabi-ld: main.o: in function `__start':
/home/archer/code/nuttx/n4/incubator-nuttx/main.c:2: undefined reference to `__gcov_indirect_call_profiler_v4'
arm-none-eabi-ld: /home/archer/code/nuttx/n4/incubator-nuttx/main.c:4: undefined reference to `__gcov_indirect_call'
arm-none-eabi-ld: /home/archer/code/nuttx/n4/incubator-nuttx/main.c:4: undefined reference to `__gcov_time_profiler_counter'

link success with arm GCC-10.3:

$ arm-none-eabi-ld --entry=__start -nostdlib --gc-sections -Tpimoroni-tiny2040-flash.ld -o test_gcov --start-group main.o \
~/lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/libgcov.a --end-group
$ ls -l test_gcov
-rwxrwxr-x 1 archer archer 68744 10月 24 12:51 test_gcov

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-24 20:23:28 +08:00
SPRESENSE
a4df3c0330 arch: cxd56xx: Fix deadlock by using GNSS CEP file on SPI-Flash
If you specify a file path on SPI-Flash in CONFIG_CXD56_GNSS_CEP_FILENAME,
it causes a deadlock issue in the inter-CPU communication. To resolve it,
introduce a new CONFIG_CXD56_GNSS_CEP_ON_SPIFLASH and then use pre-read
buffers during checking CEP file. So this needs the large of free memory.
2022-10-24 19:19:44 +08:00
W-Mai
07a2fa8d57 ci/docker: copy clang-extdef-mapping to clang-arm
Clang relies on clang-extdef-mapping for ctu checking. But clang-arm doesn't provide this file
A tweaking way to support this feature is copy a `clang-extdef-mapping` from other clang version.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2022-10-24 17:04:45 +08:00
SPRESENSE
e66bb207aa drivers/modem/alt1250: Change return type of bool function 2022-10-24 10:44:01 +02:00
SPRESENSE
22a29fdc97 arch: cxd56xx: Fix stall bulk xfer when sending 512 byte data
Remove hardware zero length packet enhancement because of driver
logic already processed the ZLP correctly. It is unnecessary and cause
of IN interrupt lost.
2022-10-24 09:02:39 +02:00
SPRESENSE
306029e6e4 lte: Include nuttx/fs/ioctl.h instead of wireless.h
lte command definitions are separated from wireless ioctl.
2022-10-24 13:09:29 +08:00
Petro Karashchenko
2fd7e18a16 include/sys: fix style issues in queue.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-24 12:59:24 +08:00
Petro Karashchenko
e43db5fe28 sched/semaphore: fix typo in comment
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-24 12:59:24 +08:00
Petro Karashchenko
a74dddd2ff arch/risc-v/src/mpfs/hardware: fix alignment in comment
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-24 12:59:24 +08:00
SPRESENSE
33f903178e drivers/modem/alt1250: Fix poll function
Notify only when there are available events.
2022-10-24 12:57:22 +08:00
Xiang Xiao
8c1036b7a1 tools/ci/docker/linux/Dockerfile: Keep the installation in alphabetical order
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 17:10:01 -07:00
Xiang Xiao
d922119f0a tools/ci/docker/linux/Dockerfile: Intall libtinfo5 in final image
fix the following error:
/tools/clang-arm-none-eabi/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 17:10:01 -07:00
Xiang Xiao
4aad964d48 Fix sam4s_nand.c:152:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 22:44:35 +02:00
Xiang Xiao
00d78a51e4 Fix usbhost/usbhost_hub.c:1339:3: error: 'free' called on pointer 'alloc' with nonzero offset 12 [-Werror=free-nonheap-object]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 22:44:35 +02:00
Xiang Xiao
57b6447e0a Fix error: mmcsd/mmcsd_sdio.c:2669:35: error: 'buffer' may be used uninitialized [-Werror=maybe-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 22:44:35 +02:00
Xiang Xiao
ee82f7b5ca Fix error: proxies/PROXY_socketpair.c:9:55: error: argument 4 of type 'int *' declared as a pointer [-Werror=array-parameter=]
9 | int socketpair(int parm1, int parm2, int parm3, int * parm4)
      |                                                 ~~~~~~^~~~~
In file included from proxies/PROXY_socketpair.c:4:
/github/workspace/sources/nuttx/include/sys/socket.h:373:56: note: previously declared as an array 'int[2]'
  373 | int socketpair(int domain, int type, int protocol, int sv[2]);
      |

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 12:08:30 +08:00
Xiang Xiao
ab12bea1ae Fix vfs/fs_timerfd.c:73:17: error: duplicate member 'lock'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-23 12:08:30 +08:00
Xiang Xiao
d0bd68b35e Fix random_pool.c:214:13: error: conflicting types for 'getentropy'
214 | static void getentropy(FAR blake2s_state *S)
       |             ^~~~~~~~~~
 In file included from /home/work/ssd1/workspace/MiRTOS-CI@2/out/miwear/ap/.unionfs/nuttx/include/nuttx/mutex.h:31,
                  from random_pool.c:37:
 /home/work/ssd1/workspace/MiRTOS-CI@2/out/miwear/ap/.unionfs/nuttx/include/unistd.h:428:9: note: previous declaration of 'getentropy' was here
   428 | int     getentropy(FAR void *buffer, size_t length);
       |         ^~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 20:52:19 +02:00
Xiang Xiao
e91e144fb6 Fix sensors/hyt271.c:811:16: error: 'data.data' may be used uninitialized [-Werror=maybe-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 20:14:38 +02:00
Xiang Xiao
85deafd7bf Fix bcmf_netdev.c:705:7: error: 'strnlen' specified bound 2 exceeds source size 1 [-Werror=stringop-overread]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 20:14:38 +02:00
Miguel Herranz
819ebe7356 libc/stdio: Add stdio file locking functions
Add flockfile(), ftrylockfile() and funlockfile() functions [1].

[1] POSIX.1-2008 / System Interfaces / flockfile
    https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/flockfile.html

Signed-off-by: Miguel Herranz <miguel@midokura.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 23:34:45 +08:00
Xiang Xiao
19d1e08717 tools/ci/docker/linux/Dockerfile: Intall libncurses5-dev in final image
fix the following warning:
clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 11:48:24 -03:00
raiden00pl
f1277a2233 stm32/socketcan: fix the EFF flag for received frames 2022-10-22 17:28:55 +08:00
Xiang Xiao
4ea0c905e6 ci: Install LLVM Embedded Toolchain for Arm
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-22 17:04:21 +08:00
Tiago Medicci Serrano
b16ed003f1 documentation: add documentation for ESP32-S2/S3/C3
Add documentation for ESP32-S2 and ESP32-S2 Saola 1 board
Add links to already existing ESP32-S3 documentation
Add links to already existing ESP32-C3 documentation
2022-10-22 15:18:35 +08:00
Tiago Medicci Serrano
1d0a37cd10 xtensa/esp32: fix if define convention to use parentheses 2022-10-22 15:18:35 +08:00
Tiago Medicci Serrano
ebf9af662e xtensa/esp32s2: add support for the CS4344 audio codec
Include i2schar and audio defconfigs for ESP32-S2-Saola-1 board.
2022-10-22 15:18:35 +08:00
Tiago Medicci Serrano
16b99ee013 xtensa/esp32s2: add initial support for I2S
Add initial support for the I2S peripheral on ESP32S2.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-S2-Saola-1 board.
2022-10-22 15:18:35 +08:00
anjiahao
1c416b1712 Documentation:add nxmutex Description
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
anjiahao
577e550698 libc/semaphore:sem_init change defult protocol
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
anjiahao
e1ca516488 use SEM_INITIALIZER inside of NXSEM_INITIALIZER
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
anjiahao
5724c6b2e4 sem:remove sem default protocl
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
chao an
205c8934a3 sched/msgq: add support of System V message queue
https://man.openbsd.org/msgget.2

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-22 12:58:11 +08:00
chao an
96c3debe6a sched/mqueue: decoupling condition member to common prologue
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-22 12:58:11 +08:00
zouboan
39a2acb821 AUTHORS: Add myself into authors list 2022-10-22 12:05:01 +08:00
Xiang Xiao
b42b8c9275 Revert "Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022""
This reverts commit 8150534a2f.
2022-10-22 09:12:18 +08:00
AuroraRAS
280aaa7b1d Implement Interface method for ESP32C3: go_setpintype
Signed-off-by: AuroraRAS <chplee@gmail.com>
2022-10-22 09:01:37 +08:00
Alin Jerpelea
06c8e43df9 drivers: modem: update altair modem
update Altair modem with the ALT1250 implementation

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-10-22 09:00:32 +08:00
raiden00pl
2b0ce033d7 net/can/can_xxxsockopt.c: correct the code alignment 2022-10-21 16:24:13 -03:00
Michael Jung
ec3805721c armv8-m: Fix MPU Region Limit Address config
On armv8-m the MPU region limits are inclusive.  Thus, we must substract
one byte of size from (base + limit).

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-10-21 16:23:49 -03:00
Michael Jung
d4cbb4f5b8 armv8-m: Fix MPU Attribute Indirection reg offsets
Both MPU_MAIR0 and MPU_MAIR1 were off by 0x10.

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2022-10-21 16:23:49 -03:00
zhangyuan21
16b6d365e9 fs/procfs: check task status before get group info
When ps cmd is invoked during the task exit process, the group information of the task may be deleted.
So need check the task flag before get the task group information.
2022-10-21 18:47:58 +08:00
raiden00pl
36ae5316b7 include/nuttx/can.h: make error definitions compatible with Linux 2022-10-21 18:47:29 +08:00
zhanghongyu
2a6a869962 tcp: Update conn laddr after select device
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-21 18:47:13 +08:00
Zhe Weng
4ac44bc8b5 arch/sim: fix MTU mismatch on TAP device in host route mode
In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-10-21 16:57:36 +08:00