Commit Graph

46033 Commits

Author SHA1 Message Date
David Sidrane
5e902861d9 imxrt:usdhc fix error when CONFIG_ARMV7M_DCACHE is off 2022-08-05 09:43:36 +08:00
David Sidrane
b9c6284750 imxrt:lowputc add extern "C" 2022-08-05 09:43:36 +08:00
Peter van der Perk
f64677b8c9 Add Embedded Template Library (ETL) support 2022-08-05 09:38:48 +08:00
Nathan Hartman
20bdd44e7b Remove executable permission from source and build files. 2022-08-04 12:48:18 -03:00
larry
ab33519b1b bluetooth: fix net lock imbalance in drop casse
Signed-off-by: larry <larry@transtekcorp.com>
2022-08-04 23:23:01 +08:00
Peter van der Perk
fa9d352566 SPIFFS select FS_LARGEFILE since it's required 2022-08-04 22:31:57 +08:00
Peter van der Perk
93f05c7e74 NFS select FS_LARGEFILE since it's required 2022-08-04 22:31:57 +08:00
Peter van der Perk
e0080766b3 FS Disable FS_LARGEFILE by default 2022-08-04 22:31:57 +08:00
liyi
0083a2e4f2 optimize UNUSED macro
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-04 16:34:45 +08:00
Xiang Xiao
8582a12388 drivers: Reorganize the power related code layout
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-04 10:28:28 +03:00
Masayuki Ishikawa
8e7752c7da arch: common: Fix up_check_tcbstack() for CONFIG_ARCH_ADDRENV=y
Summary:
- I noticed that ps shows incorrect stack usage when running
  getprime in the background.
- With CONFIG_ARCH_ADDRENV=y, a user task including pthread
  allocates its stack in the user space that needs to be
  accessed with a correct address environment.
- This commit fixes this issue.

Impact:
- CONFIG_ARCH_ADDRENV=y only

Testing:
- Tested with sabre-6quad:knsh on qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-04 11:13:16 +08:00
Eero Nurkkala
e0291b1ce8 risc-v/mpfs: usb: configure fifos properly
RX_FIFO_ADDRs and TX_FIFO_ADDR were misconfigured. These addresses
overlapped causing data corruption during high USB loads. For
example, data corruption was present during the following conditions:

  1. Composite USB driver was used (CDC/ACM + Mass storage)
  2. /dev/ttyACM0 was accessed instantly from Linux side when
     starting up.
  3. Training data was sent to /dev/ttyACM0 from NuttX from the
     very beginning periodically.

It was observed that while Mass storage was negotiating, sometimes
data sent from NuttX to Linux via CDC/ACM was corrupt, although it
was sent properly on the TX fifo.

Also, don't access TXCSRL_REG_EPN_TX_FIFO_NE_MASK for EP0 as it's
not applicable.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-08-03 23:44:12 +08:00
liyi25
1141ee28e9 delay creating DNS bind socket
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-03 23:43:48 +08:00
raiden00pl
9770555102 nucleo-g070rb/nsh: refresh config 2022-08-03 23:43:19 +08:00
raiden00pl
981ad9fc1e arch/stm32xx/Kconfig: simplify PWM options and unify them among stm32 chips 2022-08-03 23:43:19 +08:00
raiden00pl
935f110438 arch/stm32f7/stm32_tim.c: include the missing RCC header 2022-08-03 23:42:52 +08:00
raiden00pl
47dbad0a8b arch/stm32/stm32_foc.c: fix some ADC and PWM ifdefs 2022-08-03 23:42:37 +08:00
Jiuzhu Dong
742ca6e319 drivers/rc: fix compile warning
In file included from /home/archer/code/nuttx/n4/incubator-nuttx/drivers/rc/lirc_dev.c:29:
drivers/rc/lirc_dev.c: In function 'lirc_raw_event':
drivers/rc/lirc_dev.c:959:14: warning: format '%u' expects argument of type 'unsigned int',
                              but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
  959 |       rcinfo("delivering %uus %d to lirc\n", ev.duration, ev.pulse ? 1 : 0);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
      |                                                |
      |                                                uint32_t {aka long unsigned int}
drivers/rc/lirc_dev.c:959:27: note: format string is defined here
  959 |       rcinfo("delivering %uus %d to lirc\n", ev.duration, ev.pulse ? 1 : 0);
      |                          ~^
      |                           |
      |                           unsigned int
      |                          %lu

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-03 23:42:22 +08:00
Peter van der Perk
a6da6dcec6 LPC17_40 CAN driver SocketCAN support 2022-08-03 17:58:57 +08:00
chao.an
d501e01eef arm/backtrace: use sp unwind if FRAME_POINTER is enabled on thumb mode
GCC toolchain Bug 92172 - ARM Thumb2 frame pointers inconsistent with clang

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92172

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-03 17:58:36 +08:00
Peter Bee
f20cd0295f arch: fix typo
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-08-03 17:37:08 +08:00
SPRESENSE
2b4c7290c4 boards: spresense: Reduce power consumption with LTE board
The SPI2_CS_X and SPI2_SCK pins are used for connection to the LTE modem.
These pins are the special pins for the host interface that are set
automatically by latching the SYSTEM0/1 pins. So, it causes a problem
with increased current consumption when the modem is in power off state.
To prevent it, set these pins to GPIO HiZ during board initialization.
2022-08-03 08:31:48 +02:00
Jari van Ewijk
195412fa46 S32K1 & S32K3: add basic documentation for MCU family and boards 2022-08-02 14:53:09 -04:00
ligd
8c1fd1df81 rptun: update rptun to openamp 2022.04.0
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
ligd
c2c1358fc7 rptun: handle uint16_t overflow
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
ligd
e368ce6c07 rptun: add buffer check in RX IRQ
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
ligd
cf22dd8688 rptun: divide notify msg
For notify callback has two conditions:
1. new data coming
2. return buffer coming

divide these two msgs

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
ligd
886e10ba3c rptun: unify name
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
Xiang Xiao
a9171c77ac drivers/rptun: Add const to image_store_ops and remoteproc_ops
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
ligd
546889d524 openamp: update openmap lib version to 2022.04.0
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-08-03 01:22:53 +08:00
Xiang Xiao
306431d16f list: Remove the unnecessary ? : operator
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-02 18:50:46 +03:00
Xiang Xiao
992747cef3 drivers/battery: Handle the early changed event correctly
since it may happen before battery_xxx_register sometime

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-02 18:50:46 +03:00
Peter van der Perk
013a562478 Net thread-safe ntoa functions
Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-02 21:04:19 +08:00
Takayoshi Koizumi
17d7f5006f drivers/wireless/gs2200m: Fix short bit length
Despite being a mask variable for a 32-bit value,
it was 16 bits long.
2022-08-02 19:13:38 +09:00
Peter van der Perk
0e9c32ff29 Change libcanard to libcanardv0 2022-08-02 17:01:23 +08:00
Takayoshi Koizumi
697bbffdc1 drivers/wireless/gs2200m: Add power-save and sync-loss interval
Add power save control and sync loss interval on GS2200M.
2022-08-02 15:13:00 +09:00
Takayoshi Koizumi
883c6fc2ef drivers/wireless/gs2200m: Notify disssociation event
After recover disassociation, usrsock daemon must destroy all sockets.
Add notification to prompt the daemon to do so.
2022-08-02 15:13:00 +09:00
haopengxiang
9bb5148d10 procfs: add heapcheck flag
1 for open heapcheck, 0 for close
echo 1 > /proc/xxx/heapcheck
echo 0 > /proc/xxx/heapcheck

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2022-08-02 10:46:44 +08:00
haopengxiang
4bb393a24e nuttx: change TCB_FLAG_MEM_CHECK to TCB_FLAG_HEAPCHECK
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2022-08-02 10:46:44 +08:00
Daniel P. Carvalho
dbb82c3191 NUCLEO-L432KC: Added sinusoidal DAC wave generator example 2022-08-02 10:43:59 +08:00
Daniel P. Carvalho
40e6c8dca4 STM32L4 DAC: Added basic support for low level operations 2022-08-02 10:43:59 +08:00
Xiang Xiao
7e6b4f6e07 board/sim: Enable rpmsg sensor in rpproxy and rpserver config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-01 20:23:11 -03:00
Xiang Xiao
bb16886568 Fix error: too few arguments to function 'rpmsg_register_callback'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-01 20:23:11 -03:00
Xiang Xiao
605ea33238 sensor: Add CODE and FAR for sensor_[lock|unlock] callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-01 20:23:11 -03:00
Xiang Xiao
9ffd09b1fb sensor/rpmsg: Swap "struct file *" and "struct sensor_lowerhalf_s *"
follow the change of sensor_ops_s

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-01 20:23:11 -03:00
Jari van Ewijk
b9ea02bad8 RDDRONE-BMS772: clarify description of some board-specific Kconfig options 2022-08-01 14:59:10 -03:00
Jari van Ewijk
249f041235 NXP S32K1XX: add initial support for NXP RDDRONE-BMS772 board 2022-08-01 14:59:10 -03:00
chao.an
27c888854d mm_heap/kasan: poison free node after return back the heap list
The free node is still in use after kasan_poison(), the node member
access will cause the assert report by kasan.

|  (gdb) bt
|  #0  kasan_report (addr=1743265406637584896, size=140737337053680, is_write=46) at kasan/kasan.c:97
|  #1  0x0000555555607bdd in __asan_loadN_noabort (addr=140737272831420, size=4) at kasan/kasan.c:289
|  #2  0x0000555555607cd7 in __asan_load4_noabort (addr=140737272831420) at kasan/kasan.c:323
|  #3  0x00005555556061ef in gmtime_r (timep=0x7ffff3275dbc, result=0x7ffff3275e10) at time/lib_gmtimer.c:301
|  #4  0x000055555560e507 in sim_rtc_rdtime (lower=0x55555576b780 <g_sim_rtc>, rtctime=0x7ffff3275e10) at sim/up_rtc.c:77
|  #5  0x00005555555fcbdb in up_rtc_gettime (tp=0x7ffff3275ef0) at timers/arch_rtc.c:128
|  #6  0x00005555555f08b4 in clock_systime_timespec (ts=0x7ffff3275ef0) at clock/clock_systime_timespec.c:72
|  #7  0x00005555555ecc77 in note_common (tcb=0x7ffff31d2180, note=0x7ffff3275f80, length=21 '\025', type=18 '\022') at sched/sched_note.c:144
|  #8  0x00005555555ed706 in sched_note_syscall_enter (nr=1, argc=0) at sched/sched_note.c:765
|  #9  0x000055555560eb37 in __wrap_getpid () at wraps/WRAP_getpid.c:26
|  #10 0x0000555555608d1c in mm_takesemaphore (heap=0x7ffff30ae000) at mm_heap/mm_sem.c:127
|  #11 0x0000555555609477 in mm_free (heap=0x7ffff30ae000, mem=0x7ffff3265b80) at mm_heap/mm_free.c:89
|  #12 0x00005555556070c5 in free (mem=0x7ffff3265b80) at umm_heap/umm_free.c:49
|  #13 0x000055555560c3b0 in up_release_stack (dtcb=0x7ffff31e4b00, ttype=0 '\000') at sim/up_releasestack.c:67
|  #14 0x00005555555f2515 in nxsched_release_tcb (tcb=0x7ffff31e4b00, ttype=0 '\000') at sched/sched_releasetcb.c:134
|  #15 0x00005555556bdf0c in nxtask_terminate (pid=4, nonblocking=true) at task/task_terminate.c:184
|  #16 0x00005555556bdb0f in nxtask_exit () at task/task_exit.c:168
|  #17 0x000055555566e05f in up_exit (status=0) at sim/up_exit.c:64
|  #18 0x000055555564f454 in _exit (status=0) at task/exit.c:78
|  #19 0x000055555560ea89 in __wrap__exit (parm1=0) at wraps/WRAP__exit.c:27
|  #20 0x00005555555eb288 in exit (status=0) at stdlib/lib_exit.c:54
|  #21 0x00005555555fe2cc in nxtask_startup (entrypt=0x555555670c34 <critmon_start_main>, argc=1, argv=0x7ffff3265bb0) at sched/task_startup.c:70
|  #22 0x00005555555f02a0 in nxtask_start () at task/task_start.c:134
|  #23 0x0000000000000000 in ?? ()

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-02 01:45:08 +08:00
chao.an
5db0ab1e6a mm_heap/backtrace: move MM_ADD_BACKTRACE out of heap lock
move MM_ADD_BACKTRACE out of heap lock to improve the performance

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-02 01:44:48 +08:00
chao.an
87cb224b1c mm/kasan: node header should updated from unpoisoning memory
| (gdb) bt
| #0  up_assert (filename=0x7fffffffdc6c "\001", lineno=0) at sim/up_assert.c:75
| #1  0x00005555555e636b in _assert (filename=0x555555627225 "kasan/kasan.c", linenum=104) at assert/lib_assert.c:36
| #2  0x00005555555a388e in kasan_report (addr=140737284458088, size=1, is_write=true) at kasan/kasan.c:104
| #3  0x00005555555a40a1 in __asan_storeN_noabort (addr=140737284458088, size=1) at kasan/kasan.c:297
| #4  0x00005555555a4519 in __asan_store1_noabort (addr=140737284458088) at kasan/kasan.c:348
| #5  0x00005555555a26d7 in memset (s=0x7ffff3d8c668, c=0, n=63) at string/lib_memset.c:169
| #6  0x00005555555a46a4 in mm_addregion (heap=0x7ffff3d8c000, heapstart=0x7ffff3d8c648, heapsize=66058656) at mm_heap/mm_initialize.c:131
| #7  0x00005555555a4a00 in mm_initialize (name=0x555555627068 "Umem", heapstart=0x7ffff3d8c648, heapsize=67107256) at mm_heap/mm_initialize.c:231
| #8  0x00005555555a33b1 in umm_initialize (heap_start=0x7ffff3d8c000, heap_size=67108864) at umm_heap/umm_initialize.c:84
| #9  0x000055555558f17c in nx_start () at init/nx_start.c:469
| #10 0x0000555555589559 in main (argc=1, argv=0x7fffffffdf58, envp=0x7fffffffdf68) at sim/up_head.c:131
| (gdb)

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-08-02 01:44:48 +08:00