Commit Graph

39901 Commits

Author SHA1 Message Date
Xiang Xiao
3dfb897ed1 bluetooth: Remove the unnecessary forward reference
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao
d1dc0bf848 bluetooth: Fix typos in comment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Masayuki Ishikawa
32ad989c03 include: wireless: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers in gs2200m.h

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
Masayuki Ishikawa
b67f200636 drivers: wireless: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers in gs2200m.c

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
Masayuki Ishikawa
3e4917e3b6 boards: stm32f4discovery: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers under stm32f4discovery

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
Masayuki Ishikawa
96769b0722 boards: cxd56xx: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers under cxd56xx

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
Masayuki Ishikawa
b784fd6c3c arch: cxd56xx: Replace license header with Apache License 2.0
Summary:
- This commit replaces SHES related headers under cxd56xx

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
Masayuki Ishikawa
38733b76df boards: stm32f4discovery: Fix style violations
Summary:
- This commit fixes style violations in stm32_mmcsd.c

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
chao.an
39146ee367 fs/epoll: add asynchronous epoll control support
In current implementation, the asynchronous call "epoll_ctl()" unable
to wakeup the thread if pending on "epoll_wait()", the newly
added/delete FD cannot be used in the current waiting list,
this patch uses a reserved file object to wake up pending poll internal,
re-traverse the waiting list when a new event comes.

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-27 11:08:12 -06:00
chao.an
0114f7c58f fs/epoll: add sanity check to handle invalid control option
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-27 11:08:12 -06:00
AVykhovanets
39caf09df0 Fix inode lock at umount2 2020-12-26 00:32:19 -06:00
dongjiuzhu
f508d80c3d signal: fix compile break in c++
nuttx.rel: In function `__metal_sleep_usec':
nuttx/include/metal/system/nuttx/sleep.h:27: undefined reference to `nxsig_usleep(unsigned int)'
collect2: error: ld returned 1 exit status

Change-Id: I9dd2ed0a72d144bb152dc3753e7f9a6695dfb2d4
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-12-25 21:07:04 +01:00
dongjiuzhu
b83ae99456 rpmsg_uart: fix compile break when enable rptun
nuttx.rel: In function `rpmsg_serialinit':
nuttx/arch/sim/src/sim/up_rptun.c:257: undefined reference to `uart_rpmsg_init'
collect2: error: ld returned 1 exit status
Makefile:310: recipe for target 'nuttx' failed

Change-Id: I93a20941bc07f749165dc8f012da46ddb7b02b00
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-12-25 21:07:04 +01:00
YAMAMOTO Takashi
e1c53eaeb0 arch/sim/include/irq.h: Make 32-bit xcpt_reg_t unsigned
* 64-bit version is already unsigned

* up_copyfullstate uses unsigned for 32-bit

 Error: sim/up_unblocktask.c:107:33: error: pointer targets in passing argument 1 of 'up_copyfullstate' differ in signedness [-Werror=pointer-sign]
  107 |           up_savestate(rtcb->xcp.regs);
      |                        ~~~~~~~~~^~~~~
      |                                 |
      |                                 xcpt_reg_t * {aka int *}
sim/up_internal.h:133:45: note: in definition of macro 'up_savestate'
  133 | #define up_savestate(regs) up_copyfullstate(regs, (xcpt_reg_t *)CURRENT_REGS)
      |                                             ^~~~
sim/up_internal.h:205:33: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'xcpt_reg_t *' {aka 'int *'}
  205 | void up_copyfullstate(uint32_t *dest, uint32_t *src);
      |                       ~~~~~~~~~~^~~~
2020-12-24 21:57:39 -06:00
YAMAMOTO Takashi
b41524f0e6 libcxx: -Wno-shadow for files including filesystem_common.h
This might be specific to gcc or Linux
as I didn't see it with clang + macOS.
2020-12-24 21:57:39 -06:00
YAMAMOTO Takashi
6481b774e4 libcxx: Disable -Wshadow for locale.cpp
This might be specific to gcc or Linux
as I didn't see it with clang + macOS.

libcxx/src/locale.cpp: In member function 'void std::__1::locale::__install_ctor(const std::__1::locale&, std::__1::locale::facet*, long int)':
libcxx/src/locale.cpp:576:62: warning: declaration of 'id' shadows a member of 'std::__1::locale' [-Wshadow]
  576 | locale::__install_ctor(const locale& other, facet* f, long id)
      |                                                              ^
In file included from /Users/yamamoto/git/nuttx/nuttx/include/libcxx/locale:181,
                 from libcxx/src/locale.cpp:16:
/Users/yamamoto/git/nuttx/nuttx/include/libcxx/__locale:203:32: note: shadowed declaration is here
  203 | class _LIBCPP_TYPE_VIS locale::id
      |                                ^~
2020-12-24 21:57:39 -06:00
YAMAMOTO Takashi
884882501c libcxx: Disable -Wshadow for barrier.cpp
This might be specific to gcc or Linux
as I didn't see it with clang + macOS.

libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
libcxx/src/barrier.cpp:35:9: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
   35 |         : __expected(__expected)
      |         ^
libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
   29 |     ptrdiff_t&         __expected;
      |                        ^~~~~~~~~~
libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
libcxx/src/barrier.cpp:44:5: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
   44 |     }
      |     ^
libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
   29 |     ptrdiff_t&         __expected;
      |                        ^~~~~~~~~~
libcxx/src/barrier.cpp: In constructor 'std::__1::__barrier_algorithm_base::__barrier_algorithm_base(ptrdiff_t&)':
libcxx/src/barrier.cpp:44:5: warning: declaration of '__expected' shadows a member of 'std::__1::__barrier_algorithm_base' [-Wshadow]
   44 |     }
      |     ^
libcxx/src/barrier.cpp:29:24: note: shadowed declaration is here
   29 |     ptrdiff_t&         __expected;
      |                        ^~~~~~~~~~
CXX:  libcxx/src/new.cpp
In file included from libcxx/src/new.cpp:19:
/usr/include/c++/9/cxxabi.h: In member function 'virtual bool __cxxabiv1::__pbase_type_info::__pointer_catch(const __cxxabiv1::__pbase_type_info*, void**, unsigned int) const':
/usr/include/c++/9/cxxabi.h:308:23: error: 'const class std::type_info' has no member named '__do_catch'
  308 |     return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
      |                       ^~~~~~~~~~
2020-12-24 21:57:39 -06:00
YAMAMOTO Takashi
374d05a05a Revert "board/sim: Remove the too strict warning"
This reverts commit e70bff723b.

* These warnings sometimes find real bugs. There are ways to disable
  the specific warnings for the specific code (eg. libcxx) selectively.

* It doesn't make much sense to disable these warnings only on sim.
  There are many boards with -Wall -Wshadow. Because the sim is
  mainly for development and testing, it should be less forgiving
  than real boards.
2020-12-24 21:57:39 -06:00
Nathan Hartman
080b2dfceb arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_exti.h:
arch/arm/src/stm32/stm32_flash.c:
arch/arm/src/stm32/stm32_fsmc.c:
arch/arm/src/stm32/stm32_fsmc.h:
arch/arm/src/stm32/stm32_hciuart.h:
arch/arm/src/stm32/stm32_mpuinit.h:
arch/arm/src/stm32/stm32_rtc.c:

    * Fix nxstyle issues.
2020-12-24 23:21:16 +01:00
zhongan
d5d6690ebc drivers/serial/uart_16550.c: fix complie warning and writing style.
change argue type from 'uint32_t' to 'unsigned int' in fucntion
'u16550_receive'.

Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-12-24 10:51:46 -06:00
chao.an
08b22784c3 sim/names: add writev/readv into name list
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-24 11:09:59 -03:00
Nathan Hartman
dad32ccd47 arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_dma.h:

    * Fix nxstyle issues.
2020-12-23 20:35:42 -06:00
Masayuki Ishikawa
ace6e70f57 arch: imx6: Add imx_enet driver
Summary:
- This commit adds imx_enet driver derived from imxrt_enet

Impact:
- imx6 only

Testing:
- Tested with sabre-6quad:netnsh
- NOTE: telnetd works with QEMU
2020-12-23 16:56:25 -03:00
Masayuki Ishikawa
1725e50a13 arch: imx6: Fix peripheral IP offsets in AIPS-2
Summary:
- This commit fixes peripheral IP offsets in AIPS-2

Impact:
- No impact because there is no drivers

Testing:
- Tested with sabre-6quad:nsh and sabre-6quad:smp
2020-12-23 16:56:25 -03:00
Masayuki Ishikawa
4ce99f324e arch: imx6: Fix style warnings in imx_memorymap.h 2020-12-23 16:56:25 -03:00
Fotis Panagiotopoulos
e26daf9357 STM32 FLASH latency is calculated based on Vin. 2020-12-23 08:13:45 -08:00
Michal Lenc
52416888f7 fix nx style warnings and errors
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Michal Lenc
6439d1b976 boards/arm/imxrt/teensy-4.x: Added lcd-4.1 config to README.txt
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Michal Lenc
b11bfefff5 drivers/lcd: Added support for ST7789 controller based on ST7735
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Michal Lenc
1502693f93 boards/arm/imxrt/teensy-4.x: Added support for LCD display with ST7789
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
Brennan Ashton
570aa3cdac CI: Allow builds to pass even if final artifact upload fails
We are seeing higher cases of artifact upload failures
in github.  Other projects are also seeing this as has been
reported at https://github.com/actions/upload-artifact/issues/116

There is a fix that was just merged in the base library:
https://github.com/actions/toolkit/pull/675

So Hopefully we can revert this before too long.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-12-23 10:32:31 +01:00
chao.an
2980792efd libs/libc: add lib_dumpvbuffer support
e.g: Encapsulation Type: Bluetooth H4: add packet type dump support

From:

lib_dumpvbuffer(NULL, data, len);

[    1.567100] 0000  03 0c 00                                         ...
[    1.890100] 0000  0e 04 01 03 0c 00                                ......
[    1.890100] 0000  03 10 00                                         ...
[    1.892900] 0000  0e 0c 01 03 10 00 ff ff 8f fe db ff 5b 87        ............[.
[    1.892900] 0000  01 10 00                                         ...
[    1.894900] 0000  0e 0c 01 01 10 00 06 bb 22 06 0a 00 bb 22        ........"...."
[    1.894900] 0000  02 10 00                                         ...
[    1.901900] 0000  0e 44 01 02 10 00 ff ff ff 03 fe ff ff ff ff ff  .D..............
[    1.901900] 0010  ff ff f3 0f e8 fe 3f f7 83 ff 1c 00 00 00 61 f7  ......?.......a.
[    1.901900] 0020  ff ff 7f 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    1.901900] 0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    1.901900] 0040  00 00 00 00 00 00                                ......

To:

struct iovec bufs[2];

bufs[0].iov_base = &type;
bufs[0].iov_len = 1;
bufs[1].iov_base = data;
bufs[1].iov_len = len;

lib_dumpvbuffer(NULL, bufs, 2);

[    3.711400] 0000  01 03 0c 00                                      ....
[    4.035400] 0000  04 0e 04 01 03 0c 00                             .......
[    4.035400] 0000  01 03 10 00                                      ....
[    4.037400] 0000  04 0e 0c 01 03 10 00 ff ff 8f fe db ff 5b 87     .............[.
[    4.037400] 0000  01 01 10 00                                      ....
[    4.039400] 0000  04 0e 0c 01 01 10 00 06 bb 22 06 0a 00 bb 22     ........."...."
[    4.039400] 0000  01 02 10 00                                      ....
[    4.046400] 0000  04 0e 44 01 02 10 00 ff ff ff 03 fe ff ff ff ff  ..D.............
[    4.046400] 0010  ff ff ff f3 0f e8 fe 3f f7 83 ff 1c 00 00 00 61  .......?.......a
[    4.046400] 0020  f7 ff ff 7f 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    4.046400] 0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    4.046400] 0040  00 00 00 00 00 00 00                             .......

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-23 00:11:38 -08:00
chao.an
826e74a13d libs/libc/dumpbuffer: remove the unnecessary printable characters traversal
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-23 00:11:38 -08:00
chao.an
48db71aa24 libs/libc/dumpbuffer: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-23 00:11:38 -08:00
chao.an
e32e341886 libs/libc/dumpbuffer: add support to recognizable from wireshark
e.g: Encapsulation Type: Bluetooth H4

From:

[    2.196000] 0000: 030c00                                                            ...
[    2.514600] 0000: 0e0401030c00                                                      ......
[    2.514600] 0000: 031000                                                            ...
[    2.517600] 0000: 0e0c01031000ffff8ffedbff5b87                                      ............[.
[    2.517600] 0000: 011000                                                            ...
[    2.520600] 0000: 0e0c0101100006bb22060a00bb22                                      ........"...."
[    2.520600] 0000: 021000                                                            ...
[    2.527600] 0000: 0e4401021000ffffff03feffffffffff fffff30fe8fe3ff783ff1c00000061f7 .D.............. ......?.......a.
[    2.527600] 0020: ffff7f00000000000000000000000000 00000000000000000000000000000000 ................ ................
[    2.527600] 0040: 000000000000                                                      ......

To:

[    1.567100] 0000  03 0c 00                                         ...
[    1.890100] 0000  0e 04 01 03 0c 00                                ......
[    1.890100] 0000  03 10 00                                         ...
[    1.892900] 0000  0e 0c 01 03 10 00 ff ff 8f fe db ff 5b 87        ............[.
[    1.892900] 0000  01 10 00                                         ...
[    1.894900] 0000  0e 0c 01 01 10 00 06 bb 22 06 0a 00 bb 22        ........"...."
[    1.894900] 0000  02 10 00                                         ...
[    1.901900] 0000  0e 44 01 02 10 00 ff ff ff 03 fe ff ff ff ff ff  .D..............
[    1.901900] 0010  ff ff f3 0f e8 fe 3f f7 83 ff 1c 00 00 00 61 f7  ......?.......a.
[    1.901900] 0020  ff ff 7f 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    1.901900] 0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[    1.901900] 0040  00 00 00 00 00 00                                ......

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-23 00:11:38 -08:00
liang
b074ebec9e fix redefined CSR_INSTRET 2020-12-23 01:34:14 -06:00
Sara Souza
6a6121378c xtensa/esp32: Fixed wdt typos 2020-12-22 20:32:38 +01:00
Xiang Xiao
922cf0612b libc/netdb: Move hostbuffer out of the stack
The length of hostbuffer come from Kconfig, it isn't safe to
allocate this variable on the stack.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I75213688153a1cba738544de2a51fa3247626dd3
2020-12-22 10:40:22 -03:00
YAMAMOTO Takashi
0fbfc4c44c esp32_wifi_adapter.c: file mode for open doesn't make sense for O_RDONLY 2020-12-22 03:37:29 -06:00
Huang Qi
073912e232 Replace all wget with curl
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-12-22 03:36:10 -06:00
Brennan Ashton
c6947199b2 Bluetooth: Fix bt_buff lifecycle
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-12-21 23:36:57 -06:00
Masayuki Ishikawa
ec73a4e69c arch & sched: task: Fix up_exit() and nxtask_exit() for SMP
Summary:
- During repeating ostest with sabre-6quad:smp (QEMU),
  I noticed that pthread_rwlock_test sometimes stops
- Finally, I found that nxtask_exit() released a critical
  section too early before context switching which resulted in
  selecting inappropriate TCB
- This commit fixes this issue by moving nxsched_resume_scheduler()
  from nxtask_exit() to up_exit() and also removing
  spin_setbit() and spin_clrbit() from nxtask_exit()
  because the caller holds a critical section
- To be consistent with non-SMP cases, the above changes
  were done for all CPU architectures

Impact:
- This commit affects all CPU architectures regardless of SMP

Testing:
- Tested with ostest with the following configs
- sabre-6quad:smp (QEMU, dev board), sabre-6quad:nsh (QEMU)
- spresense:wifi_smp
- sim:smp, sim:ostest
- maix-bit:smp (QEMU)
- esp32-devkitc:smp (QEMU)
- lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-21 23:29:56 -06:00
YAMAMOTO Takashi
d5a1c8cae8 boards/sim/sim/sim/src/etc/init.d/rcS: Make it conditional with FS_FAT
ifdef out the guts of the script because it doesn't make sense
without FAT enabled.
2020-12-21 20:12:05 -08:00
ligd
9ee04b5c53 tools/mkdeps.c: increase MAX_BUFFER to 8192
Change-Id: I0221194a647ff5083c951d682289793430e4268a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-21 20:10:47 -08:00
Nathan Hartman
93b9ad0237 sched/Kconfig: Minor grammar fixes in help text
sched/Kconfig:

    * SCHED_CRITMONITOR, SCHED_CPULOAD: Minor grammar fixes in help
      text.
2020-12-21 20:04:45 -06:00
Sara Souza
16b1a87da4 xtensa/esp32: Added watcher defconfig 2020-12-21 20:20:43 +01:00
Nathan Hartman
78f308ff2c arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_dac.h:

    * Fix nxstyle issues.
2020-12-21 20:20:17 +01:00
Nathan Hartman
4cefc5ce7a stm32g4: Fix incorrect FLASH wait states
When the architectural support for STM32G4 family was added, the
reference manual (RM0440) was at revision 2. Since then, it has
undergone several revisions. One significant change is in the
table of FLASH wait states: section 3.3.3 table 9. The outcome
of this change is that fewer FLASH wait states are needed for
most CPU clock (HCLK) frequencies. Notably, if running the CPU
clock at the maximum 170 MHz, only 4 FLASH wait states are
needed, rather than the previously programmed 8 wait states.
This gives a noticeable performance boost.

arch/arm/src/stm32/stm32g4xxxx_rcc.c:

    * FLASH_ACR_LATENCY_SETTING: Reimplement compile-time logic
      that selects the required wait state setting to use the new
      updated table.

    * Update all comments to indicate that RM0440 Rev 5 is used.

    * Update section numbers mentioned in comments in cases where
      they have changed due to added sections in the manual.
2020-12-21 18:43:49 +01:00
Sara Souza
881121444c Changes in the watchdog auto-monitor menu 2020-12-21 11:22:30 -03:00
YAMAMOTO Takashi
7a9f180faf esp32: Bump NAME_MAX where CONFIG_ESP32_WIFI_SAVE_PARAM=y
CONFIG_ESP32_WIFI_SAVE_PARAM seems to use a bit long names
on the filesystem.
eg. "wifi.nvs.net80211.sta.scan_method", which is 33 characters long.
2020-12-21 09:58:22 +01:00