Skip to content

Commit d2e5340

Browse files
authored
Merge branch 'RT-Thread:master' into rk3500
2 parents 224c2fb + aee8920 commit d2e5340

File tree

16 files changed

+423
-146
lines changed

16 files changed

+423
-146
lines changed

.github/ALL_BSP_COMPILE.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"RTT_TOOL_CHAIN": "sourcery-arm",
7070
"SUB_RTT_BSP": [
7171
"phytium/aarch32",
72-
"qemu-vexpress-a9",
7372
"airm2m/air32f103",
7473
"acm32/acm32f0x0-nucleo",
7574
"acm32/acm32f0x0-nucleo",
@@ -457,6 +456,14 @@
457456
"nrf5x/nrf52840",
458457
"nrf5x/nrf5340"
459458
]
459+
},
460+
{
461+
"RTT_BSP": "arm-none-bsp-smart",
462+
"RTT_TOOL_CHAIN": "sourcery-arm",
463+
"RTT_SMART_TOOL_CHAIN": "arm-linux-musleabi",
464+
"SUB_RTT_BSP": [
465+
"qemu-vexpress-a9"
466+
]
460467
}
461468
]
462469
}

.github/workflows/bsp_buildings.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,14 @@ jobs:
216216
pip3 install esptool
217217
echo "RTT_EXEC_PATH=/opt/riscv32-esp-elf/bin" >> $GITHUB_ENV
218218
219+
- name: Install Arm Musl ToolChains
220+
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && matrix.legs.RTT_SMART_TOOL_CHAIN == 'arm-linux-musleabi' && success() }}
221+
shell: bash
222+
run: |
223+
wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/arm-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2
224+
sudo tar xjf arm-linux-musleabi_for_x86_64-pc-linux-gnu_stable.tar.bz2 -C /opt
225+
/opt/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin/arm-linux-musleabi-gcc --version
226+
219227
- name: Install Simulator Tools
220228
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'gcc' && success() }}
221229
run: |

bsp/Infineon/libraries/HAL_Drivers/drv_spi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Date Author Notes
88
* 2022-07-18 Rbb666 first version
99
* 2023-03-30 Rbb666 update spi driver
10+
* 2025-04-27 Hydevcode update spi driver
1011
*/
1112

1213
#include <drv_spi.h>
@@ -28,6 +29,9 @@
2829
#ifdef BSP_USING_SPI3
2930
static struct rt_spi_bus spi_bus3;
3031
#endif
32+
#ifdef BSP_USING_SPI5
33+
static struct rt_spi_bus spi_bus5;
34+
#endif
3135
#ifdef BSP_USING_SPI6
3236
static struct rt_spi_bus spi_bus6;
3337
#endif
@@ -50,6 +54,14 @@ static struct ifx_spi_handle spi_bus_obj[] =
5054
.mosi_pin = GET_PIN(6, 0),
5155
},
5256
#endif
57+
#if defined(BSP_USING_SPI5)
58+
{
59+
.bus_name = "spi5",
60+
.sck_pin = GET_PIN(7, 2),
61+
.miso_pin = GET_PIN(7, 0),
62+
.mosi_pin = GET_PIN(7, 1),
63+
},
64+
#endif
5365
#if defined(BSP_USING_SPI6)
5466
{
5567
.bus_name = "spi6",

bsp/Infineon/xmc7100d-f144k4160aa/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ Drivers.I2C:
77
kconfig:
88
- CONFIG_BSP_USING_I2C=y
99
- CONFIG_BSP_USING_HW_I2C1=y
10+
# ------ Peripheral CI ------
11+
Peripheral.tfcard:
12+
kconfig:
13+
- CONFIG_BSP_USING_TF_CARD=y
14+
Peripheral.qmi8658:
15+
kconfig:
16+
- CONFIG_BSP_USING_QMI8658=y

bsp/Infineon/xmc7100d-f144k4160aa/board/Kconfig

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ menu "Onboard Peripheral Drivers"
1515
select BSP_USING_UART
1616
select BSP_USING_UART4
1717
default y
18+
menuconfig BSP_USING_TF_CARD
19+
bool "Enable TF_CARD"
20+
select BSP_USING_SPI
21+
select RT_USING_SPI_MSD
22+
select RT_USING_DFS
23+
select RT_USING_DFS_DEVFS
24+
select RT_USING_DFS_ELMFAT
25+
default n
26+
if BSP_USING_TF_CARD
27+
config BSP_USING_SPI_FLASH
28+
bool "Using SPI TO SDCARD"
29+
default y
30+
endif
31+
config BSP_USING_QMI8658
32+
bool "Enable QMI8658"
33+
select BSP_USING_I2C
34+
select PKG_USING_QMI8658
35+
default n
1836
endmenu
1937

2038
menu "On-chip Peripheral Drivers"
@@ -47,7 +65,7 @@ menu "On-chip Peripheral Drivers"
4765
if BSP_USING_I2C
4866
menuconfig BSP_USING_HW_I2C1
4967
bool "Enable BSP_USING_HW_I2C1"
50-
default n
68+
default y
5169
if BSP_USING_HW_I2C1
5270
config BSP_I2C1_SCL_PIN
5371
int "BSP_I2C1_SCL_PIN number(18,2)"
@@ -59,7 +77,15 @@ menu "On-chip Peripheral Drivers"
5977
default 145
6078
endif
6179
endif
62-
80+
menuconfig BSP_USING_SPI
81+
bool "Enable SPI"
82+
default n
83+
select RT_USING_SPI
84+
if BSP_USING_SPI
85+
config BSP_USING_SPI5
86+
bool "Enable BSP_USING_SPI5"
87+
default y
88+
endif
6389
endmenu
6490

6591
endmenu

bsp/Infineon/xmc7100d-f144k4160aa/board/SConscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@ CPPDEFINES = ['XMC7100D_F144K4160',
5858
'TARGET_APP_KIT_XMC71_EVK_LITE_V2']
5959
group = DefineGroup('Drivers', src, depend=[''], CPPPATH=path, CPPDEFINES=CPPDEFINES)
6060

61+
list = os.listdir(cwd)
62+
for item in list:
63+
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
64+
group = group + SConscript(os.path.join(item, 'SConscript'))
65+
6166
Return('group')
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
from building import *
3+
4+
objs = []
5+
cwd = GetCurrentDir()
6+
7+
# add general drivers
8+
src = []
9+
path = [cwd]
10+
11+
if GetDepend(['BSP_USING_SPI_FLASH']):
12+
src += Glob('spi_flash_init.c')
13+
14+
if GetDepend(['BSP_USING_TF_CARD']):
15+
src += Glob('drv_filesystem.c')
16+
17+
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
18+
19+
Return('group')
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-04-27 Hydevcode first version
9+
*/
10+
#include <rtthread.h>
11+
#include <rtdevice.h>
12+
#include <dfs_fs.h>
13+
14+
#define DBG_TAG "app.filesystem"
15+
#define DBG_LVL DBG_INFO
16+
#include <rtdbg.h>
17+
18+
#ifdef BSP_USING_TF_CARD
19+
static int filesystem_mount(void)
20+
{
21+
//elm-fat
22+
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
23+
{
24+
LOG_I("Filesystem initialized!");
25+
}
26+
else
27+
{
28+
LOG_E("Failed to initialize filesystem!");
29+
}
30+
return 0;
31+
}
32+
INIT_APP_EXPORT(filesystem_mount);
33+
#endif /*BSP_USING_TF_CARD*/
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2006-2022, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-04-27 Hydevcode first version
9+
*/
10+
#include <rtthread.h>
11+
#include <rtdevice.h>
12+
#include "drv_spi.h"
13+
#include "dev_spi_msd.h"
14+
#include <dfs_fs.h>
15+
16+
#ifdef BSP_USING_SPI_FLASH
17+
static int rt_spi_flash_init(void)
18+
{
19+
rt_hw_spi_device_attach("spi5", "spi30", GET_PIN(7, 3));
20+
if (RT_NULL == msd_init("sd0", "spi30"))
21+
{
22+
return -RT_ERROR;
23+
}
24+
25+
return RT_EOK;
26+
}
27+
INIT_COMPONENT_EXPORT(rt_spi_flash_init);
28+
#endif /* BSP_USING_SPI_FLASH */

bsp/k210/drivers/drv_i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <rtthread.h>
1313
#include <rtdevice.h>
1414

15+
#include "i2c.h"
1516
#include "board.h"
1617
#include "drivers/dev_i2c.h"
1718
#include "gpiohs.h"

0 commit comments

Comments
 (0)