mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-13 04:33:18 +08:00
[bsp/bouffalo_lab]add sdcard driver (#7577)
This commit is contained in:
@@ -161,7 +161,7 @@ Windows下推荐使用[env工具][1],在console下进入bsp/bouffalo_lab/bl61x
|
||||
|
||||
其中:
|
||||
|
||||
- bl616:芯片名称
|
||||
- bl616:芯片名称(bl808:三核同时下载;或者输入:bl808-m0/bl808-lp/bl808-d0分别烧录对应的核,但是m0必须要烧录才能运行)
|
||||
- /dev/ttyUSB1:下载串口号,linux下为/dev/ttyUSBx或/dev/ttyACMx,windows下为COMx
|
||||
|
||||
|
||||
|
||||
@@ -13,4 +13,16 @@ config BSP_USING_ROMAPI
|
||||
|
||||
config BSP_USING_PSRAM
|
||||
bool "Enable PSRAM"
|
||||
default n
|
||||
default n
|
||||
|
||||
choice
|
||||
prompt "Choose Module"
|
||||
|
||||
default BSP_USING_BL61X_MODULE_DEFAULT
|
||||
|
||||
config BSP_USING_BL61X_MODULE_DEFAULT
|
||||
bool "Default Module"
|
||||
config BSP_USING_BL61X_MODULE_M0P
|
||||
bool "M0P Module"
|
||||
select BSP_USING_PSRAM
|
||||
endchoice
|
||||
|
||||
@@ -129,7 +129,11 @@ static void systick_isr(void)
|
||||
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
#if defined (BSP_USING_BL61X_MODULE_DEFAULT)
|
||||
bflb_flash_init();
|
||||
#elif defined (BSP_USING_BL61X_MODULE_M0P)
|
||||
|
||||
#endif
|
||||
|
||||
system_clock_init();
|
||||
peripheral_clock_init();
|
||||
|
||||
@@ -6,7 +6,11 @@ __attribute__((section(".fw_header"))) struct bootheader_t fw_header = {
|
||||
/*flash config */
|
||||
.flash_cfg.magiccode = 0x47464346,
|
||||
.flash_cfg.cfg.ioMode = 0x11, /*!< Serail flash interface mode,bit0-3:IF mode,bit4:unwrap */
|
||||
#if defined (BSP_USING_BL61X_MODULE_DEFAULT)
|
||||
.flash_cfg.cfg.cReadSupport = 0x00, /*!< Support continuous read mode,bit0:continuous read mode support,bit1:read mode cfg */
|
||||
#elif defined (BSP_USING_BL61X_MODULE_M0P)
|
||||
.flash_cfg.cfg.cReadSupport = 0x01, /*!< Support continuous read mode,bit0:continuous read mode support,bit1:read mode cfg */
|
||||
#endif
|
||||
.flash_cfg.cfg.clkDelay = 0x01, /*!< SPI clock delay,bit0-3:delay,bit4-6:pad delay */
|
||||
.flash_cfg.cfg.clkInvert = 0x01, /*!< SPI clock phase invert,bit0:clck invert,bit1:rx invert,bit2-4:pad delay,bit5-7:pad delay */
|
||||
.flash_cfg.cfg.resetEnCmd = 0x66, /*!< Flash enable reset command */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[cfg]
|
||||
# 0: no erase, 1:programmed section erase, 2: chip erase
|
||||
erase = 2
|
||||
erase = 1
|
||||
# skip mode set first para is skip addr, second para is skip len, multi-segment region with ; separated
|
||||
skip_mode = 0x0, 0x0
|
||||
# 0: not use isp mode, #1: isp mode
|
||||
|
||||
@@ -31,6 +31,15 @@ then
|
||||
elif [ $CHIPNAME = 'bl808' ]
|
||||
then
|
||||
CONFIG_DIR=./bl808
|
||||
elif [ $CHIPNAME = 'bl808-m0' ]
|
||||
then
|
||||
CONFIG_DIR=./bl808/m0
|
||||
elif [ $CHIPNAME = 'bl808-lp' ]
|
||||
then
|
||||
CONFIG_DIR=./bl808/lp
|
||||
elif [ $CHIPNAME = 'bl808-d0' ]
|
||||
then
|
||||
CONFIG_DIR=./bl808/d0
|
||||
else
|
||||
echo "chip name error"
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
menu "General Drivers Configuration"
|
||||
|
||||
config BSP_DRIVER_DEBUG
|
||||
bool "Enable Driver Debug Log Output"
|
||||
default n
|
||||
|
||||
menu "General Purpose UARTs"
|
||||
menuconfig BSP_USING_UART0
|
||||
bool "Enable UART0"
|
||||
@@ -1400,6 +1404,11 @@ menu "General Drivers Configuration"
|
||||
config BSP_USING_ON_CHIP_FLASH
|
||||
bool "Enable On-Chip FLASH"
|
||||
default n
|
||||
config BSP_USING_SDH
|
||||
select RT_USING_SDIO
|
||||
select RT_USING_DFS
|
||||
bool "Enable Secure Digital Host Controller(SDH)"
|
||||
default n
|
||||
menuconfig BSP_USING_FS
|
||||
bool "Enable File System"
|
||||
select RT_USING_DFS
|
||||
|
||||
@@ -40,6 +40,9 @@ if GetDepend('BSP_USING_SPI'):
|
||||
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
|
||||
src += ['drv_flash.c']
|
||||
|
||||
if GetDepend('RT_USING_DFS'):
|
||||
src += ['drv_sdh.c']
|
||||
|
||||
group = DefineGroup('rt_drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
objs = [group]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+16
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2023, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2023-05-28 flyingcys the first version
|
||||
*/
|
||||
|
||||
#ifndef __DRV_SDH_H__
|
||||
#define __DRV_SDH_H__
|
||||
|
||||
int rt_hw_sdh_init(void);
|
||||
|
||||
#endif /* __DRV_SDH_H__ */
|
||||
Reference in New Issue
Block a user