Commit graph

42953 commits

Author SHA1 Message Date
Xiang Xiao
64144bbc4e tools/checkstack.pl: Correct the usage comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I08221d9175647d9081338e9b031e10e3500b8e32
2021-09-02 14:26:42 +08:00
Xiang Xiao
02b3c5ad70 tools/checkstack.pl: Support thumb2 function prologue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie4fc9e39f4ef3490013425d2c8444a53d4ab6568
2021-09-02 14:26:42 +08:00
zhouliang3
a8b0bced5a fs/littlefs: Fix the bug of missing file types
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: If6eee288558d5325c1ee15d63f6ad35bcdb5ffa7
2021-09-02 11:35:40 +08:00
Xiang Xiao
90c839abbb libxx: Move the partial c++ abi implementation to libcxxmini sub folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2bc9b8be2962451a44352ab90623c9481bd162b2
2021-09-01 18:03:06 +08:00
zhuyanlin
cf2d061be3 libxx: use libxxabi, uClibxx in local code
N/A

Change-Id: I8322f89eb3afb2e404eb2d0164f578785870a3d3
2021-09-01 11:30:28 +08:00
zhouliang3
fe3b842628 fs/littlefs: Implement fchstat and chstat of littlefs
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I200184e7156a14902ffa13962d898bdda50291bb
2021-08-31 20:44:59 +08:00
futerigele
e3b87ea0aa feat: touch: add io command for touch firmware version
CHAMPION-53

add io command for touch firmware version

Change-Id: I777285d2343b32ffd9caef2fc746fe491c5890d7
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-08-31 20:18:35 +08:00
Jiuzhu Dong
40380c117c fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
Change-Id: Ib285455a251bd3c475e8ff402936070da209eb67
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 19:17:20 +08:00
Xu Xingliang
e42c3ea8a8 libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: Ic88876b254e29ac6156f8b2b15c5321af62f4e24
2021-08-31 18:18:02 +08:00
Jiuzhu Dong
5e8b1fba63 binfmt: remove file_ioctl and get filename by strrchr
Change-Id: I8049f7d395ae9fcdfba7d1d887d818e8deeac36b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 16:04:40 +08:00
Jiuzhu Dong
73617a3812 exfatfs_dup: alloc new handle for dup fd
VELAPLATFO-193

Change-Id: I4888b681a79fbcfbb06df19bed43180283b37a35
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 15:44:29 +08:00
Jiuzhu Dong
c7bf3567c2 exfatfs: getpath by ioctl using cmd:FIOC_GETPATH
N/A

Change-Id: Ic02045c0b27c99226c4ae58c30fe6fd7ee46e82a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 15:44:29 +08:00
Jiuzhu Dong
85e5bff276 exfatfs_seek: return current location plus offset bytes when whence is SEEK_CUR
VELAPLATFO-195 VELAPLATFO-194

Change-Id: Ic81d3169f948e70ed5f87fca1b78ce5905f59c98
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 15:44:29 +08:00
zhuyanlin
af3d84cb19 libc:machine: add atomic_load/store/exchange API
Add atomic_load/store/exchange API

Change-Id: I6196b077d1e76cd1e0506ee66e2885e541525eb1
2021-08-31 14:16:34 +08:00
Xiang Xiao
a901ab35ad libxx: Remove the unused libxx_stdthrow.cxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-31 11:39:21 +08:00
Xiang Xiao
19e5ba9ef4 libxx: Move libcxxabi special setting from libcxx.defs to libcxxabi.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-31 11:39:12 +08:00
Xiang Xiao
7768b66bf4 libxx: Give VERSION make variable prefix to avoid the conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icca26524e3154300ed863650db24f88a9a8e295a
2021-08-31 11:39:01 +08:00
Abdelatif Guettouche
eb621457d0 libs/libxx/uClibc++.defs: Download the correct file type.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-31 11:37:30 +08:00
Jiuzhu Dong
4743c089d0 libc/rexec: support remote execution
Change-Id: I0f61326081f87d9bdf7234088f352328b8828adb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 10:19:09 +08:00
zhouliang3
a4d8e35665 fs/littlefs: Add to get the full path
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: Ie7e51e0d57ae3c1cc3b165702025a2b58e534a34
2021-08-31 09:49:28 +08:00
chao.an
3a0885bafc net/udp: fix buffer release handling on failed buffer alloc
Attempt to release write buffer on failed UDP write I/O buffer
alloc and tryalloc failed to wrb->wb_iob assertion.

Change-Id: Ic77c148c55ded7871d179e321c57bba5ca8e4112
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-30 21:50:57 +08:00
Xiang Xiao
4af9246ce1 openamp: Move the download to context target
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 02:09:43 +08:00
Xiang Xiao
ab5d2adbca libxx: Change CXX_LIBSUPCXX to LIBSUPCXX
align with other Kconfig(e.g. LIBCXXABI, LIBCXX, UCLIBCXX)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-29 21:32:01 +08:00
Xiang Xiao
3a7fcf743f board: Enable CONFIG_LIBCXXABI when CONFIG_LIBCXX is enabled
to avoid link libsupc++.a which is provided by toolchain

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-29 21:31:53 +08:00
Xiang Xiao
165c4fc5ef libxx: Disable CXX_EXCEPTION by default to save the code space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1b1fafa95f0e385a615dba78f43858b797c5ce69
2021-08-29 21:31:46 +08:00
Xiang Xiao
39cafc1612 libcxx: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie91c28596f1504326e8dfbb4a79d276b712db5bc
2021-08-29 21:31:14 +08:00
Xiang Xiao
b4f597bed4 libcxxabi: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-29 21:30:16 +08:00
Abdelatif Guettouche
6af1bd5666 libs/libxx: Download C++ libraries during context.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-29 21:29:20 +08:00
Xiang Xiao
90a1d498b5 Remove the locale fallback from libcxx
since these functions can handled by NuttX's libc now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7dc487688db9d656d35f828efaed5beefe3c48e7
2021-08-29 21:29:10 +08:00
SPRESENSE
ed4fae3c93 libs/libxx/libcxx.defs: Fix build error on Windows platform
The libcxx-X.Y.Z.src.tar.xz contains a symbolic link to a directory
that not exist as below.

`libcxx-X.Y.Z.src/test/std/pstl -> ../../../pstl/test/std`

Linux and macOS environment have no problem, but it causes an error
when extracting tarball on Windows platform. This symbolic link is not
actually used, so exclude it from extracting the tarball.

Change-Id: Ib01c8bdca04794c3ca3761e940cf3ab8d6361262
2021-08-29 21:27:26 +08:00
zhuyanlin
8ac82559a7 arch:riscv: remove arch atomic, use libc atomic
It is more common for implement in libc/machine

Change-Id: I3da6c3db64adb78c05ddb26d3956817ac6ada93e
2021-08-29 16:10:03 +08:00
zhuyanlin
45e5d39fe0 libc:machine: add common atomic operation.
Add common atomic operation.

Change-Id: I9f6b891f1406d54871a3f50c217a1029b434d2e8
2021-08-29 16:09:56 +08:00
zhuyanlin
6d51f0c76a arch:xtensa: rename XCHAL_INT_NLEVELS
The name used in Tensilica support file core-isa.h for all vendors is
`XCHAL_NUM_INTLEVELS`.
Use a new name may be confused by newer porting xtensa arch.

Change-Id: Ie108d3fdfcc02c81f0eacfca852a1cfc9eea17de
2021-08-29 16:09:51 +08:00
chao.an
7af4143682 arch/arm/cortex-m: add up_backtrace support
add up_backtrace support based on push/branch instruction

Change-Id: I9bffecf55b4ad6127e421aa52a5a5bfb01aee0f6
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-29 10:23:57 +08:00
chao.an
782a373b53 arch/arm/assert: enhance the assert dump
show the all tasks info including backtrace and registers

Change-Id: I394f9b2c7ccdd44009a912f6ae5638f6e2f835d1
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-29 10:21:37 +08:00
zhuyanlin
46a93b5045 stddef: Let offset be defined from toolchain
Let `offset` could be defined from toolchain,
Which will be usefull for fixed code project.
2021-08-28 09:39:32 +08:00
zhuyanlin
9a2e9de4bc libxx: rename NUTTX_LIBCXX
NUTTX_LIBCXX is only basic C++ support, do not support many c++
library function, NUTTX_NOCXXLIB is more suitable.
When NUTTX_NOCXXLIB is select, do not select lower level support.

Change-Id: I158937a4ba02f8fa3c76101acbdfb295d8cd736f
2021-08-28 09:39:24 +08:00
zhuyanlin
6354a78791 libc:libcxx: add support for libcxxabi.
libcxxabi is either-or select with glibcxx.

Change-Id: I4fbea19f0648ddc318379dd43bac8406f7c86927
2021-08-28 09:39:13 +08:00
zhuyanlin
a4abe4bd3e libc:libxx: add new low level c++ standard library support
LLVM libc++abi is a new implementation of low level support for
a standard C++ library.

Change-Id: Ica9c81bd96fd27b169a06e352b0c394d47aed5b6
2021-08-28 09:39:03 +08:00
zhuyanlin
32ea691d5f libs:cxx.defs: bypass -Wno-missing-exception-spec flag in xcc
Xtensa-toolchain do not recognize -Wno-missing-exception-spec flags
2021-08-28 09:38:55 +08:00
Xiang Xiao
8f976669a3 libc: Remove the legacy printf support
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 09:26:30 +08:00
Xiang Xiao
2659ab121f fs: Remove magic field from partition_info_s
since it is wrong and impossible to return file
system magic number from the block or mtd layer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 09:26:22 +08:00
Xiang Xiao
a210e182dd arch/armv8-m: Add SAU support
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 09:26:10 +08:00
Jiuzhu Dong
7561882938 lib_vsprintf: Add %pV format support
test case:
void test(const char *fmt, ...)
{
  struct va_format vaf;
  va_list ap;

  va_start(ap, fmt);
  vaf.fmt = fmt;
  vaf.va = &ap;
  printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
  va_end(ap);
}

int main(int argc, FAR char *argv[])
{
  char str[] = "Hello Boy and Girl!";
  int count = 10;

  test("%s %d", str, count);
  return 0;
}

>> test
func:test, Hello Boy and Girl! 10, line:49

Change-Id: I6d97515dce3f10a880145a1ff7fcba5e9cbebd37
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-27 11:08:48 +08:00
pengyiqiang
b8f12c357f libc/misc: add lib_glob.
N/A

Change-Id: I1bace79c4c580e3a7e84aaf37e7963f789a896ef
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-26 16:57:07 +08:00
ligd
e751451f36 sched/wdog: move SMP enter_critical_section to sched_timerexpiration.c
Change-Id: Id654e6d2151e3b807ed2df4ab8169b90ab07b015
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-08-26 14:38:35 +08:00
ligd
a11c1d8246 sched/wdog: fix switch_context caused error in wd_start()
Thead A:                     Thread B:
wd_start(wdogX)
wd_cancel
nxsched_cancel_timer  -->    wd_start(wdogX)
                             wd_cancel
                             add wdogX to g_wdactivelist
                      <--
add wdogX to g_wdactivelist

then, you will find wdogX add twice.

Change-Id: Icbf3b2badff20908e115c9134e2400cdcb32b1e0
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 3493c0cddb8db7154724a88c7c7786815675c561)
2021-08-26 14:38:35 +08:00
Alan C. Assis
4294354c9a Fix xtensa_btdump() to look at the exception frame
Remove xtensa_backtrace_start() since it is not used anymore
2021-08-26 12:19:50 +08:00
丁欣童
07283dffc3 net/local: Return the partial write size
N/A

Fix up that local socket will be endless loop when write data size more
than the fifo size.

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: I69d63b7b156f0714333e7103bb266b7fcb1adf03
2021-08-26 10:20:13 +08:00
丁欣童
5738f26938 vfs: writev should return the partial write size
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Id7f161fa51a9ad66dad265cab125deb3323e6602
2021-08-26 10:19:56 +08:00