Commit Graph

48421 Commits

Author SHA1 Message Date
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
Ville Juven
905cba3ee3 group/tg_info/argv: Make utility function to read argv as string
This creates a generic and safe way to read a process argument vector
as string from any context.
2023-02-17 01:27:16 +08:00
SPRESENSE
a8e5dcbfa9 boards/spresense: Enable broadcast flag in DHCP process
In spresense:wifi, renew command will be failed with disabling
broadcast flag.
For spresense defconfig, enabling it.
2023-02-16 20:11:35 +09:00
Jackson R
491c3b564f Repeated Command "sudo port install"
The merged code had Repeated Command.
2023-02-16 14:09:50 +08:00
SPRESENSE
277e0b941a include/sys/socket.h: Add SOCK_CTRL to socket type
SOCK_CTRL is added to provide special control over network drivers
and daemons. Currently, SOCK_DGRAM and SOCK_STREAM perform this control,
but these use socket resources. In the case of usersocket in particular,
this is a waste of the device's limited socket resources.
2023-02-16 12:13:01 +09:00
Jackson R
37db965cff This simulator was tested on ARM MacBook.
Updating Simulator for macOS

macOS requires genromfs and X11 Libraries to run Simulators.
* Added instructions to install genromfs
* Added instructions to install X11
Adding Xorg Server

The linker was unable to identify the location of X11 libraries.

removed -L/opt/X11/lib from ln 145

Updating Changes to streamline with other Hosts
2023-02-16 09:27:54 +08:00
Nathan Hartman
212ef18803 arch/pic32mz: Fix typos in PPS register mapping defines
The PIC32MZ architecture provides a Peripheral Pin Select (PPS) which
allows mapping peripherals to different GPIO pins. To map a peripheral
output, a value is programmed to a register called RPnxR, where n is
the GPIO port (A thru K) and x is the GPIO pin (0 thru 15). The names
of these registers in code are PIC32MZ_RPnxR. However, in various
definitions, these were mistakenly written as PI32MZ_RPnxR (missing C
in PIC32). This prevents using any of the affected mappings. This
issue is fixed by repairing the define names.

* arch/mips/src/pic32mz/hardware/pic32mzec_pps.h,
  arch/mips/src/pic32mz/hardware/pic32mzef_pps.h:
  (): s/PI32MZ/PIC32MZ/g
2023-02-16 09:27:33 +08:00
Nathan Hartman
7c90fbd7c2 arch/pic32mz: Fix PPS mappings for RPE5R register
The defines for Peripheral Pin Select (PPS) register RPE5R were called
RPE4R inadvertently; however, mappings elsewhere in the file used the
correct name of RPE5R, so the build would break if anyone attempted to
map those peripherals to GPIO pin E5. This issue is now fixed.

* arch/mips/src/pic32mz/hardware/pic32mzec_pps.h,
  arch/mips/src/pic32mz/hardware/pic32mzef_pps.h:
  (PIC32MZ_RPE4R_OFFSET): Rename to PIC32MZ_RPE5R_OFFSET.
  (PIC32MZ_RPE4R): Rename to PIC32MZ_RPE5R.
2023-02-16 09:26:30 +08:00
Nathan Hartman
6fb08b8b03 Fix typos: s/UARt/UART/ 2023-02-16 09:25:35 +08:00
Xiang Xiao
6920fffb00 limits.h: Map _POSIX_[S]SIZE_M[AX|IN] to [U]LONG_M[AX|IN]
correct SIZE_MAX and SSIZE_MAX/SSIZE_MIN definition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-15 17:47:51 +01:00
Julian Oes
4f30c298bf stm32h7: reduce the extended filter size to 64
When I checked how this register was set I discovered that 128 was not
accepted by the H7 but 64 was ok. Looking at the STM32Cube's HAL it
seems to be only 64 words long, however, the reference manual claims
otherwise.

I have opened a discussion on the ST community forum
https://community.st.com/s/question/0D73W000001nzqFSAQ
but unfortunately not received an answer yet.

In the meantime, I think, we should update this to what I found to be
working though.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-02-15 19:06:54 +08:00
Julian Oes
a59e65db3f stm32h7: fix comment
This was likely just a copy-paste error.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-02-15 19:06:54 +08:00
Nathan Hartman
2092e9a9ca Adding myself to AUTHORS 2023-02-15 08:59:47 +01:00
Nathan Hartman
409e2f3701 drivers/serial, libc/termios: Implement tcsendbreak
The TERMIOS(3) function tcsendbreak() and the IOCTLs TCSBRK and TCSBRKP
transmit a serial line Break.

Previously NuttX included an extern declaration for tcsendbreak() and
defines for TCSBRK and TCSBRKP but none of these were implemented.
Attempting to build programs that called tcsendbreak() would fail with
a linker error; attempting to use TCSBRK and TCSBRKP would result in an
error at runtime.

This changeset adds the tcsendbreak() function and handling for TCSBRK
and TCSBRKP; tcsendbreak() is implemented in terms of TCSBRK. Both
TCSBRK and TCSBRKP are implemented in terms of the BSD-compatible Break
IOCTLs TIOCSBRK and TIOCCBRK, which must be provided by the lower half
serial driver. Currently, not all lower half serial drivers in NuttX
support these IOCTLs. Those that do implement them may need one or more
Kconfig options to be set, such as `CONFIG_*_U[S]ART_BREAKS` and, on
some architectures, a separate `CONFIG_*_SERIALBRK_BSDCOMPAT`.

* drivers/serial/serial.c
  (uart_tcsendbreak): New function.
  (uart_ioctl): Implement TCSBRK and TCSBRKP.

* libs/libc/termios/lib_tcsendbreak.c
  (): New file.

* libs/libc/termios/Make.defs
  (CSRCS): Add lib_tcsendbreak.c to the build.

Thanks to Xiang Xiao for PR feedback.

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2023-02-15 07:50:02 +08:00
Eero Nurkkala
b9ba262fb7 risc-v/mpfs: add athena irq defines
Add the Athena cryptographic microprocessor irq defines.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-02-15 00:21:03 +08:00
SPRESENSE
a9fb20039e utsname: Expand the buffer for version information slightly
The version information basically uses 20 characters for date and time,
which is small enough to specify an arbitrary version string. Therefore,
increase the buffer a little.
2023-02-14 22:35:43 +08:00
zhangyuan21
32513cedf0 usbdev/adb: add adb usbclass_unbind function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-14 22:20:12 +08:00
Fotis Panagiotopoulos
4d341ed152 Added myself in AUTHORS file. 2023-02-14 15:08:45 +01:00
Xiang Xiao
a3a1883787 fs: Don't guard rename with CONFIG_DISABLE_MOUNTPOINT
since the pseudo root fs support rename too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
Xiang Xiao
4009cb1970 fs: Don't guard ftruncate with CONFIG_DISABLE_MOUNTPOINT
since ftruncate depends on file_operations not mountpt_operations

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
Xiang Xiao
a05f9aaa85 fs: Don't guard fsync with CONFIG_DISABLE_MOUNTPOINT
since the driver can also support fsync by implementing BIOC_FLUSH

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-14 11:24:37 +08:00
chao an
bd7e521871 net/sendfile: adapt sendfile() to support new driver model
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-14 11:21:09 +08:00
Ville Juven
40800823c6 sched/nxtask_sigchild: Set exit code when CONFIG_SCHED_CHILD_STATUS=y
This is a follow-up to https://github.com/apache/nuttx/pull/8486
2023-02-14 10:27:46 +09:00
jihandong
a1e04617f8 drivers/video/video: add poll support to capture
support part of Linux std:
https://www.kernel.org/doc/html/v4.9/media/uapi/v4l/func-poll.html

Capture devices set the POLLIN and POLLRDNORM flags in the revents field

Signed-off-by: jihandong <jihandong@xiaomi.com>
2023-02-13 23:17:45 +08:00
jihandong
ae7bc4e300 drivers/video/video: add NONBLOCK support
Signed-off-by: jihandong <jihandong@xiaomi.com>
2023-02-13 23:17:45 +08:00
zhangyuan21
a20bc77010 sched/pthread: change the wrong type cast
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-13 23:17:29 +08:00
Xiang Xiao
dc2e9b8771 libc: Move memfd related stuff to sys/mman.h
follow the freebsd definition:
https://github.com/freebsd/freebsd-src/blob/master/sys/sys/mman.h#L207-L228

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-13 16:00:37 +01:00
Xiang Xiao
0ef073573a net: Remove protocol argument from si_setup callback
since the implementor could get the same value from socket::s_proto

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-13 22:41:19 +08:00
chao an
1e7014262c sim/windows: fix build break on visual studio
1. fix build break on visual studio
2. enable more net config

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-13 20:37:25 +08:00
zhangyuan21
b4aa5b0d0b usbdev: fixed DUALSPEED issue for adb/cdcecm/rndis
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-13 18:47:42 +08:00
Igor Mišić
3a7382e690 fs/littlefs: add full support for LittleFS block device cfg in Kconfig 2023-02-13 18:46:46 +08:00
ligd
87a92d995f sim: fix nuttx consumes much CPU time
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-02-13 18:41:43 +09:00
ligd
758668d11a sim: remove sim_saveusercontext() return value
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-02-13 18:41:43 +09:00
anjiahao
7347684e5f mempool:fix bug when list needs to be protected by a lock
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-13 15:47:17 +08:00
anjiahao
4ced3c9642 mempool:fix bug when use MM_BACKTRACE
caculate blk address when mempool_multiple_free
have a bug. need a real blocksize to caulate the
memory address.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-13 15:47:17 +08:00
Xiang Xiao
84059a949c Revert "lib/math32.h: support LOG2_CEIL/LOG2_FLOOR function at compile time"
avoid the duplicated FLSxx and LOG2xx macro
This reverts commit 224f53fe02.
2023-02-13 09:30:25 +02:00
Takeyoshi Kikuchi
6447064d81 netinet: in.h: add support for Nimlang compatibility.
Without this POSIX-compatible definition, support for nativesockets module in Nimlang is problematic.

.nimcache/(snip)@spure@snativesockets.nim.c: In function 'toInt__pureZnativesockets_69':
.nimcache/(snip): error: 'IPPROTO_ICMPV6' undeclared (first use in this function); did you mean 'IPPROTO_ICMP6'?
  291 |   result = IPPROTO_ICMPV6;
      |            ^~~~~~~~~~~~~~
      |            IPPROTO_ICMP6

Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-13 09:28:52 +08:00
anjiahao
267976e5a8 mempool:fix bug for realloc when shortage of memory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-02-13 01:57:41 +08:00
zhangyuan21
01741a0b65 sched/semaphore: increase sem count when holder task exit
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:49:45 +08:00
TimJTi
98e47a1770 FUSB302
Update fusb302.c

Update fusb302.c
2023-02-12 16:48:44 +08:00
zhangyuan21
9017f70561 sched/pthread: check pthread group after find joininfo
Need check tcb or group info after find joininfo,
otherwise the wrong value will be returned.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:47:28 +08:00
zhangyuan21
8f4cb0fec3 rndis: add endpoint configure
ep3 is not avaliable in dummy hcd, so need to
make the endpoint number configurable.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:38:11 +08:00
zhangyuan21
f77a824105 usbdev/composite: remove excess uninitialize code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:37:21 +08:00