Commit Graph

39798 Commits

Author SHA1 Message Date
Nathan Hartman
3adadbe5d7 arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_usbhost.h:

    * Fix nxstyle errors.
2020-12-15 06:47:20 +01:00
Masayuki Ishikawa
8ba67b7ec9 sched: pthread: Fix potential bugs in pthread_condclockwait.c
Summary:
- I found potential bugs in pthread_condclockwait.c
- Actually, sched_unlock() and wd_cancel() were misplaced.
- This commit fixes this issue

Impact:
- pthread_cond_clockwait() only

Testing:
- Tested with ostest with the following configs
- sabre-6quad:nsh, sabre-6quad:smp, sim:ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-14 21:11:05 -06:00
Michal Lenc
3ec7cd186a boards/arm/imxrt/teensy-4.x: CDC-ACM console support
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-14 04:25:56 -06:00
Masayuki Ishikawa
1aa7f3498f boards: stm32f4discovery: Update usbnsh/defconfig
Summary:
- Enable CONFIG_DEBUG_SYMBOLS and CONFIG_DEBUG_FULLOPT
- Add CONFIG_EXAMPLES_HELLO=y
- Remove CONFIG_HOST_WINDOWS=y
- Enable CONFIG_RAMLOG and CONFIG_RAMLOG_SYSLOG
- Add CONFIG_STACK_COLORATION=y

Impact:
- stm32f4discovery:usbnsh only

Testing:
- Tested with stm32f4discovery board

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-14 03:39:24 -06:00
Xiang Xiao
98be50a9bc libc: Implement posix_fallocate
as specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/posix_fallocate.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-14 09:20:15 +01:00
Nathan Hartman
705c64e5ff arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_wwdg.c:

    * Fix nxstyle errors.
2020-12-13 22:54:03 +01:00
Juha Niskanen
de1ad1fdb3 net: fix typos, incorrect comments, nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 09:06:28 -06:00
Juha Niskanen
eaa75b11f8 libs/libc: fix typos in comments
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 09:06:28 -06:00
Juha Niskanen
93991670af drivers/mtd/w25.c: fix finfo format warning
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 08:52:29 -06:00
Juha Niskanen
66bdec6754 drivers/mtd/gd25.c: fix finfo format warning
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 08:52:29 -06:00
chao.an
80f9fe39bb syscall/csv: sort lines of syscalls
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-13 08:49:51 -06:00
chao.an
859e1ce63a crypto/arc4random: rename getrandom to arc4random_buf
Change-Id: I5c9f0c9acf5af71f01beceaf06ebe0a2c87676bc
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-13 08:49:51 -06:00
John Bampton
ba12c6c0cf Fix spelling 2020-12-12 19:18:08 +01:00
Nathan Hartman
2fda2451e3 arch/stm32: Add register definitions for STM32G4 ADC
arch/arm/src/stm32/hardware/stm32_adc_v2g4.h:

    * New file.

arch/arm/src/stm32/hardware/stm32_adc.h:

    * Distinguish between the normal STM32 ADC IPv2 core and the
      modified IPv2 core used in the G4 family, and include either
      stm32_adc_v2.h or stm32_adc_v2g4.h as needed.
2020-12-12 13:58:51 +01:00
Nathan Hartman
3864912dc8 arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32l15xxx_rtcc.c:

    * Fix nxstyle errors.
2020-12-11 15:04:13 -03:00
danguanghua
796217917a fix build break with CONFIG_AUDIO_MULTI_SESSION enabled
N/A

Change-Id: Idfa87031e09f26bd4ca57b5c220ce0ca849f80c4
Signed-off-by: danguanghua <danguanghua@xiaomi.com>
2020-12-11 08:04:30 -06:00
Xiang Xiao
73d4832c15 arch/arm/imxrt: replace clock_systimespec with clock_systime_timespec
since clock_systimespec doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-11 04:20:40 -08:00
Masayuki Ishikawa
6158b6b77b spinlock: Introduce SP_WFE() and SP_SEV()
Summary:
- This commit introduces SP_WFE() and SP_SEV() to be used for spinlock
- Also, use wfe/sev instructions for ARMV7-A to reduce power consumption

Impact:
- ARMV7-a SMP only

Testing:
- sabre-6quad:smp (QEMU, dev board)
- maix-bit:smp, esp32-devkitc:smp, spresense:smp sim:smp (compile only)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-11 05:58:35 -06:00
Masayuki Ishikawa
21cb7935c5 include: nuttx: Fix style warnings in spinlock.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-11 05:58:35 -06:00
Diego Herranz
d9d649105d drivers/leds/ws2812: optimize reset bytes
It's not necessary to send a reset pulse after sending the RGB data
since the first thing that a new transmission does is sending the long
reset pulse. I have left 1 reset byte after the RGB data to keep some
padding given that the bits inside the byte are shifted by 1 bit although
I think it wouldn't be necessary either. But just in case.

This reduces the memory usage (you can easily save 60 bytes) and increases
the maximum refresh rate.
2020-12-10 20:39:08 -06:00
chao.an
866bb35d2d libs/libc/net: implement ether_aton/ether_aton_r
Reference here:
https://www.unix.com/man-page/linux/3/ether_aton

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 20:37:32 -06:00
Juha Niskanen
84bbc9f5fd crypto/random_pool.c: fix getrandom() when thread calling it gets canceled
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-10 20:36:17 -06:00
Sara Souza
6244924c3e Removed initconf from esp32_wtd_ops_s 2020-12-10 20:31:15 -06:00
Sara Souza
2a9dab2e5d xtensa/esp32: allows the rtc wdt to be configured in bootloader and used later 2020-12-10 20:31:15 -06:00
Masayuki Ishikawa
b599823f3b arch: armv7-a: Remove unnecessary #ifdef CONFIG_SMP in arm_unblocktask.c
Summary:
- Because this_task() returns the current task of the current CPU

Impact:
- SMP only

Testing:
- Tested with sabre-6quad:smp (QEMU)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 20:27:59 -06:00
Abdelatif Guettouche
2a9329615a boards/xtensa/esp32: Normalize all the configs.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
cda3dd6816 baords/xtensa/esp32: Add WAPI and LEDs configs.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
c95aba84f1 boards/xtensa/esp32: Move the LED definition to the private header and
remove userleds for boards that don't have that.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
f7c5b467e1 arch/xtensa/src/esp32: Remove the EXPERIMENTAL config from the Wireless.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
452b52a61e boards/xtensa/esp32/common: Fix functions' descriptions.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
bb336498e4 boards/xtensa/esp32/esp32-wrover-kit: Add autoleds.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
9d74362d75 boards: Add the new boards to the boards's Kconfig.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
bb3b5cd1ee boards/xtensa/esp32: Add initial support for the ESP-WROVER-KIT.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
cea53ed2ff boards/xtensa/esp32: Rename the common files as esp32_board_* to avoid
any naming collisions.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
e097890f22 boards/xtensa/esp32: Initial support for the ESP32 Ethernet Kit.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
a8f7959a21 boards/xtensa/esp32: Remove the experimental and debug configs.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
56713e0304 arch/xtensa/src/esp32/Make.defs: Don't condition including the low level
WDT driver with the upper layer driver.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Abdelatif Guettouche
3ba5018b37 boards/xtensa/esp32: A bit of re-organisation in the ESP32 boards.
Move the common files into the common directory.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-10 12:31:17 -06:00
Nathan Hartman
648ec7bee4 arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32l15xxx_rcc.c:

    * Fix nxstyle errors.
2020-12-10 18:30:24 +01:00
chao.an
8ac184633b clock/time: add CLOCK_BOOTTIME definition
Change-Id: I1adc0445dcdd8284d11aec44bd67b447b2b0490f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 06:40:47 -06:00
John Bampton
7a5f7d470f Remove unneeded semicolons from Python files 2020-12-10 06:38:10 -06:00
chao.an
6ecf9dc5ef wireless/bluetooth: change the tx thread stack size to DEFAULT_TASK_STACKSIZE
simulate will demands more stack in different platform

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 06:34:09 -06:00
Masayuki Ishikawa
f3a81cb1b7 sim: Fix interrupt handling for SMP
Summary
- This commit fixes interrupt handling for SMP
- The following are the changes
- Introduce up_copyfullstate.c
- Add enter_critical_section() to up_exit()
- Add a critical section to up_schedule_sigaction()
- Introduce pseudo timer thread to send periodic events
- UART and interval timer are now handled in the pause handler
- Apply the same SMP related code as other CPU architectures
- However, signal handling and context switching are not changed
- Also enable debug features and some tools in smp/defconfig

Imact
- SMP only

Testing
- Tested with sim:smp on ubuntu18.04 x86_64
- Tested with hello, taskset, smp, ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Masayuki Ishikawa
ad9f88f042 Revert "Revert "arch/sim: Make the SIGUSR1 host signal to use the NuttX irq logic""
This reverts commit 3098b61776.
2020-12-10 08:33:42 +01:00
Masayuki Ishikawa
409c65ce0b arch, sched: Fix global IRQ control logics for SMP
Summary:
- This commit fixes global IRQ control logic
- In previous implementation, g_cpu_irqset for a remote CPU was
  set in sched_add_readytorun(), sched_remove_readytorun() and
  up_schedule_sigaction()
- In this implementation, they are removed.
- Instead, in the pause handler, call enter_critical_setion()
  which will call up_cpu_paused() then acquire g_cpu_irqlock
- So if a new task with irqcount > 1 restarts on the remote CPU,
  the CPU will only hold a critical section. Thus, the issue such as
  'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' could be resolved.
- Fix nxsched_resume_scheduler() so that it does not call spin_clrbit()
  if a CPU does not hold a g_cpu_irqset
- Fix nxtask_exit() so that it acquires g_cpu_irqlock
- Update TODO

Impact:
- All SMP implementations

Testing:
- Tested with smp, ostest with the following configurations
- Tested with spresense:wifi_smp (NCPUS=2,4)
- Tested with sabre-6quad:smp (QEMU, dev board)
- Tested with maix-bit:smp (QEMU)
- Tested with esp32-core:smp (QEMU)
- Tested with lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Masayuki Ishikawa
a24905059e sched: irq: Change irq_waitlock() from private to public
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
chao.an
8d0118569c [Performance]net/tcp: send the ACK in time after obtain ahead buffer from iobs
Request the TCP ACK to estimate the receive window after handle
any data already buffered in a read-ahead buffer.

Change-Id: Id998a1125dd2991d73ba4bef081ddcb7adea4f0d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 12:23:47 +09:00
chao.an
881dd9d62d net/tcp: add a member to record the current receiving window
Change-Id: Ic4c46d643a905fdd3a828e563eab4814da70dbe5
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 12:23:47 +09:00
chao.an
794a6ec23d net/tcp: rename the winszie to snd_wnd to make the semantics more accurate
Change-Id: I8fdc7cf78a7f2cd53a30ef1de702b1a697c43238
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 12:23:47 +09:00
Diego Herranz
375211f5a1 boards/arm/stm32: add common and stm32f103-minimum support for WS2812 LEDs. 2020-12-09 22:55:27 +01:00