Commit Graph

48413 Commits

Author SHA1 Message Date
Fotis Panagiotopoulos
c5cc70a8b1 Improvements in Bluetooth connections allocation. 2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
90a93a7474 Improvements in ICMPv6 connections allocation. 2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
1c07a3a696 Improvements in ICMP connections allocation. 2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
f207072121 Improvements in usrsock connections allocation. 2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
7f3591b9cc Improvements in UDP connections allocation. 2023-02-20 09:06:46 +08:00
Fotis Panagiotopoulos
8f9dfe0be1 Improvements in TCP connections allocation. 2023-02-20 09:06:46 +08:00
Xiang Xiao
7d3a9b1cbc Revert "STM32 Nucleo: warning: #warning "Default Flash Configuration Used""
This reverts commit 62c15c03d3.

Fix warning: the choice symbol STM32_FLASH_CONFIG_G (defined at arch/arm/src/stm32/Kconfig:1275) is selected by the following symbols, but select/imply has no effect on choice symbols
 - ARCH_CHIP_STM32F412ZG (defined at arch/arm/src/stm32/Kconfig:1014)
2023-02-20 00:02:36 +02:00
Xiang Xiao
fa3e0faffc fs: Map FD_SETSIZE to OPEN_MAX instead hardcoding 256
and change the default value of LIBC_OPEN_MAX to 256.
Here has more discussion:
https://www.mail-archive.com/dev@nuttx.apache.org/msg09095.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-19 19:17:20 +02:00
Oreh
9902f39d92 Add MTD loop driver (use filemtd) 2023-02-19 19:46:48 +08:00
Tomasz 'CeDeROM' CEDRO
833f7a5a3e Updated python scripts interpreter invocation in tools/.
* Using call to portable `#!/usr/bin/env python3` syntax.
* Updated python interpreter call in `tools/ci/testrun` (please verify).

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2023-02-19 14:15:27 +08:00
Karel Kočí
74790c8033 boards/samv7/hsmci: add option to invert card detection pin
The original code hard-coded card detection to the low when card is
inserted and high when not. This might not be true on every board
because it depends on the slot and wiring used. The second reason is
because it is also possible to detect card with D3 pin pull-up when the
slot does not provide dedicated card detection switch.

This introduces new argument to the sam_hsmci_initialize to allow
invert of card detection pin. It also applies this invert to existing
boards as that was the state up to this point.
2023-02-19 10:36:04 +08:00
Michal Lenc
333707e101 pwm: add PWM overwrite under CONFIG_PWM_OVERWRITE option
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.

Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-19 00:16:41 +08:00
dirksavage88
02fc698e75 Add UART4 & UART5 to high density stm32f103 chips
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2023-02-18 13:32:52 +08:00
crafcat7
ad3def0e15 sys/resource.h:Added ru_maxrss type 2023-02-18 06:59:16 +02:00
Fotis Panagiotopoulos
9bfa9a0b49 stm32_eth: Enabled store-end-forward. 2023-02-18 11:08:46 +08:00
Fotis Panagiotopoulos
87a23f8e38 stm32_eth: Fixed alignment of Ethernet descriptors & buffers. 2023-02-18 11:06:59 +08:00
TimJTi
f629b6063c Correct inconsistencies 2023-02-18 11:03:38 +08:00
Alan Carvalho de Assis
39d3236ee8 esp32c3-devkit: Remove -Werror to let compile ble stack 2023-02-18 11:02:31 +08:00
Michal Lenc
889a84f9f7 same70-xplained: add configuration option for MCAN support
This commit adds configuration file with enabled MCAN support. This is
mainly to track changes in architectural driver that could cause build
errors.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-17 14:58:37 -03:00
Michal Lenc
d52e875a99 samv7: fix build error in sam_mcan.c file
Commit d07792a caused a build error in sam_mcan.c file. This commit fixes
the build. The file now succesfully compiles and CAN works.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-17 14:58:37 -03:00
lilei19
77f6319268 sync ps/assert output 2023-02-17 23:35:44 +08:00
Jackson R
62c15c03d3 STM32 Nucleo: warning: #warning "Default Flash Configuration Used"
https://cwiki.apache.org/confluence/display/NUTTX/Configuration+Variables
Fixed the Warning F412ZG has 1028 KB Flash.
2023-02-17 23:22:32 +08:00
Ville Juven
e9ef70e24b sched/assert: Call abort() instead of exit() in assert
POSIX dictates that assert() terminates via abort(), even though in NuttX
abort() just calls exit(EXIT_FAILURE) it is better to use the correct
API here, if at some point a proper implementation for abort() is made.

Also, as the kernel must not use abort() which is a userspace API, direct
the exit to PANIC() if for some reason _assert() returns (it should not
but trap it here just in case).
2023-02-17 23:07:17 +08:00
Ville Juven
df1d7dd480 libc/exit: Purge calls to userspace API exit() from kernel
Remove calls to the userspace API exit() from the kernel. The problem
with doing such calls is that the exit functions are called with kernel
mode privileges which is a big security no-no.
2023-02-17 23:07:17 +08:00
wangbowen6
0f5b66c335 nxstyle: add "CMUnitTest" to nxstyle white list
https://github.com/apache/nuttx-apps/pull/1575 need this

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-17 22:57:58 +08:00
Ville Juven
2cdba4a0a2 task/task_cancelpt: Kill the child if it is not in a cancel point
Do not allow a deferred cancellation if the group is exiting, it is too
dangerous to allow the threads to execute any user space code after the
exit has started.

If the cancelled thread is not inside a cancellation point, just kill it
immediately via asynchronous cancellation. This will create far less
problems than allowing it to continue running user code.
2023-02-17 22:57:36 +08:00
Ville Juven
0e44666828 signal/sig_dispatch: Signal action was not performed if TCB_FLAG_SYSCALL is set
For some reason the signal action was never performed if the receiveing
task was within a system call, the pending queue inser was simply missing.

This fixes the issue.
2023-02-17 22:54:55 +08:00
Igor Mišić
8e4d461d61 drivers/mtd/ramtron: change nsectors size to uint32 2023-02-17 11:19:46 -03:00
Fotis Panagiotopoulos
85ceb7920e Typo fixes. 2023-02-17 11:17:11 -03:00
Takeyoshi Kikuchi
70ce4b4fc1 libc: unistd: lib_getrlimit: set cur/max value for RLIMIT_NOFILE to "OPEN_MAX".
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-17 18:07:30 +08:00
Takeyoshi Kikuchi
c4fc414b09 libc: unistd: lib_getrlimit: use INT_MAX as dummy rlim_max value.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-17 18:07:30 +08:00
Takeyoshi Kikuchi
2e5a20612c libc: unistd: lib_getrlimit: return a value for RLIMIT_NOFILE request.
In the Nim language "selectors"(I/O multiplexing) module, the maximum
number of file descriptors is obtained with getrlimit() as follows.

        var fdLim: RLimit
        var res = int(getrlimit(RLIMIT_NOFILE, fdLim))
        if res >= 0:
          res = int(fdLim.rlim_cur) - 1

To be able to use the same implementation as other POSIX-based OS,
getrlimit() should return a value.
(For now, let it return 128.)

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-17 18:07:30 +08:00
chao an
fff0e58860 tools/kconfiglib: purge warning print of kconfiglib
Purge warning:
Kconfig:249: warning: the 'modules' option is not supported.
Let me know if this is a problem for you, as it wouldn't be that
hard to implement. Note that modules are supported -- Kconfiglib
just assumes the symbol name MODULES, like older versions of the
C implementation did when 'option modules' wasn't used.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
e334786f81 tools/Unix.mk: Make sed compatible with macOS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Co-authored-by: chao an <anchao@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
6b61b5ed15 Fix warning: warning: ESP32C6_DEVKIT_RUN_IRAM has 'help' but empty help text
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
d5b510e023 tools/ci: Install genromfs instead building it from source code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
Xiang Xiao
0582930e4b tools/ci: Install python kconfiglib
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-17 16:01:52 +08:00
David Sidrane
9d0e712347 mmcsd_sdio:Release CPU during wait for Write Completion 2023-02-17 15:26:19 +08:00
David Sidrane
d570a93945 mmcsd_sdio:Insure a error exiting via mmcsd_removed will not Hang system.
mmcsd_removed will be called if the card is in invalid state.
   This can happen if the card is bad, or vibrations causes a power
   loss.

   mmcsd_removed resets:
     priv->capacity     = 0; /* Capacity=0 sometimes means no media */
     priv->blocksize    = 0;
     priv->probed       = false;
     priv->mediachanged = false;
     priv->wrbusy       = false;
     priv->type         = MMCSD_CARDTYPE_UNKNOWN;
     priv->rca          = 0;
     priv->selblocklen  = 0;
     priv->widebus      = false;

  If blocksize is set to 0 will cause the log2 to result
  in an infinate loop in some drivers.

  IS_EMPTY will check for priv->type = MMCSD_CARDTYPE_UNKNOWN
  and return ENODEV.
2023-02-17 15:26:19 +08:00
crafcat7
33b22f51da libc/lib_memcpy.c: Add mempcpy method.
Signed-off-by: crafcat7 <chenrun1@xiaomi.com>
2023-02-17 15:15:19 +08:00
David Sidrane
c6d3e7e087 stm32:dma v2 Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
David Sidrane
d2ea49109a stm32h7:dma Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
David Sidrane
8064f60a9e stm32f7:dma Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
Alan Carvalho de Assis
fd9f2b8a03 boards/esp32: Fix WiFi default Algorithm 2023-02-17 12:10:13 +08:00
Nathan Hartman
b881948b27 arch/pic32mz: Fix compiler warnings in pic32mz_ethernet.c
* arch/mips/src/pic32mz/pic32mz_ethernet.c
  (): Fix warnings related to printf-style format specifiers.
2023-02-17 09:58:02 +08:00
Fotis Panagiotopoulos
f78bdd3978 stm32_eth: Busy bit is cleared before accessing the MACMIIAR register. 2023-02-17 09:56:35 +08:00
Nathan Hartman
de01550e7e Fix typo: s/then/them/ 2023-02-17 09:55:55 +08:00
Nathan Hartman
1d5c8380b1 arch/pic32mz: Serial TIOCxBRK BSD-compatible BREAK support
In the lower half UART driver for PIC32MZ architecture, adding the
TIOCxBRK ioctl calls, which allow an application to transmit a UART
line BREAK signal.

This architecture does not support BSD-style BREAK in hardware so our
implementation follows the precedent set in STM32, GD32, and Kinetis
architectures: By default, if only PIC32MZ_UART_BREAKS is configured,
we produce the hardware-native BREAK, which lasts for 12 bit lengths;
if, in addition, PIC32MZ_SERIALBRK_BSDCOMPAT is configured, we
generate a BSD-style BREAK by putting the TX pin in GPIO mode and
driving it low "manually" until told to stop.

* arch/mips/src/pic32mz/Kconfig
  (config PIC32MZ_UART_BREAKS): New. Appears as
   CONFIG_PIC32MZ_UART_BREAKS in code.
  (config PIC32MZ_SERIALBRK_BSDCOMPAT): New. Appears as
   CONFIG_PIC32MZ_SERIALBRK_BSDCOMPAT in code.

* arch/mips/src/pic32mz/hardware/pic32mz_pps.h
  (__PPS_OUTPUT_REGADDR_TO_GPIO, PPS_OUTPUT_REGADDR_TO_GPIO): New
   macros to automatically determine the GPIO port and pin from the
   corresponding PPS (Peripheral Pin Select) define. Since there is a
   one-to-one correspondence between PPS output mappings and a single
   port and pin, these macros avoid writing redundant pin mappings. We
   use this when switching the TX pin from UART to GPIO to generate
   the BREAK and we could use it in other peripheral drivers in the
   future to override hardware behavior.

* arch/mips/src/pic32mz/pic32mz_serial.c
  (struct up_dev_s): Add new field 'brk' to indicate line break in
   progress when built with PIC32MZ_UART_BREAKS. If generating BSD-
   compatible BREAKs, also add tx_gpio, tx_pps_reg, and tx_pps_val, to
   let us toggle the pin between UART and GPIO modes.
  (up_ioctl): Add cases for TIOCSBRK and TIOCCBRK to turn BREAK on and
   off, with both hardware-native and BSD-compatible implementations.
   This is similar to the STM32F7 implementation.
  (up_txint): Block enabling TX interrupt if line break in progress.
   This is similar to the STM32F7 implementation.
2023-02-17 09:55:29 +08:00
Nathan Hartman
461cd4c4c5 boards/chipkit-wifire: Avoid sudo for flash programming 2023-02-17 09:54:16 +08:00
yinshengkai
abdb16aea2 tools: add trace parse script
Extract a valid trace line and resolve the address to a function name

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-17 02:06:38 +08:00