Commit Graph

49524 Commits

Author SHA1 Message Date
raiden00pl
4089e35805 drivers/sensors: add bh1749nuc color sensor support
Add support for the BH1749NUC I2C color sensor.
Currently, the interrupt pin is not supported.
2023-06-01 23:45:30 +08:00
raiden00pl
235e0e92a8 boards/nrf52-feather: fix typo in I2C1 initialization 2023-06-01 18:34:54 +03:00
raiden00pl
e1ffacfc33 drivers/sensors: add BMI270 IMU support 2023-06-01 11:23:54 -04:00
paolovolpi
0ed9842180 drivers/can/mcp2515.c Fix: add missing spi configuration in mcp2515_reset_lowlevel 2023-06-01 09:52:16 -03:00
Alexander Merkle
c661e26e86 board: add CortexR52 FVP AEMv8R platform
see board/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/scripts/readme.txt

Port is highly based on fvp-v8r AARCH32 port.
2023-06-01 09:51:03 -03:00
Alexander Merkle
f6695738e1 arch/arm: add ARMv8-r(Cortex-R52) support
Basic work required for uniprocessor CortexR52 (ARMv8R AARCH32) using
GICv3 and CP15 mapped arch timer.

Tested on ARM FVP 11.20.

Port is based on ARMv8R AARCH64 and ARMv7R code. Excuse possible copy-paste leftovers.
2023-06-01 09:51:03 -03:00
Fotis Panagiotopoulos
3c54d82d81 net: Fix task block when devif_send fails.
When a task needs to send data, a callback is allocated and the
transmission is happening in a worker task through devif_send.
Synchronization between the two tasks (sender & worker) is
achieved by a semaphore.

If devif_send fails, this semaphore was never posted, leaving
the sending task blocked indefinitely. This commit fixes this
by checking the return code of netif_send, and posting this
semaphore in case of failure.

Polling then stops, and execution is resumed on the sending
task.
2023-06-01 17:05:54 +08:00
Huang Qi
5606e77ee0 libc/wchar: Implement vswprintf
Implement vswprintf and let swprintf based on it.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-06-01 14:34:01 +08:00
Masayuki Ishikawa
6b35a49f6e dirivers: virtio: Fix virtnet_transmit() in virtio-mmio-net.c
Summary:
- I noticed that the driver sends incorrect packets sometimes.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-06-01 13:44:30 +08:00
Xiang Xiao
b63b83396b sim/kasan: Enable mempool and backtrace
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-01 08:19:04 +03:00
Xiang Xiao
905867d38c sim/adb: Enable tlfs, mempool and backtrace
to improve the build coverage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-01 08:19:04 +03:00
Xiang Xiao
bff3c2308c mm/tlsf: git clone https instead git
to avoid ci fail with "error: cannot run ssh: No such file or directory"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-01 08:19:04 +03:00
Xiang Xiao
dfe583e1de Fix tlsf/mm_tlsf.c:151:28: error: ‘TCB_FLAG_HEAPDUMP’ undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-01 08:19:04 +03:00
Xiang Xiao
3edff9d323 mm/tlsf: Change "memdump_backtrace_s *dump" to memdump_backtrace_s *buf"
avoid the conflict with "mm_memdump_s *dump"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-01 08:19:04 +03:00
raiden00pl
66c2d2ecc4 arch/nrf53/Kconfig: move GPIO configuration menu to match nrf52 2023-05-31 22:28:50 +03:00
raiden00pl
5f814b1da8 arch/{nrf52|nrf53}/Kconfig: hide SPI_MASTER options if SPI_MASTER not enabled 2023-05-31 22:28:50 +03:00
raiden00pl
81b0ae064c arch/{nrf52|nrf53}/Kconfig: hide I2C_MASTER options if I2C_MASTER not enabled 2023-05-31 22:28:50 +03:00
raiden00pl
a3b91bc183 arch/{nrf52|nrf53}/Kconfig: hide PWM options if PWM not enabled 2023-05-31 22:28:50 +03:00
Ville Juven
7c2930c3df mpfs/mpfs_corespi: Optimize TX / RX FIFO handling
Remove unnecessary reading of the status register when loading / unloading
the FIFOs. Reading from the IP block is slow due to BUS synchronization and
this basically makes the SPI busy loop for no reason at all, destroying the
CPU usage.

The overall benefit of these changes is approx. 25%-points, which is a
MASSIVE improvement.
2023-05-31 15:52:56 -03:00
Ville Juven
fc5e8ff8f8 mpfs/CoreSPI: Fix bug when waiting for last character to arrive
The logic for rx_fifo_empty is wrong, needs a loop for the retry to work
2023-05-31 15:52:56 -03:00
Jukka Laitinen
8d646fc49c arch/risc-v/src/mpfs/mpfs_corespi.c: Fix the usage of MPFS_CORESPI_INSTANCES macro
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-05-31 15:52:56 -03:00
Ville Juven
4b6166548b mpfs/mpfs_corespi: Add Kconfig for instance/irq offsets
Also change the defaults
2023-05-31 15:52:56 -03:00
Ville Juven
223cc6d1f4 mpfs/corespi: Add driver for CoreSPI
Adds a driver for an FPGA fabric / CoreSPI implementation.

Supports multiple instances, assuming they reside in some base address,
offsettable by a constant value.
2023-05-31 15:52:56 -03:00
raiden00pl
2d56197792 arch/{nrf52|nrf53}: validate if EasyDMA transfer is possible
Add an interface that validate if EasyDMA transfer is possible.
EasyDMA cannot access flash memory which can cause hard to detect silent bugs.
This feature is enabled if CONFIG_DEBUG_FEATURES=y and CONFIG_DEBUG_ASSERTIONS=y.
2023-06-01 00:40:17 +08:00
raiden00pl
58ad290b0e boards/nrf5340-dk: add MCUboot configurations for the app core
Added configurations:
- mcuboot_loader_cpuapp - MCUboot loader
- mcuboot_app_cpuapp - MCUboot compatible application.
  Needs to be signed manually:
    imgtool.py sign nuttx.hex nuttx_img.hex --align 8 -v 1.0.0 -H 0x200 -S 0x70000 --pad-header --pad
2023-05-31 23:12:21 +08:00
raiden00pl
d0942f5cb3 nrf53: add MCUboot support 2023-05-31 23:12:21 +08:00
raiden00pl
b98acb9a44 arch/nrf53: add progmem support 2023-05-31 23:12:21 +08:00
raiden00pl
ebfd0b22f9 boards/nrf53: unify linker scripts
Unify linker scripts:
- use the same name for linker scripts
- merge RPTUN linker scripts with standard linker scripts
2023-05-31 23:12:21 +08:00
anjiahao
e6506619ac mempool:Fix seqnumber statistics error in memdump
The judgment of seqmin and seqmax is ignored

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-05-31 23:00:16 +08:00
Ville Juven
d566b7e2c7 mpfs_usb: Add mpfs_vbus_detect
External function to query vbus status. Reading from the block requires
the clock, but if no devices are open -> vbus detect does not work.

This creates a chicken / egg problem, if vbus detect is used to start
the usb device.
2023-05-31 22:59:25 +08:00
Filipe Cavalcanti
3fea2923d7 arch/arm/src/tiva: start FPU before gpio config 2023-05-31 22:47:55 +08:00
yinshengkai
aad2f97587 mm: Dump all memory blocks on allocation failure
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-05-31 15:24:25 +08:00
xucheng5
484d349fe3 driver/mtd : check args for nvs read
mtd_config_fs: check configdata before use

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-05-31 15:24:14 +08:00
raiden00pl
37cdfeed9b boards/nrf52840-dk: add MCUboot configurations
Added configurations:
- mcuboot_loader - MCUboot loader
- mcuboot_app - MCUboot compatible application.
  Needs to be signed manually:
    imgtool.py sign nuttx.hex nuttx_img.hex --align 8 -v 1.0.0 -H 0x200 -S 0x30000 --pad-header --pad
2023-05-31 10:44:08 +08:00
raiden00pl
3c0ce99c01 boards/nrf52832-dk: add MCUboot configurations
Added configurations:
- mcuboot_loader - MCUboot loader
- mcuboot_loader_minimal - MCUboot loader optimised for FLASH usage.
  Further optimization can be achieved by CONFIG_LTO_FULL=y.
- mcuboot_app - MCUboot compatible application.
  Needs to be signed manually:
  imgtool.py sign nuttx.hex nuttx_img.hex --align 8 -v 1.0.0 -H 0x200 -S 0x30000 --pad-header --pad
2023-05-31 10:44:08 +08:00
raiden00pl
1facea635b nrf52: add MCUboot support 2023-05-31 10:44:08 +08:00
raiden00pl
4650c9f756 Documentation: move boards/nrf52 readmes to Documentation 2023-05-30 19:25:30 -07:00
raiden00pl
da4c7703db Documentation: move boards/nrf53 readmes to Documentation 2023-05-30 19:25:30 -07:00
anjiahao
045b9ffd54 mempool:fix bug read out of bounds when realloc
fix kasan report

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-05-30 23:12:07 +08:00
Jukka Laitinen
f24ab22b76 arch/risc-v/src/mpfs: Modify mpfs_i2c.c to support arbitrary number of FPGA I2C blocks
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-05-30 23:02:19 +08:00
chao an
090a52c5fb elf/coredump: alignment stack buffer to 64 to match gdb request
Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 23:00:23 +08:00
chao an
589d4a9f8e net/semantic/parser: fix compile warning found by sparse
Reference:
https://linux.die.net/man/1/sparse

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 23:00:00 +08:00
chao an
fb9b41221d semantic/parser: fix compile warning found by sparse
Reference:
https://linux.die.net/man/1/sparse

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 23:00:00 +08:00
paolovolpi
f875db41d4 drivers/can/mcp2515.c Use SPIDEV_CANBUS(config->devid) instead of SPIDEV_CANBUS(0) 2023-05-30 11:48:13 +03:00
chao an
c470ef7c9c net/socket: fix kconfig warning
warning: (NET_SOLINGER) selects NET_UDP_NOTIFIER which has unmet direct dependencies
  (NET && NET_UDP && !NET_UDP_NO_STACK && SCHED_WORKQUEUE)

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-30 16:06:17 +08:00
ligd
1a927a6cf3 mm: add invalid pid dump when malloc failed
We can dump the memory that has exited but
has not been released

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-05-30 02:19:59 +08:00
anjiahao
70cb62e2a3 Support when malloc failed dump mempool info
Replaced the previous implementation method to
maintain unity with the heap dump

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-05-29 15:29:31 +02:00
Eero Nurkkala
059d02a231 risc-v/mpfs: i2c-fpga: fix complex transactions
bmp388 works poorly as the system fires STOPs even in
a beginning of a transaction. Don't let unrelated STOPs
to distort the data flow.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-05-29 20:45:01 +08:00
Eero Nurkkala
816b971e70 risc-v/mpfs: i2c: add more FPGA i2cs
This adds 2 more FPGA I2Cs. Also rework the indexing
so that it matches the earlier work without major changes.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-05-29 20:45:01 +08:00
Eero Nurkkala
53b58b0881 risc-v/mpfs: i2c: fix an FPGA known issue
This fixes the following issue:
  - After sending the address, the driver writes an extra zero

Without this patch, the extra write causes an extra ACK that would
terminate the sequence prematurely. This is observed as data read
corruption.

With this fix, the condition is detected precisely. That being the
case, the sequence is continued with a repeated start, after which
the read continues normally.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-05-29 20:45:01 +08:00