Commit Graph

39317 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
7f61256b32 mm/mm_heap/mm_initialize.c: Fix syslog format errors 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
7c962595a5 drivers/ramdisk.c: Fix syslog format errors 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
0bb7b44976 drivers/loop/losetup.c: Fix syslog format errors 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
1c3ae7f01e drivers/bch/bchlib_cache.c: Fix syslog format errors 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
bc552397e9 drivers/bch/bchlib_read.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
b83d658df2 sched/signal/sig_dispatch.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
92397727ab sched/signal/sig_notification.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
48e3e2d390 binfmt/binfmt_dumpmodule.c: Fix syslog format errors 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
0b48fed6ee fs/spiffs/src/spiffs_core.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
c7bfb85584 arch/arm/src/stm32f0l0g0/stm32_tim_lowerhalf.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
66895762db arch/arm/src/stm32f0l0g0/stm32_tim.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
2ac76ea918 arch/arm/src/stm32f0l0g0/stm32_i2c.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
c3a325d9e5 drivers/input/button_upper.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
efe8e24fe7 libs/libnx/nxmu/nx_eventhandler.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
6d8ccccbb0 libs/libnx/nxglib/nxglib_splitline.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
4b67aa3df9 graphics/nxmu/nxmu_server.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
318b3ce8eb boards/arm/stm32/stm32butterfly2/src/stm32_boot.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
cefa1b28e1 arch/arm/src/stm32/stm32_otgfsdev.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi
c443809125 net/local/local_recvfrom.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
Michal Lenc
8cf6cfda1a imxrt: Added support for DP83825I PHY
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-11-20 20:34:57 -03:00
dongjiuzhu
8f9ca79ffc driver/sensor rc: use mm/circbuf manage intermediate buffer
N/A

Change-Id: Ifdd8117da9d20ac2f48f04b7b383449e6dd03f06
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00
dongjiuzhu
23ddeaf3be mm/circbuf: support circular buffer managerment
N/A

Change-Id: Ib1fc009b9ce3af5815920f22221fe8a7262299ef
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00
Tido Klaassen
93ff68e75a serial: Prevent RX stall
Re-check RX queue status after uart_enablerxint() and before blocking
the reading task on the receive semaphore. cdcacm (and maybe other UART
drivers) can push buffered data into the receive queue during
uart_enablerxint(), leading to a blocked task while data is already
available.

Signed-off-by: Tido Klaassen <tido@4gh.eu>
2020-11-20 04:16:35 -08:00
Masayuki Ishikawa
96c29e75b7 Update TODO regarding SMP
Summary:
- 'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' was resolved

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
1914aac05f arch: xtensa: Fix the pause handler for SMP
Summary:
- Apply the same logic added to cxd56_cpupause.c

Impact:
- SMP only

Testing:
- Tested with esp32-core:smp (QEMU)
- Run smp and ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
a500bd0238 arch: k210: Fix the pause handler for SMP
Summary:
- Apply the same logic added to cxd56_cpupause.c

Impact:
- SMP only

Testing:
- Tested with maix-bit:smp (QEMU)
- Run smp and ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
42dea9edf9 arch: lc823450: Fix the pause handler for SMP
Summary:
- Apply the same logic added to cxd56_cpupause.c

Impact:
- SMP only

Testing:
- Tested with lc823450-xgevk:rndis
- Run smp and ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
1978dcc9a9 arch: armv7-a: Fix the pause handler for SMP
Summary:
- Apply the same logic added to cxd56_cpupause.c

Impact:
- SMP only

Testing:
- Tested with sabre-6quad:smp (QEMU and dev board)
- Run smp and ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
55c00ad3d9 arch: cxd56xx: Fix the pause handler for SMP
Summary:
- I noticed that sched_add_readytorun() runs on multiple CPUs simultaneously
- Finally, I found the root cause which was described in TODO
- Actually, the task newly scheduled on remote CPU did not acquire g_cpu_irqlock
- This commit fixes this issue by adding a critical section to the pause handler
- Which will acquire g_cpu_irqlock on the remote CPU explicitly

Impact:
- SMP only

Testing:
- Tested with spresense:wifi_smp (NCPUS=2 and 4)
- Run smp, ostest, nxplayer

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Brennan Ashton
f48e4d5df4 Board: Add elf target for nucleo-h743zi 2020-11-20 00:42:28 -08:00
dongjiuzhu
cab072b84d board/stm32f429i: support l3gd20 sensor with new sensor model
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-19 18:13:17 -08:00
dongjiuzhu
60d1755e04 drivers: l3gd20 supports the sensor driver model
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-19 18:13:17 -08:00
Brennan Ashton
9393572aea Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"
This reverts commit 97be116a39.

This commit broke nxffs.  This leaves the first block as empty which
then exposes another bug where when the pack is called because we
have reached the end of flash and need to look for deleted inodes
we search the first block find no inode and assume that there
are no more inodes.  This then results in corrupting the filesystem
by writing over existing inodes.

This can be seen by runing the sim:nxffs configuration.
Prior to this commit the first pass of writing files would look like
this:
NXFFS Dump:
  BLOCK:OFFS  TYPE  STATE   LENGTH
      0:5     INODE OK       2680
      0:78    DATA  OK        424
      1:5     DATA  OK        497
      2:5     DATA  OK        497
      3:5     DATA  OK        497
      4:5     DATA  OK        497
      5:5     DATA  OK        268
      5:283   INODE OK       7410
      5:425   DATA  OK         77
      6:5     DATA  OK        497

With this commit:
NXFFS Dump:
  BLOCK:OFFS  TYPE  STATE   LENGTH
      0:0     BLOCK ERASED    512
      1:5     INODE OK       6394
      1:39    DATA  OK        463
      2:5     DATA  OK        497
      3:5     DATA  OK        497

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-19 18:08:41 -08:00
Alin Jerpelea
48e6f2051d audio: libsamplerate: add initial audio Sample Rate Converter
Add audio sample rate conversion library from
http://www.mega-nerd.com/SRC/index.html

Source:
https://github.com/libsndfile/libsamplerate

Add needed patches for NuttX OS and embedded boards.

NOTE:
We must use master branch until next stable release
2020-11-19 18:05:47 -08:00
YAMAMOTO Takashi
f1aab27c92 include/nuttx/streams.h: Sprinkle scanflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
b90809d5f0 stdio.h: Sprinkle scanflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
d167ec6038 compiler.h: Add scanflike macro 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
1f6d54fde4 include/nuttx/streams.h: Add printflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
7e702817c1 stdio.h: Sprinkle printflike attribute 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
eb406a8394 compiler.h: Add printflike macro
The name was inspired from NetBSD's __printflike.

We can add similar macros for __syslog__, __scanf__, __format_arg__
later.
2020-11-19 18:03:04 -08:00
Masayuki Ishikawa
fe8026d952 boards: sabre-6quad: Fix README.txt
Summary:
- Remove comments on up_idle() which is old information
- Add L2CC info with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-19 18:01:30 -08:00
Masayuki Ishikawa
12862c7b33 armv7-a: Fix comments on Cortex-A SGI
Summary:
- I noticed that Cortex-A SGI can be masked
- We thought the SGI is not maskable
- Although I can not remember how I tested it before
- It actually works as expected now
- Also, fixed the number of remaining bugs in TODO

Impact:
- No impact

Testing:
- Tested with sabre-6quad:smp (QEMU and dev board)
- Add the following code in up_idle() before calling asm("WFI");
+  if (0 != up_cpu_index())
+    {
+      up_irq_save();
+    }
- Run the hello app, you can see "Hello, World!!"
- But nsh will freeze soon because arm_pause_handler is not called.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-19 18:01:30 -08:00
Juha Niskanen
23495a7fa2 drivers/mtd/mtd_progmem.c: fix progmem_log2 parameter type to match prototype
If size_t != uint32_t, this can give a build error:

 mtd/mtd_progmem.c:134:16: error: conflicting types for 'progmem_log2'
   134 | static int32_t progmem_log2(uint32_t blocksize)
       |                ^~~~~~~~~~~~
 mtd/mtd_progmem.c:82:16: note: previous declaration of 'progmem_log2' was here
    82 | static int32_t progmem_log2(size_t blocksize);
       |                ^~~~~~~~~~~~
 Makefile:118: recipe for target 'mtd_progmem.o' failed

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-19 07:43:07 -08:00
Abdelatif Guettouche
79b07e6c94 arch/xtensa/src/esp32/esp32_gpio.c: Fix GPIO IRQ assert condition.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-19 07:38:59 -08:00
YAMAMOTO Takashi
6ee7fdf874 include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
Replace definitions in other places.
2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
123d882027 sim types.h: A workaround for macOS MODULECC 2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
a863fa30f9 sim: Make int64_t match the host OS 2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
c97f6f1b59 sim: Add _intmax_t and _uintmax_t 2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
09fca224ec arch/sim/include/inttypes.h: Fix intptr_t
64-bit size_t/intptr_t/ptrdiff_t are long, not long long,
for macOS and Linux.

Note: we don't care CONFIG_SIM_M32 on macOS.

macOS:
    spacetanuki% uname -a
    Darwin spacetanuki.lan 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64
    spacetanuki% cc --version
    Apple clang version 11.0.0 (clang-1100.0.33.17)
    Target: x86_64-apple-darwin18.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    spacetanuki% cc -dM -E - < /dev/null|grep __SIZE_TYPE__
    #define __SIZE_TYPE__ long unsigned int
    spacetanuki% cc -m32 -dM -E - < /dev/null|grep __SIZE_TYPE__
    #define __SIZE_TYPE__ long unsigned int
    spacetanuki%

Linux:
    root@4c2e9e83ac82:/tools# uname -a
    Linux 4c2e9e83ac82 5.4.39-linuxkit #1 SMP Fri May 8 23:03:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    root@4c2e9e83ac82:/tools# cc --version
    cc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    root@4c2e9e83ac82:/tools# cc -dM -E - < /dev/null|grep __SIZE_TYPE__
    #define __SIZE_TYPE__ long unsigned int
    root@4c2e9e83ac82:/tools# cc -m32 -dM -E - < /dev/null|grep __SIZE_TYPE__
    #define __SIZE_TYPE__ unsigned int
    root@4c2e9e83ac82:/tools#
2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
fca3b63800 mips: Add _intmax_t and _uintmax_t 2020-11-19 00:49:56 -08:00