Commit Graph

43043 Commits

Author SHA1 Message Date
Jukka Laitinen
7e9e8a817d libs/libc/wqueue/work_usrthread.c: Correct time calculation in work_process
This fixes busylooping in work_usrthread, due to incorrect time spec given to sem_timedwait

_SEM_TIMEDWAIT works on absolute time stamps, using CLOCK_REALTIME

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-04 13:19:01 -05:00
Jukka Laitinen
c79d2067c7 Move timespec calculations from sched into libc/sched
Allow using these functions also outside sched, where systick
related calculations are performed

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-04 13:19:01 -05:00
raiden00pl
2d125d33d3 boards/nucleo-f302r8: disable NSH commands for FOC configs to save FLASH 2021-11-04 13:05:31 -05:00
Alan C. Assis
b248dd0d3a Documentation: Fix openocd command instruction
A user reported me an issue while following our documentation
then looking his command line error I noticed the openocd stlink
interface was wrong: st-link-v2.cfg -> stlink-v2.cfg
2021-11-04 15:09:34 +01:00
ChenWen
440787c0c1 risc-v/esp32c3: Fix Wi-Fi & BLE coexist issue
1. Wi-Fi and BLE use common PHY functions.
  2. Fix Wi-Fi & BLE coexist adapter error.
  3. Update esp-wireless-drivers-3rdparty, provide coexist protection for connection.
2021-11-04 11:02:05 -03:00
ChenWen
65d7f4bfb3 riscv/esp32c3: Support more country codes 2021-11-04 11:02:05 -03:00
ChenWen
4fc2f6e28c riscv/esp32c3: Support debug log configuration for Wi-Fi library 2021-11-04 11:02:05 -03:00
ChenWen
02968cc124 risc-v/esp32c3: Improve Wi-Fi connection success rate 2021-11-04 11:02:05 -03:00
ChenWen
222ec556d5 riscv/esp32c3: Fix some Wi-Fi issues
1. Fix the issue that Wi-Fi can't connect to some special routers occasionally.
  2. Support Wi-Fi 12/13 channel active scanning by default.
  3. Update Wi-Fi driver code to fix issue of failure to send pkt.
  4. Replace software random with hardware random
  5. Fix Wi-Fi mode start error
2021-11-04 11:02:05 -03:00
chenwen
33031a2813 riscv/esp32c3: Fix the issue of Wi-Fi automatic disconnection 2021-11-04 11:02:05 -03:00
chenwen
afbad5ca9d riscv/esp32c3: Clear station configuration when connection fails or disconnect 2021-11-04 11:02:05 -03:00
Eero Nurkkala
8e43f39141 mpfs: cache: provide L1/L2 cache enablers
E51 may configure the L1 and L2 caches. Once configured,
no reconfiguration is possible after hardware reset is
issued.

L2 is 16-way set associative with write-back policy. The
size 2 MB, from which 1 MB is utilized with the values
provided here. That's a total of 8 ways. The rest of the
L2 is left out for the bootloader usage.

mpfs_enable_cache() first checks the bootloader usage
doesn't overlap with the cache itself, thus providing a
set of functional values.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-11-04 11:00:55 -03:00
Alexander Lunev
60de445ab3 stm32h7 sdmmc: do not enable power saving configuration bit (in SD 4-bit mode) because
the SDIO clock is not enabled when the bus goes to the idle state, that, in turn, breaks
IRQ delivering mechanism over DAT[1]/IRQ SDIO line to the host.
2021-11-03 22:50:14 -05:00
Alexander Lunev
02e2b33c1c bcm43xxx: corrected SDIO_CCCR_HIGHSPEED_SHS bit handling 2021-11-03 01:12:53 -05:00
Xiang Xiao
c52a099197 sim: Add more config to asan/kasan for testing
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 21:02:43 +01:00
Xiang Xiao
3e967f784e sim: Split SIM_SANITIZE to SIM_ASAN and SIM_UBSAN
align the naming style with MM_ASAN

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 21:02:43 +01:00
mage1
c82a676630 sim: fix sim runtime err under sanitize check mode.
since gcc sanitize can not stub proper code in nuttx kernel code.
2021-11-02 21:02:43 +01:00
Cocoacrumbs
2d4906ab9b Small clarification in the making-changes.rst documentation. 2021-11-02 20:22:18 +01:00
raiden00pl
1c28126670 boards/b-g431b-esc1: add Hall and Qenco support 2021-11-02 11:54:08 -05:00
Xiang Xiao
df877a8a91 boards/sim: Add new config for KASan
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 13:32:47 -03:00
chenwei23
39cdd99d77 mm: Support the kernel address sanitizer
Signed-off-by: chenwei23 <chenwei23@xiaomi.com>
2021-11-02 13:32:47 -03:00
Xiang Xiao
5cb6b042aa mm/heap: Simplify the condition check in mm_realloc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 13:32:47 -03:00
Jani Paalijarvi
a16a9f80e2 mpfs: i2c: Add support for adaptive I2C bus frequency
Select the closest possible frequency which is smaller
than or equal to requested in I2C msg
2021-11-02 04:10:08 -05:00
Xiang Xiao
aa9c17e93d libc: Move lib_filesem.c and lib_stream.c to libc/stdio
since it make more sense to put all FILE functions in one place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 09:00:11 +01:00
Xiang Xiao
ad2f82898a libc/misc: Add lib_ prefix to stream_semtake and tream_semgive
and merge lib_streamsem.c to lib_stream.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-02 09:00:11 +01:00
ligd
391ccdc42b local_socket: recv should return 0 NOT -ECONNRESET if remote closed
ref:
https://man7.org/linux/man-pages/man2/recv.2.html

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-02 08:59:06 +01:00
ligd
1970ce5116 local_socket: set lc_peer when accept() instead of connect()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-02 08:59:06 +01:00
ligd
dbaf8a92b4 pipe: pipe close should notify block writting, and write will return -EPIPE
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 23:21:30 -05:00
ligd
2f4662c513 arch/arm: Remove -mcpu for fix warning
warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8-m.main' switch

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 21:28:10 -05:00
ligd
8417b4726b Revert "arch/armv8-m: use -mfpu=auto based on -mcpu=cortex-m55"
This reverts commit d9a5b92c1a306a70df52d50a02a80dc8ef20bf0d.

Revert "arch/arm: Remove -march and -mtune"

This reverts commit b8e99cf12f3a287311a2d341f285c71a5da3e4d4.
2021-11-01 21:28:10 -05:00
ligd
3615592e82 mm: fix realloc overwrite memcpy when use a new block
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 21:27:52 -05:00
Xiang Xiao
b1879d5d24 sched/vfork: allocate tls_info_s instead task_info_s from stack
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-01 20:53:07 -03:00
ligd
131e8dc7e7 socket.h: set SOMAXCONN default value to 8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 13:52:10 -05:00
Abdelatif Guettouche
860370284e esp32c3_dma: Remove the DMA test included in the driver along with its
defconfig.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-01 13:49:59 -05:00
Alexander Vasiljev
aeb1d3098d stm32h7/dmamux: correct bit fields 2021-11-01 14:40:33 -03:00
Abdelatif Guettouche
73f15ed544 esp32/Kconfig: Make ESP32_BT_RESERVE_DRAM default to 0 again if
Bluetooth is not enabled.  When Bluetooth is enbaled then it defaults to
64KB.  This will not wast those 64KB of memory when Bluetooth is not enabled.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-01 10:01:38 -05:00
Xiang Xiao
aec01e96fa libc: Remove the empty lib_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-01 11:03:02 -03:00
ligd
9cb994e6dc rptun: add ns_unbind_notify support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 06:57:33 -05:00
ligd
8c3996c001 openamp: add ns_unbind_notify support
This is for notify rdev unbind event

Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 06:57:33 -05:00
ligd
ff0cd0baac Revert "drivers/syslog: Call up_puts in syslog_default_write instad up_putc"
This reverts commit 174b240325.

Revert "drivers/syslog: Ensure the buffer zero terminate"

This reverts commit 1692aa7894.
2021-11-01 06:54:05 -05:00
Jiuzhu Dong
ee29175811 libc/machine: add config LIBC_ARCH_MEMCHR
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-11-01 12:44:02 +01:00
Jiuzhu Dong
e5f8acab97 ftruncate: sanity check for parameter:length
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-11-01 11:08:03 +01:00
Alexander Lunev
33d236121f stm32h7 sdmmc: added missing sdio_set_sdio_card_isr() function to initialize SDIO in-band interrupt logic 2021-10-31 22:26:13 -05:00
Xiang Xiao
b58379b738 arch/arm: Add l suffix for INT32_C macro
since int32_t typedef to signed long

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 12:56:41 -03:00
raiden00pl
99b7ae5207 boards/stm32: Normalize FOC related project 2021-10-31 08:22:49 -05:00
Xiang Xiao
a7a7ba50ac boards/stm32: Normalize FOC related project
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 12:54:19 +01:00
Xiang Xiao
5f7cc04627 fs/aio: Fix compile warning
aio/lio_listio.c:227:7: warning: implicit declaration of function ‘ferr’ [-Wimplicit-function-declaration]
  227 |       ferr("ERROR: lib_zalloc failed\n");
      |       ^~~~
aio/lio_listio.c:275:3: warning: implicit declaration of function ‘finfo’ [-Wimplicit-function-declaration]
  275 |   finfo("Registering signal handler\n");

aio/aio_read.c: In function ‘aio_read_worker’:
aio/aio_read.c:90:11: warning: implicit declaration of function ‘file_pread’; did you mean ‘aio_read’? [-Wimplicit-function-declaration]
   90 |   nread = file_pread(aioc->aioc_filep, (FAR void *)aiocbp->aio_buf,
      |           ^~~~~~~~~~
      |           aio_read

aio/aio_write.c: In function ‘aio_write_worker’:
aio/aio_write.c:85:12: warning: implicit declaration of function ‘file_fcntl’ [-Wimplicit-function-declaration]
   85 |   oflags = file_fcntl(aioc->aioc_filep, F_GETFL);
      |            ^~~~~~~~~~
CC:  mmap/fs_mmap.c
CC:  pthread/pthread_condclockwait.c
aio/aio_write.c:107:18: warning: implicit declaration of function ‘file_write’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
  107 |       nwritten = file_write(aioc->aioc_filep,
      |                  ^~~~~~~~~~
      |                  aio_write
aio/aio_write.c:113:18: warning: implicit declaration of function ‘file_pwrite’; did you mean ‘aio_write’? [-Wimplicit-function-declaration]
  113 |       nwritten = file_pwrite(aioc->aioc_filep,
      |                  ^~~~~~~~~~~
      |                  aio_write
In file included from aio/aio_write.c:34:
aio/aio_write.c:121:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
  121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~
      |                                                     |
      |                                                     ssize_t {aka long int}
aio/aio_write.c:121:47: note: format string is defined here
  121 |       ferr("ERROR: write/pwrite/send failed: %d\n", nwritten);
      |                                              ~^
      |                                               |
      |                                               int
      |                                              %ld

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 06:30:57 -03:00
Xiang Xiao
86fc19ff3f Fix error: 'struct tcb_s' has no member named 'low_priority'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 06:30:57 -03:00
raiden00pl
6aeeb8a7c5 boards/sim/foc: fix configuration 2021-10-30 13:50:40 -05:00
raiden00pl
d862cbd7c8 boards: rename CONFIG_EXAMPLES_FOC_VEL_ADC to CONFIG_EXAMPLES_FOC_SETPOINT_ADC for all example/foc configurations 2021-10-30 13:50:40 -05:00