Commit Graph

50533 Commits

Author SHA1 Message Date
Shoukui Zhang 6364fc6e69 esp32c3-devkit: Remove unnecessary configurations
TESTING_MTD_CONFIG_FAIL_SAFE auto select MTD_CONFIG_NAMED

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2023-08-16 22:06:41 +08:00
Shoukui Zhang 2acf445954 Revert "sim: Remove unnecessary configurations"
This reverts commit 52c0e6b576.
2023-08-16 22:06:41 +08:00
Stuart Ianna 34bfa2f7ba arch/risc-v/litex: Add platform specific tickless implementation.
Adds a platform specific implementation for tickless schedular operation. This includes:
 - Tickless operation for vexriscv cores.
 - Tickless operation for vexriscv-smp cores.
 - Ticked operation for vexriscv-smp cores.

Ticked operation for vexriscv core has been refactored.

Additional default configuration added to demonstrate operation.

Both tickless and ticked options use Litex timer0 for scheduling intervals. This is significantly faster than interfaceing with the risc-v mtimer through opensbi.
2023-08-16 16:59:27 +08:00
Ryan MacDonald 074cf51268 Fix: s32k1 s32k3 kinetis: add propseg to ctrl1 timing mask 2023-08-16 10:09:40 +03:00
Tiago Medicci Serrano 5adb9de00b espressif: Update esp-hal-3rdparty version
The newest version of the esp-hal-3rdparty includes general
bugfixes and includes components necessary to build the IDFboot.
2023-08-15 13:39:22 -03:00
wangyingdong 8f6f601ec1 net/local:Add peek support for pipe and MSG_PEEK support for local socket
fifo peek example:
struct pipe_peek_s peek_buf;
peek_buf.len = len;
peek_buf.data = buf;
ret = file_ioctl(filep, PIPEIOC_PEEK,(unsigned long)((uintptr_t)&peek_buf));

Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-08-15 23:58:45 +08:00
wangming9 8cee6f0cc8 boards/arm/qemu: Add qemu board for ARM
See boards/arm/qemu/qemu-armv7a/README.txt for details

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2023-08-15 23:56:41 +08:00
wangming9 e953715e6d arch/arm: add qemu support for ARM32
Signed-off-by: wangming9 <wangming9@xiaomi.com>
2023-08-15 23:56:41 +08:00
yinshengkai 88f3bc77f1 toolchain: detect use of large stack variables
partition/fs_gpt.c:384:5: warning: stack usage might be 288 bytes [-Wstack-usage=]
  384 | int parse_gpt_partition(FAR struct partition_state_s *state,

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-15 14:50:27 +03:00
Zhe Weng d3bca3c2cf net: Add FIOC_FILEPATH ioctl support for ICMP(v6)/RPMsg/Usrsock sockets
Example of /proc/PID/group/fd in this case:

FD  OFLAGS  TYPE POS       PATH
3   3       9    0         icmp:[dev eth0, id 1, flg 1]
4   3       9    0         icmp6:[dev eth0, id 2, flg 1]
5   3       9    0         rpmsg:[ap:[test:0]<->remote] # server side
5   3       9    0         rpmsg:[remote<->ap:[test:0]] # client side

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-15 15:00:59 +08:00
Zhe Weng 8e8d86a7bb net/ioctl: Add default print for sockets without FIOC_FILEPATH support
Example of /proc/PID/group/fd in this case:

FD  OFLAGS  TYPE POS       PATH
17  67      9    0         socket:[domain 16, type 2, proto 0]

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-15 15:00:59 +08:00
Peter Bee 58f9cf7c04 boards: update README for virtio gpu driver
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-08-15 13:32:05 +08:00
Tiago Medicci Serrano 281ab83309 esp32s3: Use `PANIC()` instead of `assert(0)`
Considering kernel code, it's reasonable to use `PANIC()` instead
of `assert(0)` to handle with situations that require abort. Unlike
`assert`, `PANIC()` doesn't dependent on `NDEBUG`.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 6f235c5f0a esp32-devkitc: Enable softAP on `blewifi` defconfig to ease testing
In order to properly test the W-Fi/BT coexistence mode, set the
Wi-Fi mode to station + softAP.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 01b6c87b15 esp32s3: Implement the Wi-Fi/BLE coexistence
ESP32-S3 has only one 2.4 GHz ISM band RF module, which is shared
by Bluetooth and Wi-Fi, so Bluetooth can’t receive or transmit data
while Wi-Fi is receiving or transmitting data and vice versa.
Under such circumstances, ESP32-S3 uses the time-division
multiplexing method to receive and transmit packets.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 7d605551cd esp32s3/wifi: Enable peripheral interrupt to the same CPU interrupt
The low-level Wi-Fi driver registers two peripheral interrupts to
the same CPU interrupt. Although the registered ISR is the same for
both peripherals interrupt, it's needed to call `up_enable_irq` to
ensure that the interrupt matrix is being set accordingly.

Please note that the current implementation of the  ESP32-S3's IRQ
driver - although allow us to set a callback for each IRQ, which
represents the peripherals interrupt - doesn't allow us to call
both callbacks when these IRQs refers to a same CPU interrupt.
`g_cpu0_intmap` (or `g_cpu1_intmap`) associates each CPU interrupt
to a single IRQ/peripheral and, then, when a CPU interrupt is
triggered, only the last registered IRQ's callback will be called.
This isn't a problem here because 1) the registered callback is the
same for both IRQ's (in fact, it considers the CPU interrupt) and
2) we know in advance which peripheral interrupts will be attached
to which CPU interrupt and, then, we can set them directly.
2023-08-14 16:29:21 -03:00
Petro Karashchenko 655d00b1e7 arch/xtensa/esp32s3: initial effort to get BLE running on ESP32-S3
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 33f03fc98c esp32s3/wlan: Always run `wlan_rxpoll` work queue
Even if we were unable to get a free IOB, trigger the work queue
to make sure that no old packet is waiting to be handled by the
network upper layers.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 012dddf7c9 esp32s3/wlan: check for all connections on wlan_txpoll
This prevents us from getting stuck while polling the different
network structures in `devif_poll_connections`. This is useful for
Wi-Fi/Bluetooth coexistence, specifically.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 6589887284 esp32s3/wlan: check if the network device's IOB isn't null
Before adding the upper layer network device's IOB to the TX queue
of the wireless driver, check if it isn't null.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano ec4149c61d esp32s3/hardware: Update `regi2c_ctrl.h` functions name 2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 6089f58f00 esp32s3/irq: Enhance IRQ subsystem
- Fix macro values from `arch/xtensa/include/esp32s3/irq.h`
- Remove references to unexisting edge-triggered CPU interrupts
- Add `esp32s3_getirq` to get IRQ based on core and the `cpuint`
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 31476bcb34 esp32s3/rtc: Initialize RTC subsystem
RTC subsystem controls not only the RTC itself but functions that
use RTC-enabled features like Bluetooth and Wi-Fi. Initialization
must be performed during the system start-up.
2023-08-14 16:29:21 -03:00
Tiago Medicci Serrano 7dafbb05a1 esp32s3/peripherals: Add initialization routine for the peripherals
It provides an initialization function that performs the
peripherals' initialization routine during the chip startup.
2023-08-14 16:29:21 -03:00
Xiang Xiao 14563aa48c arch/armv7r: Sync gic/timer with armv7-a and armv8-a
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-14 14:51:01 -03:00
Xiang Xiao e4dea90725 arch/armv7-a: Update the macro definition in gic.h
https://developer.arm.com/documentation/ihi0048/b

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-14 14:51:01 -03:00
Tiago Medicci Serrano 98985f48dd sched/semaphore: Remove restriction to use nxsem_trywait from ISR
Considering that `nxsem_trywait` is non-blocking, although not
recommended, it could be called from the interrupt handler.
2023-08-14 23:47:41 +08:00
liqinhui 719191ac72 net/local: Return an error when write the too big packet.
Verification:
  Write a packet, the length is bigger than CONFIG_DEV_FIFO_SIZE.
  The return value should be -1, and the errno is EMSGSIZE.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-14 23:46:08 +08:00
raiden00pl 89174e6a1a arch/stm32h7: use correct name for bit 2 in STM32_PWR_CR3 register 2023-08-14 23:42:37 +08:00
raiden00pl ae6067fb29 boards/stm32h7: HCLK and ACLK are delivered from SYSCLK not CPUCLK 2023-08-14 23:40:46 +08:00
David Sidrane 60840f1ed2 imxrt:Serial Preserve all but W1C bit in SR
SR contains configuration bits that need to be preserved.
2023-08-14 18:23:59 +03:00
liqinhui 2d0df3b5f2 net/local: Fix the error return length when read the bigger packet.
Verifiction:
  Write a bigger packet and read the packet using a smaller buffer.
  The return length of reading should be the length of smaller buffer.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-14 21:11:30 +08:00
liqinhui 8631e0c6b5 net/tcp: Fix the sack byte aligment error.
The error log is as follows:
  tcp/tcp_send_buffered.c:376:57: runtime error: member access within misaligned
  address 0x10075942 for type 'struct tcp_sack_s', which requires 4 byte alignment

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-14 20:46:09 +08:00
anjiahao 307e0eb964 arch/sim:add -Ttext-segment to load the image in the fixed address
to make the address returned by backtrace and gdbstub match the symbol stored in elf.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-14 20:43:41 +08:00
raiden00pl ec97cc8a31 ci: build arduino-nano-33ble and arduino-nano-33ble-rev2 with cmake 2023-08-14 20:42:59 +08:00
raiden00pl 67079154c7 Documentation: add Arduino Nano 33 BLE Sense and Arduino Nano 33 BLE Sense Rev2 2023-08-14 20:42:59 +08:00
raiden00pl a1d7b2961d boards/nrf52: add Arduino Nano 33 BLE Rev2 board 2023-08-14 20:42:59 +08:00
liuhongchao f9dbeaef86 drivers/input:fix circbuf leak
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2023-08-14 20:40:11 +08:00
simbit18 5830da2fc8 boards/Kconfig: Fix Kconfig style
Add TABs
remove the extra ---help--- in config ARCH_BOARD_METRO_M4
2023-08-14 14:12:27 +03:00
raiden00pl b73e1b9591 arch/{nrf52|nrf53|nrf91}: handle I2C errors in interrupt mode 2023-08-14 17:51:48 +08:00
xuxin19 d18988521f cmake:fix add_user_library module archive issue
STATIC target export in BINDIR/staging/ directory by `cmake --install`

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-14 08:06:56 +02:00
yinshengkai 756f6f425a sim/segger: adjust the maximum number of channels for notes
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-14 13:41:00 +08:00
yinshengkai b106f032cb drivers/note: add maximum channel number check
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-14 13:41:00 +08:00
dulibo1 3591de08c6 fix g_goldfish_gauge_ops init C89 compatible and align style
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-14 13:40:38 +08:00
Brian Doherty f444de0882 Initial port to Arduino Nano 33 BLE. 2023-08-14 11:11:50 +08:00
fangxinyong 903e87a7bd builtin: support uid/gid config for binfs app
Implement I_SUID/I_SGID feature for binfs in the POSIX compliant way.
If set-user-ID bit is set in the file permissions, then the effective
user ID of process shall be set to UID of the new process image file.

test case:
hello example emulates to set uid and file set-user-ID bit, and call
geteuid and getegid API.
UID  = 2000
GID  = 3000
MODE = 06555

nsh> ls -l /bin/hello
 -r-sr-sr-x    2000    3000       0 hello
nsh> hello
geteuid:2000
getegid:3000

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-14 01:37:00 +08:00
jianglianfang 5accd7c146 drivers/video: add Goldfish-FB driver
the register definition is described here:
https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT

Goldfish-FB driver is to communicate with Goldfish-FB in QEMU, and push the framebuffer data to the emulator for display on the screen.
test: CONFIG_GOLDFISH_FB =1, and run demo=>lvgldemo widgets

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-08-13 11:51:30 -03:00
rongyichang 72587c6e79 drivers/virtio: add virtio input driver
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2023-08-13 11:47:39 -03:00
raiden00pl 5572552024 arch/nrf53: port 6e8f25ba3b change from nrf52
Added config setting for NRF53 I2C timing bug workaround
2023-08-13 11:45:06 -03:00
raiden00pl eec59015f0 arch/{nrf53|nrf91}: port cc99d94cfd change from nrf52
Fixed NRF52 I2C register naming
2023-08-13 11:45:06 -03:00