Commit Graph

20232 Commits

Author SHA1 Message Date
Lucas Saavedra Vaz
1e3af48fff arch/xtensa/esp32s2: Add support for RTC IRQs 2023-02-04 18:28:10 -03:00
wangbowen6
a11cb59af6 tc32/Make.defs: fix build break after merge unblock/block_task
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-04 18:25:58 -03:00
wangbowen6
f925e17f18 tlsr82/backtrace: tc32 backtrace bug fix
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-04 18:25:58 -03:00
chao an
edfae1fe21 sim/hcisocket: correct teardown device index
Parameter of HCIDEVDOWN should be the corresponding device id, not 0

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:54 +08:00
chao an
7625126c91 Remove the remain MIN/MAX like macro
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:41 +08:00
Xiang Xiao
09841300b0 Remove the remain MIN/MAX like macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-03 20:42:57 +08:00
Alan Carvalho de Assis
e710ae5daf esp32c3: reserve CPUINTs 5 and 8 for BLE 2023-02-03 12:24:11 +08:00
Alan Carvalho de Assis
c12a60cb5a esp32c3: Fix WiFi adapter to use WMAC instead of MAC_NMI 2023-02-03 12:24:11 +08:00
Alan Carvalho de Assis
e950e53df2 esp32c3: Always reserve CPU INT 0 and fix cpu init order
Co-author: Tiago Medicci <tiago.medicci@espressif.com>
Co-author: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-03 12:24:11 +08:00
chao an
eca4951021 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 22:16:04 +08:00
Xiang Xiao
df102d1f06 Remove OK macro from the code base
let's use OK from sys/types.h instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 13:58:16 +01:00
ligd
3ae4a6b8c3 sim/uart: do uart_xmitchars() when tty_txint enabled
to speed up the logout speed

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-02-02 18:27:39 +08:00
chao an
03b164f59c tools/makefile: silent all compile output
In order to make compilation warnings and errors easier to be found out,
this commit will disable the printing of the compilation process as much
as possible, and also if you want to restore the log information of the
compilation process, please enable verbose build on command line:

$ make V=0
OR
$ make V=1

| V=0:   Exit silent mode
| V=1,2: Enable echo of commands
| V=2:   Enable bug/verbose options in tools and scripts

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 17:40:19 +08:00
chao an
4c8d244fae sched/getpid: replace syscall getpid/tid/ppid() to kernel version
NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
Nathan Hartman
5651940d02 tiva/serial: Allow changing CTS/RTS with termios
This is a follow-up to PR #6548, which added UART CTS/RTS support for
Tiva (TI TM4C12x) microcontrollers. This follow-up makes it possible,
when termios support is enabled with CONFIG_SERIAL_TERMIOS and CTS/RTS
support is enabled with CONFIG_SERIAL_OFLOWCONTROL and/or
CONFIG_SERIAL_IFLOWCONTROL, to query whether CTS/RTS are on/off at
runtime by utilizing ioctl TCGETS and to turn CTS/RTS on/off at runtime
by utilizing ioctl TCSETS.

* arch/arm/src/tiva/common/tiva_serial.c
  (up_set_format): Because this function is called from ioctl TCSETS to
   modify UART settings, and that IOCTL now respects CCTS_OFLOW and
   CRTS_IFLOW, move setting/clearing of Tiva UART's CTL register's RTSEN
   and CTSEN bits here...
  (up_setup): ...from here.
  (up_ioctl): For TCGETS, populate CCTS_OFLOW and CRTS_IFLOW bits as
   appropriate. For TCSETS, populate priv's oflow and iflow from
   supplied CCTS_OFLOW and CRTS_IFLOW bits.

Thanks to Petro Karashchenko for review and suggested fixes.

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-02-02 09:44:07 +08:00
Nathan Hartman
f2e15b431c Support termios for Tiva
The lower-half serial driver for Tiva (TI TM4C12x) microcontrollers supports
termios, but Kconfig never enabled this support because we were missing the
ARCH_HAVE_SERIAL_TERMIOS configs. This is now enabled, allowing termios support
to be enabled with CONFIG_SERIAL_TERMIOS.

* arch/arm/src/tiva/Kconfig
  (config TIVA_UART0 thru TIVA_UART7): Select ARCH_HAVE_SERIAL_TERMIOS.
2023-02-02 09:43:09 +08:00
Nathan Hartman
78154f12ff Serial: Fix wrong identifier name in comments 2023-02-02 09:42:34 +08:00
Gustavo Henrique Nihei
e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Stuart Ianna
05c6d7c7b9 litex: Add PWM driver.
PWM driver for multiple peripherals supplied in gateware.

Only single channel frequency and duty cycle control is implemented. Pulse counting and multichannel features are not currently feasible.

Additions also include a new board configuration for arty-a7 which enables the PWM driver and example application.
2023-02-01 09:34:57 -03:00
zhuyanlin
96a70b908f arch:xtena: modify timer interrupt level large to XCHAL_IRQ_LEVEL level.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-02-01 14:04:44 +08:00
Huang Qi
8b27d60bcd tools: Make zig available for arm/riscv/sim
Add essential compile flags to make zig available out of box.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-01 11:12:44 +08:00
qiaohaijiao1
38039df16a sim/sim_alsa.c: support streaming data when offload playback.
Audio offload playback, change data organization from fragmented to
streaming.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-01 11:03:36 +08:00
Stuart Ianna
26ac5335e5 litex: Add GPIO driver.
GPIO driver with optional ISR support. Allows for multiple GPIO peripherals to be specified at an arbitrary addresses.
2023-02-01 11:02:03 +08:00
Nathan Hartman
fdb149ddb0 Kconfig: Improve help text related to *_SERIALBRK_BSDCOMPAT
* arch/arm/src/gd32f4/Kconfig
  (GD32F4_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32/Kconfig
  (STM32_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32f7/Kconfig
  (STM32F7_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32h7/Kconfig
  (STM32H7_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32l4/Kconfig
  (STM32L4_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32l5/Kconfig
  (STM32L5_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32u5/Kconfig
  (STM32U5_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32wb/Kconfig
  (STM32WB_SERIALBRK_BSDCOMPAT): Improve help text.
2023-02-01 10:58:34 +08:00
Lucas Saavedra Vaz
f07885541c arch/xtensa/esp32: Propagate RTC IRQ status register to lower levels 2023-02-01 00:45:52 +08:00
Xiang Xiao
9f027208d4 fs: Add model field to geometry and mtd_geometry_s
the model is very useful to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:50:28 -03:00
Jukka Laitinen
4f957f8031 arch/arm/src/lc823450/lc823450_i2c.c: Remove extra rounding after MSEC2TIC change to round up
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-31 22:42:29 +08:00
Jukka Laitinen
05eb8541d1 Revert "arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value"
This reverts commit fe6f6870dcc431cecf0fa94187cff05ec040cf47.
2023-01-31 22:42:29 +08:00
Xiang Xiao
55679aec5f drivers/camera: Support the private data for imgsensor and imgdata
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 08:04:39 +01:00
David Vosahlik
372fee9412 Added SocketCAN driver implementation to the tiva chip, modified the EK-TC1294XL launchpad board to use the new SocketCAN API 2023-01-31 14:07:23 +08:00
yinshengkai
3f97a87162 tools: add separate flags parameter for COMPILE/COMPILEXX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-31 13:42:33 +08:00
Huang Qi
570c7587c7 risc-v/Toolchain.defs: Correct indent 2023-01-31 11:19:47 +08:00
Zhe Weng
d3dd349649 net: Implement shutdown() for usrsock
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 11:15:01 +08:00
lilei19
1d8af7e105 add holder for mutex
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-31 12:08:05 +09:00
Nathan Hartman
6b89b6f945 Remove executable permissions from source files
* arch/arm/src/sama5/sam_flexcom_spi.h,
  arch/risc-v/src/mpfs/mpfs_ihc_sbi.c,
  drivers/usbdev/adb.c,
  libs/libc/math/lib_scalbn.c,
  libs/libc/math/lib_scalbnf.c,
  net/ipfrag/Make.defs,
  net/ipfrag/ipfrag.c,
  net/ipfrag/ipfrag.h,
  net/ipfrag/ipv4_frag.c,
  net/ipfrag/ipv6_frag.c: Remove executable permission.
2023-01-30 20:34:51 -03:00
Nathan Hartman
f63754c4c0 arch/tiva: Remove dead store
* arch/arm/src/tiva/common/tiva_can.c:
  (tiva_can_initialize): Remove the local variable 'canmod', which was
   assigned but never used.
2023-01-31 01:36:09 +08:00
chao an
0f35ad29a8 arm/unwinder: set default unwinder type to arm exidx/extab
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-31 00:38:42 +08:00
Jiuzhu Dong
17f410e647 arch/sim: add toolchain library libm
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2023-01-30 20:32:14 +08:00
rajvinder kaur
2b30f17607 stm32h7: socket CAN error handling. 2023-01-30 11:22:49 +08:00
pengyiqiang
0443889124 sim_framebuffer: fix fb_pollnotify not called
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-29 17:34:36 -03:00
ligd
9e39600c83 arch: fix sim_x11events calls but sim_x11initialize() hasn't ready
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-29 17:34:36 -03:00
chao an
82520c0006 arm/itm_syslog: remove invaild select config
1. CONFIG_SYSLOG has been removed by Nutt on below commit:

| commit c5ac473bc0
| Author: Gregory Nutt <gnutt@nuttx.org>
| Date:   Tue Jun 21 07:58:42 2016 -0600
|
|     SYSLOG: Remove an obsolete, unused configuration item from Kconfig file

2. Fix comile warning

| armv7-m/arm_itm_syslog.c: In function 'itm_syslog_initialize':
| armv7-m/arm_itm_syslog.c:183:18: warning: passing argument 1 of 'syslog_channel' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   183 |   syslog_channel(&g_itm_channel);
|       |                  ^~~~~~~~~~~~~~
| In file included from armv7-m/arm_itm_syslog.c:29:
| nuttx/syslog/syslog.h:155:49: note: expected 'struct syslog_channel_s *' but argument is of type 'const struct syslog_channel_s *'
|   155 | int syslog_channel(FAR struct syslog_channel_s *channel);
|       |

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 19:54:55 +08:00
zhangyuan21
e6d2f0623a backtrace: use CURRENT_REGS when in interrupt context
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-29 02:48:00 -08:00
qinwei1
b989e4f3a6 arch:arm64: add support for nuttx arm64 Toolchain Selection
Summary:
1. to enable Toolchain select Kconfig option, making something depend on
   the opton to be configured with menuconfig

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-01-29 14:37:16 +08:00
zhanghongyu
4ea43f2df2 sim: init events field when send ack/dack
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 14:34:09 +08:00
chao an
cc7dc89c64 arch/sim: fix undefined reference to `usrsock_event_callback'
/usr/bin/ld: sim_hostusrsock.o: in function `host_usrsock_loop':
arch/sim/src/sim/posix/sim_hostusrsock.c:514: undefined reference to `usrsock_event_callback'

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 14:33:37 +08:00
Xiang Xiao
7d66a16c53 Minor style clean up
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 19:53:20 +02:00
Jukka Laitinen
7d54d04613 arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value
When sending small number of bytes with larger CONFIG_USEC_PER_TICK
this function should return at least 1. Solve this by rounding
up the result.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-28 12:11:33 -03:00
Xiang Xiao
964a41283c arm/tlsr82: Fix warning: "IC_TAG_CACHE_ADDR_EQU_EN" is not defined
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 11:30:33 -03:00
Xiang Xiao
ac3a667860 Fix chip/intel64_handlers.c:136: error: "SIGFPE" redefined [-Werror]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-27 13:21:49 -03:00