Commit Graph

38809 Commits

Author SHA1 Message Date
zhongan 9589015383 build: remove the touch operations.
N/A

touch operations may cause incremental compilation
being skipped while out-tree build.

Change-Id: Ic373a6eff200aee040bbf3a5570c668ce55f41c1
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-11-17 19:44:33 +08:00
zhongan c20ef30be9 rv32im: set compressed instruction enabled as default.
N/A

Change-Id: I447b72100f18d6dab603750b3ed5ab7fe1c60178
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-11-17 14:51:28 +08:00
zhongan 7b828cb1d1 rv32im: remove up_schedulesigaction.c
N/A

riscv_schedulesigaction.c takes replace of it.

Change-Id: I6079b30080acbd1654983b1d21d70773e1d3eed1
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-11-17 14:50:48 +08:00
丁欣童 52a60155f5 drivers/sensors: l3gd20 support fetch function
N/A

Change-Id: I3450d9aaf92fea04f9a03c407358aaddcb437273
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
(cherry picked from commit 0b4d4768e90eea5915da2109f7535c771579578c)
2020-11-17 14:25:36 +08:00
zhongan f5bd0a06f0 rv32im: fix typo.
N/A

Change-Id: I805a179c3cf56518b85f80c8ba8c52bf60929d19
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-11-17 13:42:13 +08:00
ligd 587bb341d8 rptun: fix rptun rpmsg_unregister_callback fault
N/A

Change-Id: I6447e2ec71a4020533336f35e2aa97a860742e63
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-11-12 22:11:40 +08:00
Peter Bee fa7662721d libc/stdlib: Fix range check in strtoul(l)
The previous implementation of strtoul(l) is flawed. The range check
assumed that when overflow happens, the truncated value is smaller than
the original value. As a counter example, passing "10000000000" to
strtol will not trigger ERANGE, but return a truncated value. This patch
adds more accurate range checks.

Change-Id: I239e034e390b4974157ed6efa17110f2e74904cf
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2020-11-12 11:00:21 +08:00
dongjiuzhu 0e9f35c1f9 driver/sensor: add fetch api to read sensor data directly
N/A

1.use userspace buffer rather than intermediate buffer of upperhalf driver
2.support block and non-block ways.

Change-Id: I8e9c100f5c2a2176ab2a3f903c8940462bdcd2f7
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 15:53:33 +08:00
dongjiuzhu de30e82f92 driver/sensor: add new feature about sensor driver
N/A

1.support for multi-user access
2.support special cmd to control sensor
3.support userspace to set size of intermediate buffer
  by ioctl: SNOIC_SET_BUFFER_SIZE

Change-Id: Ida1c01fb8f505de8a28349c1b26167614aa56acc
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 15:53:33 +08:00
dongjiuzhu af068a3b48 sim/sensor: add sensor defconfig
N/A

Change-Id: I25ce46fdb1d53699a6f833798479fd3453305404
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 15:53:33 +08:00
丁欣童 d977381060 drivers: l3gd20 supports the sensor framework
N/A

Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
Change-Id: Id5799090ff99393e96f8dde3c2dc5f1db864aca7
2020-11-11 15:20:51 +08:00
dongjiuzhu 070e08bd6e driver/sensor: user specifies device register number
N/A

Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
Change-Id: I05eb4d6ee3f6746732515f6dd5770b7229227c7b
2020-11-11 15:20:39 +08:00
liuhaitao f157e774be sim: update etc ssl RCRAWS missing in Makefile
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I491bd996c520743bec465be80869cf6abf70a05b
2020-11-10 20:16:49 +08:00
liuhaitao a65f7c564c photon: add photon etc init rcS build support
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I992ff8b3774e2661b047462145a1a8439da05351
2020-11-10 20:15:19 +08:00
Xiang Xiao dc176e2fb3 Make getopt function family more posix complaint
by porting Gregory Pietsch's version

Change-Id: I9a792734b45278863630f060a20589b0d9ab8bed
2020-11-10 16:21:46 +08:00
chao.an 865661585e sim/mirtos: add libusb support
Change-Id: I7ded8bc32498bb5e90e18737d99fba4549b53b27
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-10 14:29:06 +08:00
liuhaitao 93608b4272 sim: update mirtos etc/ init rcS and ssl files
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I29ab679eb4cf607e94cba870b0d62a29ac089ff0
2020-11-10 11:31:41 +08:00
liuhaitao da9b962e97 sysconf: add _SC_PAGESIZE sysconf support
MIRTOS-262

Also implement getpagesize() based on sysconf(_SC_PAGESIZE).

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: Ib6baccb9f7dac19f5e3c681db1c51e8a2fe8d3fe
2020-11-10 11:16:51 +08:00
liuhaitao 5cc042dc1a build.sh: copy defconfig for custom board too
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I0ba888d6ade32b02acb6e25bdd6f9ecf901dc66d
2020-11-09 22:30:09 +08:00
chao.an 61de5de71f sim/mirtos: refresh mirtos and mirtos_test defconfig
MIRTOS-258

Change-Id: I24f3be3a8ad4ae4ac68dc878dde99c90dcdfcc47
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 21:34:33 +08:00
chao.an 01fbf10b7a boards/sim: correct the ARCHDEFINES definition
ARCHDEFINESXX -> ARCHDEFINES

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 21:19:37 +08:00
chao.an 01389f06c3 boards/sim: enable run-time type identification
BTW, correct some cxx compilation options

Change-Id: Id3e3eab2020ef1991d2760426d81b40e6e5eff4e
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 21:14:44 +08:00
chao.an 3301cfda39 eventfd: remove the unique minor limit
The unique minor limit of 255 will overflow easily in
some scenarios where eventfd needs to be create/destroy
frequently:

  while (1)
    {
      fd = eventfd(0, 0);  // minor++
      sleep(1);
      close(fd);
    }

remove the unique minor limit.

Change-Id: I589986b9c09699fab7d4ff12e9ecd31c303f58b2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 21:06:14 +08:00
chao.an 8f5561b018 pthread/spinlock: mode the structure prototype out of the definition
pthread/pthread_spinlock.c: In function ‘pthread_spin_init’:
pthread/pthread_spinlock.c:114:11: error: dereferencing pointer to incomplete type ‘pthread_spinlock_t’ {aka ‘struct pthread_spinlock_s’}
  114 |       lock->sp_lock   = SP_UNLOCKED;
      |           ^~

Signed-off-by: chao.an <anchao@xiaomi.com>
Change-Id: If4f05d3ca736dcede990998c63a50c6c766f3b0a
2020-11-09 20:55:03 +08:00
liuhaitao 1179d1c1ce Add sim and photon mirtos and miot related configs
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: Ic511b2550cc66001b105be3d1f2ecf3b25da1104
2020-11-09 20:55:03 +08:00
chao.an 5942fa481d sched/init: init the default home directory to environment
Change-Id: Ib08a7702ce2256d48b210a70fa181591bbe8abe8
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 20:55:03 +08:00
liuhaitao 1ee4075529 tools: Initial check in build.sh
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: Ib1a113a806dab6bd2853d2bbc826603e528a6864
2020-11-09 20:55:03 +08:00
zhongan 39ba4f1d00 rv32im: Add sigaction support.
Change-Id: I870bc5c03b81d3ee73d1c0b286f30e78193fc7af
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-11-09 20:55:03 +08:00
chao.an aba2cf71cc net/wireless: add country code control support
Change-Id: Ie3917815e9004bae9c1116916bc4eadb752f6e44
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 20:55:03 +08:00
liuhaitao dc8964c579 Update debug.h selection with none debug.h option
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I31dd3add1172bf650b689c2569f6bdde7d5f4b3c
2020-11-09 20:55:03 +08:00
liuhaitao c2b8086496 Add debug.h selection choice to support include chip debug.h
Select debug.h which may be under include/arch or include/arch/chip.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I5f465c41ba27d040e5e24b2eef2918cfbc18a0bd
2020-11-09 20:55:03 +08:00
liuhaitao fee12c3091 Update littlefs/libcxx/openamp Make.defs since source code used
N/A

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I3b5046b65107619db92c4391bd63a3c6037d9ada
2020-11-09 20:55:03 +08:00
chao.an 7021c9560a syscall/eventfd: correct the syscall prototype of eventfd(2)
proxies/PROXY_eventfd.c:12:14: error: conflicting types for 'eventfd'
   12 | unsigned int eventfd(int parm1)
      |              ^~~~~~~
In file included from proxies/PROXY_eventfd.c:7:
nuttx/include/sys/eventfd.h:63:5: note: previous declaration of 'eventfd' was here
   63 | int eventfd(unsigned int count, int flags);
      |     ^~~~~~~

Change-Id: I7ed0b8b442eac72592dea0e5754a36fb60ca5f8d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 20:55:03 +08:00
chao.an 8604e98196 unistd/sched_sporadic: correct the disable value
Reference here:
https://github.com/openbsd/src/blob/master/include/unistd.h

Change-Id: Ifb08a69c9a2a2b68179bcfd716fb180ec3577e54
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 09:11:51 -03:00
chao.an 182507f325 boards/sim: add atexit(2) into naming list
(gdb) b longjmp
Breakpoint 1 at 0x8270
(gdb) r
Starting program: /home/chao/code/m3/nuttx/nuttx
[    0.000000] Assertion failed at file:task/task_onexit.c line: 99

Breakpoint 1, 0xf7b905e0 in siglongjmp () from /lib/i386-linux-gnu/libc.so.6
(gdb)
(gdb) bt
|#0  0xf7b905e0 in siglongjmp () from /lib/i386-linux-gnu/libc.so.6
|#1  0xf7f9c3dc in siglongjmp_alias () from /lib/i386-linux-gnu/libpthread.so.0
|#2  0x5655d668 in up_assert (filename=0x56641018 "task/task_onexit.c", line=99) at sim/up_head.c:132
|#3  0x56567413 in _assert (filename=0x56641018 "task/task_onexit.c", linenum=99) at assert/lib_assert.c:36
|#4  0x565f8cfd in on_exit (func=0x565f8c12 <exitfunc>, arg=0x565fd780 <simuart_restoremode>) at task/task_onexit.c:99
|#5  0x565f8c89 in atexit (func=0x565fd780 <simuart_restoremode>) at task/task_atexit.c:109
|#6  0x565fd819 in simuart_start () at sim/up_simuart.c:112
|#7  0x5656c844 in up_uartinit () at sim/up_uart.c:496
|#8  0x5656ba7a in up_initialize () at sim/up_initialize.c:234
|#9  0x5655da56 in nx_start () at init/nx_start.c:701
|#10 0x5655d5e9 in main (argc=1, argv=0xffffd6f4, envp=0xffffd6fc) at sim/up_head.c:96

Change-Id: Ifd7196b2de7bf9fc7cea764c19a5c0eacf08fdb6
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 09:08:03 -03:00
chao.an 54d0c1c296 sys/uio: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an 176d850445 sys/uio: include-able from C++ files
Change-Id: I4b512851fa96e1d696dbc886b25af4ab043da8dd
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an 06d93828af sys/resource: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
chao.an 82f1263db9 sys/resource: include-able from C++ files
Change-Id: I914ab40495a25da184d0b7f8f8b1fa0d376c66a4
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
Masayuki Ishikawa 2395ab7f6e sched: task: Fix nxtask_exit() for SMP
Summary:
- I noticed that nxsched_merge_pending() is called outside a critical section
- The issue happens if a new rtcb does not hold a critical section
- Actually, global IRQ control is done in nxsched_resume_scheduler() in nxtask_exit()
- However, nxsched_merge_pending() was called after calling nxsched_resume_scheduler()
- This commit fixes the issue by moving nxsched_merge_pending() before the function
- NOTE: the sequence was changed for SMP but works for non-SMP as well

Impact:
- This commit affects both SMP and non-SMP

Testing:
- Tested with ostest with the following configurations
- spresense:wifi_smp (NCPUS=2 and 4)
- spresense:wifi (non SMP)
- sabre-6quad:smp (QEMU)
- esp32-core:smp (QEMU)
- maix-bit:smp (QEMU)
- sim:smp
- lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-09 10:59:20 +01:00
Brennan Ashton 5d872e09e6 Remove depricated usage of set-env in GitHub
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-08 19:38:59 -08:00
Nathan Hartman 8e00110449 tiva/cc13x2_cc26x2: Merge related comments
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h:

    * Merge comments when they are section separators for
      similar/related registers:

      - TIVA_FLASH_FWPWRITE*
      - TIVA_FLASH_FSM_SECTOR1*
      - TIVA_FLASH_FSM_BSLE*
      - TIVA_FLASH_FSM_BSLP*
2020-11-08 13:39:56 -08:00
Juha Niskanen 5849d88288 boards/sim/sim/sim/src/sim_touchscreen.c: add missing nx_disconnect
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 15:25:10 -03:00
Juha Niskanen ca7a7ccbeb Fix some typos in comments
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Juha Niskanen 70cbb7e537 include/nuttx/net/netconfig.h: fix typos and nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Juha Niskanen 62d38c32e8 drivers/lcd/memlcd.c: fix typos and nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Nathan Hartman 350309856d tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_flash.h:

    * Fix nxstyle errors.
2020-11-08 18:56:55 +01:00
Sara Souza b9d44017cf xtensa/esp32: Watchdog support (MWDTs) 2020-11-08 13:05:24 -03:00
Xiang Xiao b23bca5cb3 libcxx: Update 0001-libcxx-Port-to-NuttX-https-nuttx.apache.org-RTOS.patch
All changes come from:
from YAMAMOTO Takashi <yamamoto@midokura.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-08 13:04:43 -03:00
Brennan Ashton ab176cf1d3 sim: Enable required CONFIG_SIM_FRAMEBUFFER 2020-11-07 22:59:42 -08:00