Commit Graph

45469 Commits

Author SHA1 Message Date
Sebastien Lorquet
6bd36d64e3 Packet dropped in IPv4/v6 input is now an info, not a warning 2022-06-09 16:07:34 +02:00
Eero Nurkkala
39d389545e risc-v/mpfs: usb: add composite support
This provides USB composite (CDC/ACM and Mass Storage) support
for mpfs board. In addition, a number of USB fixes are included:

 - Support for Setup Out packets
 - Proper support for larger than packet size writes
 - Finishing setup packets properly

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-06-09 20:44:40 +08:00
Eero Nurkkala
9f9fb17d64 usbdev/Kconfig: allow CONFIG_USBMSC_IFNOBASE configuration
usbmsc.h uses the CONFIG_USBMSC_IFNOBASE configuration option,
but it cannot be set anywhere. Provide means to configure this
option which is useful when it's other than the default zero.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-06-09 20:44:40 +08:00
Jukka Laitinen
b7a1b75a3b arch/risc-v/src/mpfs/mpfs_start.c: Don't boot if DDR is enabled and training fails
Output "X" with showprogress and make a system reset.

Silently ignoring failed training is dangerous and will cause random behaviour if DDR is used

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-06-09 09:36:38 -03:00
Abdelatif Guettouche
326183bbbc esp32c3/Kconfig: Remove duplicate wireless config
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-06-09 20:19:35 +08:00
zouboan
adc23911b7 arch/sparc/bm3803 fix use of uart1 and uart2 2022-06-08 17:28:00 +03:00
Alin Jerpelea
87ee22b8d8 rename DISCLAIMER-WIP
Before graduation We can only remove the WIP from the DISCLAIMER.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-06-08 20:17:37 +08:00
Abdelatif Guettouche
c23699be60 esp32c3-devkit/knsh: Enable CONFIG_RAW_BINARY to convert the ELF file.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-06-08 20:16:00 +08:00
Xiang Xiao
11c8f3125d sched/tls: Wrap up_info_size into tls_info_size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-08 19:07:33 +09:00
Xiang Xiao
8543df7e4c sched/init: Initialize the idle thread local storage by tls_init_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-08 19:07:33 +09:00
Xiang Xiao
2707ba58d2 sched/tls: Shouldn't get tls info directly from sp in kernel space
since the stack may switch to the kernel or interrupt stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-08 08:56:04 +09:00
Michał Łyszczek
114758e518 add docs for stm32wl5 chip and nucleo-wl55jc board
This patch adds documentation for both stm32wl5 chip family and
nucleo-wl55jc board. I've kept the same directory structure for
arm/stm32 as in arch/ and boards/ directories.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-06-08 08:09:50 +09:00
Michał Łyszczek
a5bcb2dc46 Documentation: fix multiple errors and warnings
Multiple files were badly formatted, which resulted in many
warnings. This made it harder to check for errors in newly
written documentation.

What's worse, badly formatted text resulted in butchered
output in generated html.

This patch fixes most of the errors, but alas, not all of
the errors can be fixed. Anyway, this should be way easier
to spot errors in newly written docs now.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-06-08 03:02:32 +08:00
Xiang Xiao
f1236da21c fs: Make the binary(no process) mode as the default
POSIX require file system shouldn't enable the \r and \n conversion by default
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Xiang Xiao
df0e9da1ba libc/stdio: Support 'e'(O_CLOEXEC) in lib_mode2oflags
follow BSD and Linux convention:
https://man.openbsd.org/fopen
https://www.man7.org/linux/man-pages/man3/fopen.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Xiang Xiao
d8aa41de7b libc/stdio: Add FLAG_KEEP to avoid the duplication of (O_BINARY | O_EXCL)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Xiang Xiao
49834c9151 libc/stdio: Check 'x' instead 'X' in lib_mode2oflags
follow BSD and Linux convention:
https://man.openbsd.org/fopen
https://www.man7.org/linux/man-pages/man3/fopen.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Xiang Xiao
3357b0b15f libc/stdio: Remove the unused flags(MODE_[PLUS|B|X|T) in lib_mode2oflags
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:26 +03:00
Xiang Xiao
28b25e0391 arch: dump "<noname>" as the task name if CONFIG_TASK_NAME_SIZE equals 0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:17:23 +03:00
Xiang Xiao
2b2830c252 arch/assert: Replace twice strlcpy with single snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:17:23 +03:00
Xiang Xiao
b02db04e00 arch/assert: Keep the thread dump column order same as ps
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:17:23 +03:00
Xiang Xiao
c52a19c8dc arch: Include nuttx/tls.h in *_assert.c
to avoid error: "invalid use of undefined type 'struct task_info_s'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:17:23 +03:00
ligd
118fd3902c dump_task: also dump thread param when dump thread name
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-06-07 20:17:23 +03:00
Xiang Xiao
9d4c708913 net/tcp: Search conn list again to aovid the race condition in tcp_timer_expiry
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:15:41 +03:00
Xiang Xiao
fe85e9d0fa net: Remove devif_timer from comment
since devif_timer has been removed in:
commit 035d925864
Author: zhanghongyu <zhanghongyu@xiaomi.com>
Date:   Sun May 29 21:47:28 2022 +0800

    devif: remove all devif_timer

    Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:15:41 +03:00
Xiang Xiao
298b4aba0c net/tcp: Hold the net lock in tcp_timer_expiry
to follow the call convention for d_txavail

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:15:41 +03:00
Xiang Xiao
5b165a2294 libc/stdio: Generate the dummy atexit and on_exit
since the compiler may generate the code call atexit automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:14:34 +03:00
Gustavo Henrique Nihei
183da24fc5 mm: Log name of the Heap to which the new region is being added
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-06-08 01:10:10 +08:00
Michał Łyszczek
f643edbe41 boards/nucleo-wl55jc: add new board
This patch includes bare minimum support for nucleo-wl55jc board.
It compiles and nsh shell is working properly on virtual com port
over USB. 3 onboard leds with userled driver are working.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-06-07 23:20:02 +08:00
Michał Łyszczek
e54fe68bbf stm32wl5: add new chip family
This patch adds new chip family, stm32wl5x. This is bare minimum
implementation of said chip. I've tested this by running nsh.
There are only two chips in this family, stm32wl55 and stm32wl54.
The only difference between them is that stm32wl55 has LORA.

stm32wl5 is dual CPU (not core!). Right now only CPU1 is implemented.
CPU0 has access to radio hardware (while CPU1 does not). Chip is
designed so that CPU0 handles radio traffic while CPU1 does the
heavy lifting with data - there is communication pipe between two
CPUs.

I plan to use nuttx on CPU1 and LORA from stm32cube on CPU0 so I
don't have implementing CPU0 right now - once we have working LORA
in nuttx this may change.

Peripherals (except for radio) are shared so it's best to focus on
CPU1 to initialize all peripherals so that CPU0 can only use them
later. There is no real benefit to implement CPU0 if we don't have
working LORA/radio support in nuttx.

In time I will be implementing more and more things from this chip.
Right now I would like this minimal implementation to be merged in
case someone wants to work on this chip as well.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>

---
patch v1->v2
  - fixed formatting (suggested by Alan Carvalho de Assis)
  - rebased patch to master (previous patch was based on nuttx-10.2
    and did not compile on master)
2022-06-07 22:28:32 +08:00
anjiahao
e0c3bf64a0 libc:Optimize the behavior of fwrite
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-06-07 22:28:00 +08:00
wangbowen6
af87921eda arm/tlsr82: gpio driver bug fix and optimize.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-06-07 22:26:36 +08:00
Abdelatif Guettouche
8217c646a7 arch/xtensa/xtensa_coproc.S: Fix the condition to save the coprocessors
state.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-06-07 19:50:50 +08:00
zhuyanlin
3455002ffd libc:xtensa:arch_memmove: fix warning
warning: 'SIM_CHECKS_ALIGNMENT' macro redefined
[-Wmacro-redefined] #define SIM_CHECKS_ALIGNMENT 1

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-06-07 11:09:57 +03:00
Xiang Xiao
5509f8f4ba arch/x86: Fix the Kconfig warning
arch/x86/Kconfig:28:warning: choice value used outside its choice group
arch/x86/Kconfig:29:warning: defaults for choice values not supported

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 12:43:11 +09:00
Jeonghyun Kim
4058f01faf Correct code formatting 2022-06-07 03:20:57 +08:00
Jeonghyun Kim
f53792fea0 board: nucleo-l432kc: Add spi driver registering function and Make it is called on appinit. 2022-06-07 03:20:57 +08:00
Jeonghyun Kim
1717ffdb38 chip: stm32l4: Register spi character driver when both spi port and driver available 2022-06-07 03:20:57 +08:00
Jeonghyun Kim
f7295dd434 board: nucleo-l432kc: Add missing TIM1 CH3, CH4 pin definition 2022-06-07 03:20:57 +08:00
Jeonghyun Kim
9aa3edc11e chip: stm32l4: Correct config mistype 2022-06-07 03:20:57 +08:00
Abdelatif Guettouche
060df22968 arch/xtensa: Initialize the internal heap early.
We might have a situation where an allocation will be requested before
the call to `up_initialize` is performed.  For the current code, this
situation is the stack for the CPUs in SMP mode.

Beside this issue, it's natural to have the internal heap initialized
with the other heaps.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-06-07 02:32:30 +08:00
Fotis Panagiotopoulos
73d5a27702 Fix in default syslog date format. 2022-06-05 22:23:32 +08:00
Hidenori Matsubayashi
cbcc748985 Fix wrong path in README for RISC-V
Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-06-05 16:05:40 +08:00
Richard Tucker
2b8c59fcf1 arch/risc-v/litex: fix typo 2022-06-04 17:04:42 +03:00
Fotis Panagiotopoulos
c0df7317ac Fix in syslog file separator. 2022-06-04 14:30:15 +08:00
Xiang Xiao
01c8bebf58 sched/tls: Add task_init_info and task_uninit_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
Xiang Xiao
47b707bbf8 sched/tls: Add tls_init_info and tls_dup_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
Xiang Xiao
3e32b605fe libc/tls: Make tls_get_info as the pulibc function instead up_tls_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
Xiang Xiao
33a6aa2f48 sched/tls: Don't compensate the tls size to the stack size
it isn't good to change the stack size passed by caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
Xiang Xiao
bd76e69f8d tls: Merge tls_xxx into pthread_keyxxx
it's always better to provide the standard api directly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00