Commit Graph

46307 Commits

Author SHA1 Message Date
Xiang Xiao
27e8d058e7 sched: Simplify the cpuload process
1.Forward nxsched_process_cpuload to nxsched_process_cpuload_ticks directly
2.Define the dummy nxsched_process_cpuload_ticks when CPULOAD isn't enabled
3.Remove the weak attribute from nxsched_process_cpuload_ticks

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-18 22:11:29 +03:00
Daniel P. Carvalho
95d91ef906 STM32L4 ADC: Update configuration file 2022-08-18 11:26:25 -03:00
Daniel P. Carvalho
7518beee2e STM32L4 ADC: Change the way that hardware trigger configuration word for regular and injected channels are done. 2022-08-18 11:26:25 -03:00
Ville Juven
23a2e27ffc mpfs/opensbi: Add the ddr memory region back to opensbi ld script
fixes ld-envm-opensbi.script:41: warning: memory region `ddr' not declared
2022-08-18 22:14:21 +08:00
Ville Juven
75ba9001bc risc-v/mpfs: Make entrypoint table run-time configurable
Default values still come from configuration, but this gives the option
to modify the per-hart entrypoints.
2022-08-18 21:50:53 +08:00
chao.an
5dd5d177ae sched: fix visual studio Compiler Error C2010
D:\code\incubator-nuttx\include\nuttx/sched_note.h(710,1):
  error C2010: “.”: unexpected in macro formal parameter list
  [D:\code\incubator-nuttx\vs20225\sched\sched.vcxproj]

Compiler Error C2010: 'character' : unexpected in macro formal parameter list

Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2010?view=msvc-170

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-18 12:05:16 +08:00
Michał Łyszczek
71d4573cc3 boards/stm32wl5: simplify Makefile
Remove ifeq and endif and replace them with CSRC-$(CONFIG) form.
This simplifies Makefile and makes it a tiny bit more readable.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek
4e967c67b4 stm32wl5: fix unbuffered mode and other possible bugs
This patch fixes unbuffered mode so it actually works.

Also, patch contains fixes for possible bugs that could result in
deadlock or system hang in certain situations.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek
3e43128f07 boards/stm32wl5jc: add support for board ipcc
Allows to easily enable and configure ipcc for board.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek
dcc2499926 boards/stm32wl5jc: add support to enable CPU2 booting at startup
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
Michał Łyszczek
cc08ae67cb stm32wl5_pwr: add support to boot second CPU (cortex-m0)
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-08-18 11:46:38 +08:00
curuvar
74f1bfbfd7 Added support for Raspberry Pi Pico W 2022-08-17 19:03:19 -03:00
zhanghongyu
e03c2c321a tcp: reset conn->nrtx when ack received
Otherwise, when a long test triggers multiple timeout retransmissions,
the late timeout retransmissions are always delayed between 24 and 48 seconds

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-17 21:35:09 +03:00
chao.an
14fb56c799 netdev: fix visual studio Compiler Error C2016
D:\code\incubator-nuttx\include\nuttx/net/netdev.h(275,3):
  error C2016: C requires that a struct or union has at least one member
  [D:\code\incubator-nuttx\vs20222\boards\board.vcxproj]

Compiler error C2016: C requires that a struct or union has at least one member

Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-errors-c2001-through-c2099?view=msvc-170

Signed-off-by: xiangdong6 <xiangdong6@xiaomi.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-17 21:38:30 +08:00
wangbowen6
52a1692cfa rpmsgdev: add rpmsg-device support.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-08-17 18:33:58 +08:00
chao.an
704b03f833 sched: fix visual studio Compiler Warning (level 4) C4706
D:\code\incubator-nuttx\sched\environ\env_dup.c(81):
  warning C4706: assignment within conditional expression
  [D:\code\nuttx\incubator-nuttx\vs20221\sched\sched.vcxproj]

Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4706?view=msvc-170

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-17 18:33:44 +08:00
Eero Nurkkala
a1ff841ca4 risc-v/mpfs: ihc: don't use semaphores with OpenSBI vendor calls
OpenSBI vendor extension calls must not cause scheduling, as they're
part of M-mode trap handling. Thus, comment out nxsig_usleep() as
well, which is occasionally taken and crashes the system in that
case. Fix this by commenting out lines that have the potential to
cause scheduling.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-08-17 18:33:32 +08:00
Tiago Medicci Serrano
daa4cf7ad2 documentation: improve frame buffer and lcd drivers documentation 2022-08-17 10:04:52 +03:00
chao.an
6e5908cc92 sched: fix visual studio Compiler Warning (level 4) C4189
D:\code\incubator-nuttx\sched\pthread\pthread_create.c(154,22):
  warning C4189: “pjoin”: local variable is initialized but not referenced
  [D:\code\incubator-nuttx\vs20221\sched\sched.vcxproj]

D:\code\incubator-nuttx\sched\group\group_setupidlefiles.c(61,28):
  warning C4189: “group”: local variable is initialized but not referenced
  [D:\code\incubator-nuttx\vs20221\sched\sched.vcxproj]

Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4189?view=msvc-170

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-17 10:00:20 +03:00
Alan Carvalho de Assis
cf6eabd125 libc.csv: Add new found missing functions 2022-08-17 11:23:56 +08:00
Jiuzhu Dong
a7e7487053 fs/rpmsgfs: fix double free
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-17 01:57:26 +08:00
wangbowen6
0b95148e5a rpmsgfs: fix ioctl operation can not work bug
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-08-17 01:57:15 +08:00
raiden00pl
a362c2caf9 steval-eth001v1: add FOC examples 2022-08-16 19:38:43 +08:00
Duane Skelton
df4b8adacf Added extern C {} wrapper consistent with other headers in include/sys 2022-08-16 12:04:01 +08:00
anjiahao
beb9144141 include:add sys/queue.h support form openbsd
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-08-16 12:03:45 +08:00
Alan Carvalho de Assis
607ef3426a Add some missing functions to libc.csv 2022-08-16 10:04:51 +08:00
zhanghongyu
b80b4831e0 wireless: Add ioctl cmd to setting PTA prio
info:
https://docs.silabs.com/wifi/wf200/content-source/application-note/wifi-coexistence#pta-state-request

Is the PTA priority enumeration type sufficient?

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-15 23:15:45 +08:00
zhanghongyu
daf39c03bd dns_client: directly initialize g_dns_servers and remove dns_initialize directly
g_dns_servers need init before dns_query, Otherwise sim can not add default
dns server when use usrsock mode to share host network.

Avoid similar problems in the future, so directly initialize g_dns_servers.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-08-15 16:39:37 +03:00
raiden00pl
6d1646625a arch/arm/src/stm32f7: port FOC driver from arch/stm32 2022-08-15 13:39:08 +02:00
Xiang Xiao
a02101efff arch/sim: Remove up_smpsignal.o and up_touchscreen.o from REQUIREDOBJS
since it isn't required anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-15 10:41:46 +03:00
Xiang Xiao
ba9486de4a iob: Remove iob_user_e enum and related code
since it is impossible to track producer and consumer
correctly if TCP/IP stack pass IOB directly to netdev

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-15 08:41:20 +03:00
curuvar
e247eaf3e8 Add gSPI mode support for Infineon CYW43539 2022-08-15 10:31:36 +08:00
Nathan Hartman
0892c895fc ioexpander: Fix typos in comments
include/nuttx/ioexpander/gpio.h:
* Fix some typos in comments.
2022-08-15 10:25:11 +08:00
Nathan Hartman
9d5a91c41a ioexpander: Honor C89 standard 2022-08-15 10:24:39 +08:00
Nathan Hartman
585ca7d028 boards/sim: Fix copy/paste bug
boards/sim/sim/sim/src/sim_ioexpander.c:
* sim_gpio_initialize(): Fix what appears to be a copy/paste bug
  causing a wrong GPIO pin number to be used.
2022-08-15 10:24:05 +08:00
Alan Carvalho de Assis
9b67c759cb apa102: Remove unused variable 2022-08-15 00:32:42 +08:00
Alan Carvalho de Assis
8939350af1 stm32f4discover: Add Shift Game board example with gesture (APDS9960) support 2022-08-15 00:32:42 +08:00
Alan Carvalho de Assis
483e152c93 stm32f4discovery: Add support to APA102 2022-08-15 00:32:42 +08:00
Alan Carvalho de Assis
1b79032cbd stm32f4discovery: Add support to 5-Way discrete joystick 2022-08-15 00:32:42 +08:00
Alan Carvalho de Assis
9a08b04d3f stm32f4discovery: Add support to APDS9960 2022-08-15 00:32:42 +08:00
luojun1
bee9dcc73a Add Kconfig option, user can specify the location of g_iob_buffer
Signed-off-by: luojun1 <luojun1@xiaomi.com>
2022-08-14 21:00:28 +08:00
luojun1
4e62772be5 modify iob to support header padding and alignment features
Signed-off-by: luojun1 <luojun1@xiaomi.com>
2022-08-14 21:00:28 +08:00
Masayuki Ishikawa
548540eb13 arch: qemu-rv: Fix high CPU usage in SMP mode
Summary:
- I noticed that QEMU shows high CPU usage if the number of
  CPUs does not match the kernel configuration. (e.g. -smp 8
  and CONFIG_SMP_NCPUS=2)
- This commit fixes this issue.

Impact:
- qemu-rv only

Testing:
- Tested with the following configs
  - rv-virt:smp64 (CONFIG_NCPUS=1/2/8)
  - rv-virt:nsh64

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-13 22:41:42 +03:00
Diego Herranz
e1e89b925f drivers/leds/ws2812: Revert SPI frequency change
0c3db448bb
added the option to generate the waveforms to drive ws2812 and similar LEDs using different
hardware (e.g. RP2040 PIO instead of SPI).

For that new mode, the concept of CONFIG_WS2812_FREQUENCY is different. Instead of
the SPI frequency (commonly a few MHz), it is the frequency of the actual output waveform
(commonly 400 or 800 kHz).

There was an attempt to express the SPI frequency divided by 10, but it's not actually the
case either (it would be divided by 8).

I think it is clearer to explain in Kconfig what CONFIG_WS2812_FREQUENCY means for each mode
and go back to the previous behaviour for the original SPI mode (also to avoid breaking
out-of-tree boards).
2022-08-13 10:01:28 -07:00
Tiago Medicci Serrano
2234c005d1 Adjusting the APA102 driver to refer the buffer from the begining. 2022-08-13 20:36:45 +08:00
Tiago Medicci Serrano
df0604a4be Added default config for lvgl configs based on both fb and lcddev.
In order to better test the lcdddev driver and framebuffer, newer
board configs (for the TTGO T-Display and for the simulator) were
added.

Adjusted references of the sim:lvgl_(fb/lcd) config.
2022-08-13 20:36:45 +08:00
Tiago Medicci Serrano
ab60d0d3fb Framebuffer's callback buffer starts from the area being drawn.
The commit 664d45dcba updated the
behavior of the framebuffer's putarea callback enabling it to be
used to draw a particular area of the display. Previously, putarea
was only used to draw the entire area of the display. Any different
area was drawn, row by row, by putrun. Also, before checking for
which callback to call, the framebuffer driver adjusted the buffer
reference that was going to be used for calling the driver's callback
to point to the init of the relevant data. After that commit, the
framebuffer's buffer reference passed to the driver's putarea now
contains the data to draw the entire display. Unlike the previous
version of that implementation, only the putrun's callback buffer
was being referenced from the address that contains the data that
actually is being drawn.

This commit fixes it by adjusting the reference for the run buffer
passed to the putrun/putarea callback. It always starts from the
beginning of the relevant data that is actually being drawn. That is
necessary because lcddev (which uses the same LCD display driver
callbacks) actually don't allocate a buffer containing the data to
draw the whole display, so the same putarea implementation of the
LCD drivers would'n be able to work for both lcddev and framebuffer.
Also it's necessary to pass the stride argument to the LCD drivers
in order to enable them to do partial writes by calculating the
buffer offset while sending row-by-row. The stride is equal the
width multiplied by the bytes per pixel (may add some padding)
for framebuffer and is equal to the lenght of the row being drawn
(multiplied by the same BPP) for lcddev.

Why this approach?
Other possible approaches would be:
1) modify lcddev driver to translate received buffer data to a
buffer similar to the framebuffer. That wouldn't be efficient
considering memory allocation.
2) Create a new callback function. While possible, it'd be confusing
to create a different callback to draw the whole screen and another
to draw only an area of the screen. Also, these callbacks would
differ themselves only from the way the buffer is filled.
3) Simply reverting 664d45dcba would
break the usage of the putarea callback to draw an area of the
display, which would also be inefficient.

This approach is based on the Zephyr's implementation of the ST7789
driver: the buffer starts from the beginiing of the region that would
be drawn. The display device driver's putarea implementation should
check if the operation refers to a full screen/full row and implement
(if possible) a single operation to send the data to be drawn more
efficiently.

Finally, this approach requires that the drivers which implement
the putarea callback and expects the entire framebuffer buffer
to be modified. They don't need to calculate where the data begins
as the new buffer represents the data from the address that is
actually being drawn. This includes adjusting the LCD drivers
GC9A01 and ST7789 and the driver for APA102-based LED matrix display.
2022-08-13 20:36:45 +08:00
Xiang Xiao
2b37909c9e libc: Move crc8.h, crc16.h and crc32.h from include to include/nuttx
to avoid the conflict with the 3rd party library

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-13 13:28:24 +03:00
Masayuki Ishikawa
b3795daa53 boards: sabre-6quad: Add netknsh_smp/defconfig
Summary:
- This commit adds netknsh_smp/defconfig

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-13 10:46:36 +08:00
Alan Carvalho de Assis
9ee18d70aa esp32c3-devkit: Fix /etc/passwd too 2022-08-13 03:02:55 +08:00