Commit Graph

40947 Commits

Author SHA1 Message Date
Jiuzhu Dong
7df171eef7 rpserver/rpproxy: support set/get rtc time by rpmsg
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-30 22:41:12 -05:00
Jiuzhu Dong
1c74d8042a rtc/rpmsg: support server and client to set time each other
Change-Id: I5d13f424cb636a79a9fd98c275786771c213ddb8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-30 22:41:12 -05:00
raiden00pl
e4c27dfdd6 drivers: add generic upper-half driver for Field Oriented Control (FOC) 2021-03-30 21:54:39 -03:00
Xiang Xiao
3a97f51a8d serial: Don't comment out ws_[x|y]pixel field from winsize struct
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3d2435c3950e8f60b50d9af8a54c65bd0d16f2e0
2021-03-30 17:23:29 -03:00
Nathan Hartman
4716fc929d arch/stm32h7 - Fix HEAP clobbering static data in SRAM4
Normally, statically allocated data goes in .bss, followed by the
initial stack, followed by HEAP. However, any data that is statically
allocated in SRAM4 with __attribute__ ((section (".sram4"))) will
clobber, and be clobbered by, the HEAP.

On STM32H7, BDMA can only access SRAM4. Therefore any BDMA buffers (or
any other data) placed in SRAM4 will expose this problem. In one case,
this manifested as a failure of NSH to start, because the SPI6 BDMA
buffers clobbered the /dev/console inode structs, which the OS
allocated earlier.

This PR ensures that only the rest of SRAM4, after any static data, is
added to the heap. This PR also allows SRAM4 to be completely excluded
from the heap by a new Kconfig, CONFIG_STM32H7_SRAM4EXCLUDE, similar
to what CONFIG_STM32H7_DTCMEXCLUDE does for the DTCM region.

Change required in linker scripts:

Every STM32H7 linker script must replace this:

    .sram4 :
    {
    } > sram4

with this:

    .sram4_reserve (NOLOAD) :
    {
        *(.sram4)
        . = ALIGN(4);
        _sram4_heap_start = ABSOLUTE(.);
    } > sram4

or link will fail with: undefined reference to '_sram4_heap_start'.

The Release Notes should document this for users with out-of-tree
boards.

arch/arm/src/stm32h7/Kconfig:

    * Add config STM32H7_SRAM4EXCLUDE to allow excluding all of SRAM4
      from the HEAP.

arch/arm/src/stm32h7/stm32_allocateheap.c:

    * Only when including SRAM4 in the heap, define HAVE_SRAM4,
      SRAM4_START, SRAM4_END, and SRAM4_HEAP_START.

    * Add "Private Data" section.

    * Add extern for_sram4_heap_start, which must be defined in the
      board's linker script.

    * arm_addregion(): Only add SRAM4 to the heap when configured to
      do so, i.e., unless CONFIG_STM32H7_SRAM4EXCLUDE is defined, and
      only add the portion of SRAM4 that is past any static data.

boards/arm/stm32h7/nucleo-h743zi/scripts/flash.ld:
boards/arm/stm32h7/nucleo-h743zi/scripts/kernel.space.ld:
boards/arm/stm32h7/nucleo-h743zi2/scripts/flash.ld:
boards/arm/stm32h7/stm32h747i-disco/scripts/flash.ld:
boards/arm/stm32h7/stm32h747i-disco/scripts/kernel.space.ld:

    * Update all in-tree STM32H7 board linker scripts as described in
      "Change required in linker scripts" above.

Testing:

    * Successfully built all of the following configurations:

      nucleo-h743zi2:jumbo
      nucleo-h743zi2:nsh
      nucleo-h743zi:nxlines_oled
      nucleo-h743zi:elf
      nucleo-h743zi:otg_fs_host
      nucleo-h743zi:nsh
      nucleo-h743zi:netnsh
      nucleo-h743zi:pwm
      stm32h747i-disco:nsh

    * Tested with custom board.

    * nxstyle.

References:

[1] See the dev@nuttx.a.o mailing list discussion started 2021/03/25:
    "How to ensure HEAP will not overlap static DMA buffer?"
    https://lists.apache.org/thread.html/recf2bb9043f8c9f53c10917e2adb2ec64fe35dc5e6f9a695a7ac6ecc%40%3Cdev.nuttx.apache.org%3E

[2] See arm_addregion() in arch/arm/src/stm32h7/stm32_allocateheap.c

Thanks to Gregory Nutt and David Sidrane for suggestions and reviews.
2021-03-30 17:22:46 -03:00
Chen Wen
3a71d5a714 fs/spiffs: Fix syslog formats 2021-03-30 12:29:11 -05:00
chenwen
91eb70b5ef risc-v/esp32c3: Support ESP32-C3 wireless ioctl cmd 2021-03-30 12:29:11 -05:00
YAMAMOTO Takashi
09869e5d41 net/tcp/tcp.h: Remove unused extern g_netdevices 2021-03-30 12:27:50 -05:00
Gustavo Henrique Nihei
d89b2b4092 boards/esp32-wrover-kit: Disable unnecessary SPI driver from nsh config 2021-03-30 04:11:31 -05:00
Gustavo Henrique Nihei
6d93d948de boards/esp32-ethernet-kit: Disable unnecessary SPI driver from nsh config 2021-03-30 04:11:31 -05:00
Gustavo Henrique Nihei
6949ec1074 boards/esp32-devkitc: Disable unnecessary SPI driver from nsh config 2021-03-30 04:11:31 -05:00
Gustavo Henrique Nihei
77c5995f93 xtensa/esp32: Use essential boolean expressions on condition statements 2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
5e8eb420b7 xtensa/esp32: Fix MISO/MOSI data length field configuration
Both fields were being configured with the total number of remaining
bytes instead of the number of bytes actually bound to DMA descriptors.
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
b4dbae1b10 xtensa/esp32: Commit setbits configuration before SPI transaction
The motivation is to avoid consistency issues when using Mixed Mode
(i.e. Polling and Interrupt/DMA transfers being used interchangeably)
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
4d877abf3f xtensa/esp32: Avoid incrementing a NULL pointer for RX buffer 2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
a27d5b1063 xtensa/esp32: Remove useless pointer check in SPI DMA exchange 2021-03-30 01:23:02 -05:00
raiden00pl
eced2779b6 boards/nucleo-f446re: register button 2021-03-30 01:15:23 -05:00
raiden00pl
ae28e5785b boards/Kconfig: fix typo 2021-03-30 01:15:23 -05:00
ligd
29cdf66e1a mm/mm_heap: fix compile failed when open DEBUG_MM
Change-Id: Id21e9619e4800ec9f02f818ec86d80cdd99d9aae
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-30 01:14:37 -05:00
raiden00pl
4306910000 stm32/hardware/stm32_tim.h: fix comments 2021-03-30 01:13:39 -05:00
raiden00pl
5276077530 stm32/Kconfig: add STM32_HAVE_ADC1 option for consistency 2021-03-30 01:13:39 -05:00
raiden00pl
466ceb92cb stm32/Kconfig: cosmetics for quenco options 2021-03-30 01:13:39 -05:00
YAMAMOTO Takashi
1c29a2e8e8 net/tcp/tcp_send_buffered.c: Fix non-blocking I/O
My recent changes to buffered tcp send broke this. [1]

One of my local apps using non-blocking tcp is working
again with this fix.

[1]
```
commit 837e1a72a4
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Mon Mar 15 16:19:42 2021 +0900

    tcp_send_buffered.c: improve tcp write buffering
```
2021-03-30 01:12:55 -05:00
YAMAMOTO Takashi
271e748ba5 tcp_send_buffered.c: Add a bit more info to an ninfo() 2021-03-30 01:12:55 -05:00
YAMAMOTO Takashi
a2840b6354 tcp_send_buffered.c: Add an assertion 2021-03-30 01:12:55 -05:00
YAMAMOTO Takashi
ef9adcf399 tcp_send_buffered.c: Remove dead code 2021-03-30 01:12:55 -05:00
Virus.V
f9997bdfb3 risc-v/bl602: fix _heap_start not word align 2021-03-30 01:11:09 -05:00
Xiang Xiao
c82c7b6685 sys/stat.h: Add S_IREAD, S_IWRITE and S_IEXEC macro
to be more compatible with BSD libc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4067f8cac6c465a3f1b06906e2e274a660792d93
2021-03-29 21:40:24 -03:00
raiden00pl
b16d5341d8 stm32/stm32_serial.c: simplify DMA #ifdefs 2021-03-29 21:39:35 -03:00
raiden00pl
3c34337064 stm32: add support for serial TX DMA 2021-03-29 21:39:35 -03:00
raiden00pl
0cca102d41 stm32: fix USART1 clock for STM32F302 2021-03-29 21:39:35 -03:00
Roberto Bucher
590ee65fa7 Integration of pysimCoder with NUTTX 2021-03-29 21:38:58 -03:00
raiden00pl
63a4807f28 stm32/stm32_pwm: add interfaces to access RCR register and add interface to modify TRGO 2021-03-29 21:37:41 -03:00
raiden00pl
05cf8b8ff5 boards/sim: remove dsptest configuration 2021-03-29 21:36:36 -03:00
raiden00pl
94ff4564b4 stm32/stm32_adc.c: move maximum number of samples cfg to Kconfig.
The maximum number of samples which can be handled without overrun depends on various factors.
This is the user's responsibility to correctly select this value.
Since the interfece to update the sampling time is available for all supported devices,
the user can change the default vaules in the board initialization logic and avoid ADC overrun.
2021-03-29 21:35:46 -03:00
raiden00pl
88753afb75 stm32/stm32_adc.c: fix enable/disable interrupts logic for coupled ADC 2021-03-29 21:35:46 -03:00
raiden00pl
166bf0434b stm32/stm32_adc.c: add an option to configure ANIOC_TRIGGER behavior 2021-03-29 21:35:46 -03:00
raiden00pl
58a03302d2 stm32/stm32_adc.c: add an option to configure SCAN mode for ADC IPv1 2021-03-29 21:35:46 -03:00
raiden00pl
e10a6647e9 stm32/stm32_adc.c: fix initial sample time write 2021-03-29 21:35:46 -03:00
Matias N
1b8a690b7c sim: only abort sim in assertion if in interrupt context/IDLE task
This fixes the problem that an assertion in sim build aborted NuttX
even when the assertion was generated from userspace (in which case
simpy the task needs to exit). This required moving the relevant code
into the sim blob.
2021-03-29 06:57:18 -06:00
Jiuzhu Dong
0c068ed4e3 limits.h: modify _POSIX_OPEN_MAX to 16
fix ltp/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c:46:8: error: size of array 'queue' is negative
  mqd_t queue[_POSIX_OPEN_MAX + _POSIX_MQ_OPEN_MAX + 1];

Change-Id: I1185ea9f84752aaa0150689b5801d01c3f52c598
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-29 05:51:27 -07:00
Brennan Ashton
6657d151ca Fix indexing for stm32h7 usbhost tracing 2021-03-29 03:51:52 -05:00
Robson Sopran
db5c12aecc Fix ID bits 18-20 of mcp2515 can driver 2021-03-28 23:40:05 -05:00
Brennan Ashton
4851d232c0 usbhost: Do not disable usb monitor if usb host is enabled but dev is not 2021-03-28 23:34:01 -05:00
Brennan Ashton
6106557034 usbhost: Add usb host tracing strings to stm32h7 2021-03-28 23:30:08 -05:00
Brennan Ashton
ffe5ac7c45 board: Add support for nucleo-h743i2 2021-03-28 23:28:49 -05:00
Brennan Ashton
0a3b20e546 syslog: Drop extra carriage return from syslog calls 2021-03-28 21:24:00 -05:00
Alin Jerpelea
e699b6f85f misc: : Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Several files were missed in the past

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-28 13:34:50 -07:00
Alin Jerpelea
32894cda1c arch: arm: sam: fix Mixed Case Errors
fix Mixed Case Errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-28 13:34:50 -07:00
Alin Jerpelea
60424bc762 arch: arm: sam: fix nxstyle errors
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-28 13:34:50 -07:00