Commit Graph

41698 Commits

Author SHA1 Message Date
chao.an
b0ac97adab net/icmp: fix invalid condition comparison
up_assert: Assertion failed at file:
  icmp/icmp_recvmsg.c line: 175 task: net_tasklet

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-07 22:17:50 -05:00
Gregory Nutt
9aaeaefa41 TLS: Correct handling of returned error values.
I not two problems in handling of the return error values in PR #3858:

1. In KERNEL mode, the error return value of _SEM_WAIT() will be a negated errno value; in all other modes, it will be -1 (ERROR) with the errno variable set.  This must be handled in the test of the returned value:  Don't compare with -1; rather check if < 0
2. Also, conversion of the returned value to a negated errno value must be handled differently.  This is handled by replacing -get_errno() with the macro _ERRVAL(ret)

This effects only error handling (it fixes it) and no other impacts are expected.
2021-06-07 22:32:42 -03:00
Alan C. Assis
3859031a6b Fix ht16k33 driver to support multi-modules 2021-06-07 01:08:11 -05:00
Xiang Xiao
f7c0d46ed8 serial: Remove the unnecessary err_out label 2021-06-07 07:55:14 +09:00
Michal Lenc
dd8420431a boards/arm/stm32/nucleo-f446re: fixed wrong qetimer config name
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-06-06 22:48:49 +01:00
Huang Qi
cc514d7791 tls: Move pthread key destructor to libc
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-06-06 15:25:56 -06:00
Nathan Hartman
c3c6bc3e71 Licensing: Add BSD-style license from uIP
LICENSE:

* Add the BSD-style license from uIP, as some lower-level networking
  components derive from it. License text obtained from [1].

  Per feedback of John D. Ament in the general@incubator.a.o
  thread "[VOTE] Release Apache NuttX (Incubating) 10.1.0 [RC1]"
  on 21 May 2021, archived at [2,3].

[1] https://github.com/adamdunkels/uip/blob/uip-1-0/uip/uip.c

[2] https://mail-archives.apache.org/mod_mbox/incubator-general/202105.mbox/%3cCAOqetn8dOhKFj8jdprM1_gmuU=WSwKpK3D6W1a+w2dZ8AbjtNw@mail.gmail.com%3e

[3] https://lists.apache.org/thread.html/r293352a21dfd1112b4dfb0e27265a2ac4741083fa1e7875e4001da86%40%3Cgeneral.incubator.apache.org%3E
2021-06-06 11:21:24 -06:00
Masayuki Ishikawa
3ccef09b4e drivers: serial: Remove an unnecessary critical section (cs) for SMP
Summary:
- I thought this cs is needed to avoid data corruption
- For example, while executing uart_xmitchar() in the interrupt
  handler on CPU0, an application running on CPU1 can call
  uart_putxmitchar() via write()->uart_write().
- In this case, taking xmit.sem in uart_write() will wait for CPU0
  to finish uart_xmitchar() because CPU0 has already taken a cs
  in uart_xmitchar() then nxsem_wait() on CPU0 takes a new cs
  inside (and release the cs when returning but it's OK)
- Then uart_write() on CPU1 disables UART TX, so uart_xmitchar()
  on CPU0 will not be called while executing uart_write() on CPU1.
- So this critical section in uart_putxmitchar() can be removed.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp, esp32-devkitc:smp

Reported-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-05 22:33:09 -05:00
Alan C. Assis
be1c8036d5 esp32-devkitc: Add board support to ht16k33 14-seg display 2021-06-05 20:32:04 -05:00
Alan C. Assis
54134507ff lcd: Add support to Holtek HT16K33 as 14-segment display controller 2021-06-05 20:32:04 -05:00
unixjet
68f19a6290 risc-v/rv32m1: Basic port to rv32m1 ri5cy 2021-06-05 17:25:57 -03:00
Matheus Castello
f81f973af3 boards: rp2040: Add user gpio driver
Add user space gpio driver supporting gpout, gpin, gpint

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-06-05 12:58:20 -03:00
Gustavo Henrique Nihei
0b3c2c7603 spi: Refactor SPI Slave interface prefix to sync with I2C Slave 2021-06-05 04:50:34 -07:00
Gustavo Henrique Nihei
27782aca19 risc-v/esp32c3: Include missing debug.h header 2021-06-05 04:50:34 -07:00
Gustavo Henrique Nihei
91b1de4a67 drivers/spi: Include missing assert.h header 2021-06-05 04:50:34 -07:00
Gustavo Henrique Nihei
37e30ccc54 tools/ci: Workaround conflict with x86_64-elf-binutils after avr-gcc
version bump
2021-06-04 21:04:32 -07:00
Gustavo Henrique Nihei
77dfb39260 risc-v/esp32c3: Uniformize references to CPU interrupt ID 2021-06-04 23:26:13 +01:00
Gustavo Henrique Nihei
f53306f9af risc-v/esp32c3: Ensure internal linkage of interrupt map 2021-06-04 23:26:13 +01:00
Gustavo Henrique Nihei
a2bcffde73 risc-v/esp32c3: Remove unused macros 2021-06-04 23:26:13 +01:00
Abdelatif Guettouche
f00deae9ac boards/esp32c3-devkit: Add a defconfig to test the shared library
example.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 18:08:36 -03:00
Abdelatif Guettouche
dd4962b2f8 boards/esp32c3-devkit: Add the necessary flags for loadable modules and
a module defconfig to test the "module" example.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 18:08:36 -03:00
Abdelatif Guettouche
3b7ae20843 boards/risc-v/esp32c3-devkit: Add an ELF defconfig and the necessary ELF
flags and linker script to support that.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 18:08:36 -03:00
Abdelatif Guettouche
2d55f2659e riscv/esp32c3: Add module text allocator.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 18:08:36 -03:00
Abdelatif Guettouche
778e3ed4ad arch/risc-v/rv32im/riscv_assert.c: Provide dummy definitions of dump
functions when ARCH_STACKDUMP is not enabled.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 12:20:18 -05:00
Abdelatif Guettouche
94ded7a695 arch/riscv/rv32im/riscv_assert.c: Fix preprocessor condition.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 12:20:18 -05:00
Abdelatif Guettouche
6e4a3d6cd8 boards/esp32-devkitc: Add an ELF defconfig.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-04 10:25:15 -05:00
Peter van der Perk
81954fc644 UCANS32K146 add support for B revision 2021-06-04 10:23:09 -05:00
Janne Rosberg
7b882c3588 risc-v/mpfs: fix ext irq 1-12
Handle irq numbers 1-12 correctly
2021-06-04 10:14:58 -05:00
Jani Paalijarvi
ebdc7a06b1 risc-v/mpfs: add MSTimer register offsets and bitmasks 2021-06-04 10:14:58 -05:00
Janne Rosberg
f7cbed0256 risc-v/mpfs: enable up_systemreset() 2021-06-04 10:14:58 -05:00
Janne Rosberg
ec11643394 risc-v/mpfs: add sysreg register defines
This adds minimal set of sysreg defines for MPFS
2021-06-04 10:14:58 -05:00
Masayuki Ishikawa
386946ee54 arch: cxd56xx: Fix address mapping in cxd56_modtext.c
Summary:
- I noticed that DEBUGASSERTION() happens when executing
  an ELF application
- This commit fixes this issue by re-mapping the address
  to SYSBUS in up_module_text_free()

Impact:
- None

Testing:
- Tested with spresense (both DEBUG_ASSERTIONS=n and y)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-04 01:40:37 -05:00
Masayuki Ishikawa
304d72ed00 binfmt: Call up_module_text_free() in unload_module()
Summary:
- I noticed that up_module_text_free() is not called
  if CONFIG_ARCH_USE_MODULE_TEXT=y
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-04 01:40:37 -05:00
Masayuki Ishikawa
f0b689a063 arch: arm: Add select ARCH_HAVE_MODULE_TEXT to ARCH_CHIP_CXD56XX
Summary:
- I noticed that make savedefconfig shows warnings regarding
  'unmet direct dependencies (ARCH_HAVE_MODULE_TEXT)'
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-04 01:40:37 -05:00
Jaroslav Beran
4494ed8a5d samv7/samv71-xult: Add board support for ST7789 LCD controller
SPI0 is used for the connection of the LCD controller.

Additional SPI and GPIO signals definitions:

SPI0_NPCS1 - SPI Chip Select, PD25
GPIO_LCD_CD - Command/Data, pin PB2
GPIO_LCD_RST - Reset, pin PB3

boards/arm/samv7/samv71-xult/src/sam_st7789.c is
derived from boards/arm/imxrt/teensy-4.x/src/imxrt_st7789.c

Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-06-03 21:33:52 -05:00
Jaroslav Beran
d13be4ea57 samv7/spi: Allow 16-bit word size in spi_send
Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-06-03 21:33:52 -05:00
YAMAMOTO Takashi
69b3f034a4 tcp: Move buffered/unbuffered common code to tcp_send.c 2021-06-03 21:33:10 -05:00
YAMAMOTO Takashi
7d33c01a0a tcp_get_recvwindow: Add a revisit comment 2021-06-03 21:32:34 -05:00
Fotis Panagiotopoulos
216194d31b Added automatic log rotation, when log file is opened. 2021-06-03 15:57:28 -03:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
YAMAMOTO Takashi
42d75f97e6 esp32-devkitc/wapi: a few settings which I often need for network testing
CONFIG_DEV_URANDOM=y (for mbedtls)
CONFIG_NETDB_DNSCLIENT_NAMESIZE=64 (azure generated hostnames)
CONFIG_NET_ETH_PKTSIZE=1518
CONFIG_NET_TCP_DELAYED_ACK=y
CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NSH_LINELEN=300 (copy-and-paste azure long URLs)
2021-06-03 10:06:16 -05:00
YAMAMOTO Takashi
c20ed229b1 refresh configs 2021-06-03 10:05:33 -05:00
YAMAMOTO Takashi
d6ed7464b3 Kconfig: Make NETDB_DNSCLIENT select NET_SOCKOPTS
Because it uses SO_RCVTIMEO.
2021-06-03 10:05:33 -05:00
Fotis Panagiotopoulos
e189d83e11 SYSLOG channel add functions return handle to the channel. 2021-06-03 08:36:15 -05:00
Kazuya Hioki
038941b11d arch: cxd56xx: Fix a register name in cxd56_sdhci.c
Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
2021-06-02 22:13:10 -05:00
Masayuki Ishikawa
9e8441e66e boards: spresense: Normalize rndis_smp and wifi_smp defconfigs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00
Masayuki Ishikawa
cfe6e313fb arch: cxd56xx: Introduce up_testset2 in cxd56_testset.c
Summary:
- In cxd56xx, ldrex/strex behavior is slightly different from
  other Arm architectures. Dummy strex must be issued to release
  the exclusive load & store unit.

Impact:
- SMP only

Testing:
- Tested with spresense:smp
- Tested with spresese:wifi_smp, spresense:rndis_smp
- NOTE: CONFIG_CXD56_TESTSET=y must be removed from defconfigs

Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00
Kazuya Hioki
ee0833c45d boards: cxd56xx: Apply CXD56_PHYSADDR to cxd56_imageproc.c and cxd56_audio_dma.c
Summary:
- This commit converts data to the physical address for DMA transfer.

Impact:
- cxd56_imageproc.c and cxd56_audio_dma.c

Testing:
- Not tested

Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00
Masayuki Ishikawa
822002d347 drivers: audio: Apply CXD56_PHYSADDR to cxd56.c
Summary:
- This commit converts data to the physical address for DMA transfer.

Impact:
- cxd56.c only

Testing
- Tested with nxplayer and nxrecorder

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00
Masayuki Ishikawa
2fc6361231 arch: cxd56xx: Introduce CXD56_PHYSADDR
Summary:
- This commit converts data to the physical address for DMA transfer.

Impact:
- cxd56_dmac.c, cxd56_sdhci.c, cxd56_usbdev.c
- cxd56_cisif.c, cxd56_emmc.c, cxd56_ge2d.c, cxd56_udmac.c

Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, spresense_rndis, spresense_rndis_smp
- NOTE: additional commits are needed for the test
- NOTE: cxd56_cisif.c, cxd56_emmc.c, cxd56_ge2d.c, cxd56_udmac.c are not tested

Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00