Commit Graph

42844 Commits

Author SHA1 Message Date
Gustavo Henrique Nihei 5883abbe77 fs: Add data structure for Partition Information
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:39:02 +08:00
Gustavo Henrique Nihei 845b1e8043 risc-v/esp32c3: Implement MTDIOC_ERASESTATE for SPI Flash driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:37:48 +08:00
Gustavo Henrique Nihei 4c13006515 drivers/mtd: Implement MTDIOC_ERASESTATE for MTD drivers
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:37:48 +08:00
Gustavo Henrique Nihei 66aa221947 arm/lpc43xx: Implement MTDIOC_ERASESTATE for SPIFI Flash driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:37:48 +08:00
Gustavo Henrique Nihei 5784d1384b xtensa/esp32: Implement MTDIOC_ERASESTATE for SPI Flash driver
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:37:48 +08:00
Gustavo Henrique Nihei f5964d55dd mtd: Add MTDIOC_ERASESTATE command for retrieving erase state value
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:30:30 +08:00
Xiang Xiao 622c637832 fs/userfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 18:18:52 +08:00
Xiang Xiao 276f99d239 fs/unionfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 18:18:52 +08:00
Jiuzhu Dong 36ac863777 endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 17:58:17 +08:00
Jiuzhu Dong 10f091fdbb byteswap.h: add byteswap.h header file
Change-Id: I2b00618f608efbb8834328823b5e0eaa66f42aba
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 16:49:39 +08:00
zhuyanlin 62ce5ca966 xtensa:coproc: fix XTENSA_CP_ALLSET error in some case
Consider follow coprocessor configuration case:

\#define XCHAL_CP_NUM                    1       /* number of coprocessors */
\#define XCHAL_CP_MAX                    2       /* max CP ID + 1 (0 if none) */
\#define XCHAL_CP_MASK                   0x02    /* bitmask of all CPs by ID */
\#define XCHAL_CP_PORT_MASK              0x00    /* bitmask of only port CPs */
\
\#define XCHAL_CP1_NAME                  "AudioEngineLX"
\#define XCHAL_CP1_IDENT                 AudioEngineLX
\#define XCHAL_CP1_SA_SIZE               208     /* size of state save area */
\#define XCHAL_CP1_SA_ALIGN              8       /* min alignment of save area */
\#define XCHAL_CP_ID_AUDIOENGINELX       1       /* coprocessor ID (0..7) */

In this case, XTENSA_CP_ALLSET is 0x1, but valid coprocessors
bitmap is 0x2, use marco XCHAL_CP_MASK instead, it is bitmap of all
vaild coprocs.

Change-Id: I63ec01e4bd0cbafc62d56636cc11bdc4a2f7857f
2021-08-11 10:40:01 +08:00
zhuyanlin dd2f465055 arch:xtensa: add arch stdarg.h include file for xtensa
Add arch/include/stdarg.h for xtensa.

Change-Id: Ia914ca0f4c95e86b130983ce690479a994a08b56
2021-08-11 10:39:44 +08:00
Xiang Xiao 4d96dc801c fs/nfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 20:45:53 +08:00
Xiang Xiao 66ddc7fd62 fs/nfs: Return nanosecond from nfs_fstat and nfs_stat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 20:43:25 +08:00
Xiang Xiao 31475a94ac fs/nfs: Support 64bit file length
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 20:42:21 +08:00
Xiang Xiao d27a86486f fs/hostfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:33:14 +08:00
chao.an 0c06c44258 boards/sim: fix cxx build break
revert commit:

commit ecd66eb90c
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Fri Oct 23 09:28:27 2020 +0900

    sim: libcxx: Use __GLIBCXX__ ABI for non macOS

-----------------------------------------------------------------
commit 3fc06ff2d1
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Thu Oct 22 10:47:08 2020 +0900

    sim: Specify -fshort-wchar as NuttX wchar_t is 16-bit
-----------------------------------------------------------------

Change-Id: Idefd81ca3b0a88a38fcdfa0796c1a2897b4a015b
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-10 11:56:14 +08:00
Xiang Xiao 7afb3354cc fs: Add utimens and lutimens
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:09:35 +08:00
Xiang Xiao c360ae777b fs/hostfs: Change all priv_ to priv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:09:35 +08:00
Xiang Xiao e09dc6069b arch/arm: Add CONTROL register bit field definition
and replace all hardcode value

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:08:29 +08:00
Xiang Xiao ad827673b2 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If32db0451e10fb02e0c12ed48f2b7120859b8ae3
2021-08-09 21:03:17 +08:00
Xiang Xiao 4bffde887d Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66cf8f3201560ce71576279640e94ae3147ad0a2
2021-08-09 21:03:17 +08:00
liuhaitao 6442b8ea2d Revert "libc: Implement fesetround & fegetround for arm"
The updated GNU Arm Embedded Toolchain Version 10.3-2021.07 has implemented
fesetround & fegetround.

This reverts commit 5c0a079aea.

Change-Id: I6418c1f47a6c1a319a2973f01340480d50f54e8e
2021-08-09 20:02:47 +08:00
xiatian6 ca095b2d90 Feature: Sensor: Add ct7117 temperature sensor driver.
N/A

Add ct7117 temperature sensor driver for nuttx.

Change-Id: Ibc21e732c418ab2d61cc40a806c82cc76ad400bd
2021-08-09 18:30:04 +08:00
Xiang Xiao 9ca5722522 board/sim: Enable locale related setting in nsh
to extend the daily build cover the locale code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 16:50:55 +08:00
yangjiukui fe98e909d2 L61: Sensor: Add sensor driver for LSM6DSO.
N/A

Add driver for the STMicro LSM6DSO.

Change-Id: I462a2912cf8c7f141f285e482c8222bdb854b5ee
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-08-09 11:39:42 +08:00
Jiuzhu Dong 8ecd51ac0e cmd/df: Fix the abnormal output after off_t change
Change-Id: Ieaf063cb636a77eea971cb19e6eaeea6421bff4b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-06 10:20:55 +08:00
Xiang Xiao df1ffd9680 signal: Allow SIG_EVTHREAD selectable in protected mode
since we can delivery signal through libs/libc/wqueue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 21:19:34 +08:00
chao.an 3bd2a5b11a local/stream: remove preamble header in stream mode
Preable sync header is no necessary in stream mode

Signed-off-by: chao.an <anchao@xiaomi.com>
Change-Id: Id269fc09cf877ec6dc42706eb667adfc5362bf7a
2021-08-05 21:14:23 +08:00
chao.an acad830329 net/local: remove unused client lc_remaining
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-05 21:14:14 +08:00
zhuyanlin cca615e35f arch:xtensa:include chip/irq.h instead of depend on chip config.
Many duplicate code when more chips add-in,
follow arch/arm/include/irq.h method, use chip/irq.h instead.

Change-Id: I42f516c1dda68e973939c669f627c457cd0bc65e
2021-08-05 14:07:08 +08:00
zhuyanlin 2152ec3fbb arch:xtensa_testset: remove include arch/spinlock.h
In config with no "CONFIG_SPINLOCK", include arch/spinlock.h will lead to
build error as multi definition with spinlock_t. Nuttx/spinlock.h will
include arch/spinlock.h when needed.

Change-Id: I33b48503f679ec79af3a0ef1f0fb1536aaf1ce7c
2021-08-05 14:07:08 +08:00
zhuyanlin acf8d58472 arch:xtensa: use letter 'i' in inline assemble constraint instead of I
Some toolchain such as xtensa-xcc is unrecognize with constraint letter 'I',
letter 'i' is more common in GNU assembler.

Change-Id: I00f6a33fd7a5f2b95508c683e9954d402b68755f
2021-08-05 14:07:08 +08:00
zhuyanlin 15abaf6eaa arch:xtensa: add multi GNU toolchain for xtensa.
Add support xcc/xclang/esp GUN toolchin in xtensa,
ESP toolchain is default.

Change-Id: Id00bcf4a16c1e16862a106db32b1da3f3713a14c
2021-08-05 14:07:08 +08:00
zhuyanlin 9e2d5e4e7e build.sh: add license file and set EXTRAFLAG when arch is xtensa.
Change-Id: I3c93f78297d4216b4b1ad25532aa3f2e23bb4d54
2021-08-05 14:06:59 +08:00
Xiang Xiao e783f6e648 libc/gettext: Change g_domain to array
otherwise textdomain will deference NULL pointer in the default case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 12:14:52 +08:00
liuhaitao 694e7d29f4 armv8-m: correct CONFIG_SYS_RESERVED from 8 to 9 accordingly
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I94a24140c57f21e80b7a0c517e7458adf23e2c88
2021-08-04 22:42:50 +08:00
Xiang Xiao 030d496728 Fix the printf warning after off_t change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id46daa2ee690a73d3187b479f0e7ab0e2e361764
2021-08-04 16:13:25 +08:00
Xiang Xiao 6c9ea8d293 fs: Change off_t and related types to int64_t if long long is supported
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 14:06:26 +08:00
Xiang Xiao 43e98a5d2d Fix variable 'catd' is used uninitialized whenever 'if' condition is false
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-04 14:02:30 +08:00
Xiang Xiao b2b4ad864b libc: Implement gettext function
https://www.man7.org/linux/man-pages/man3/dcgettext.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5817bb8114a1bb05c4dfa133baa084d1cd5f1b06
2021-08-04 14:02:16 +08:00
licheng aad8396354 EXC_SECURE and SECURE_STACK just can clear at TRUSTZONE_NONSECURE 2021-08-04 10:39:35 +08:00
liuhaitao d54b066e8f Revert "Revert "armv8-m: Fix EXC_RETURN for non-secure usage""
This reverts commit 48beda08e2.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I5094d94ee64182b346fbcf6d7695b6259e3b006a
2021-08-04 10:39:35 +08:00
liuhaitao a0de639ca3 Add the missing SYS_pthread_exit in armv8-m svcall.h
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I42acaab45420aa123221b8832996b23ff412f575
2021-08-03 22:08:26 +08:00
Xiang Xiao b7ca3dbbc8 fs: Save umask to tls_task_s for non kernel mode only
since the kernel mode has the dedicated userspace

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:43:34 +08:00
Xiang Xiao af26bc798d libc: Remove include/nuttx/lib/regex.h and libs/libc/misc/lib_match.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:39:11 +08:00
Jiuzhu Dong b05bce3090 tzset: avoid taking semaphore in interrupt for non-kernel mode
Change-Id: Ic72819eddb38621751e462fe32e9e433288fb33c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-02 20:45:34 +08:00
Xiang Xiao 31f761cd48 libc: Support message catalog function
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 19:47:20 +08:00
Xiang Xiao 400db72d79 libc: Rename match to fnmatch
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 12:02:39 +08:00
Xiang Xiao 14c6bd1a5d libc: Add the empty nl_langinfo implementation
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 09:49:11 +08:00