Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
PersimM7_柿饼M7模块
全志_RISCV_D1_D1S
RT-Thread 柿饼派M7 全志D1S ddr 运行xboot
发布于 2022-06-20 22:33:48 浏览:2048
订阅该版
[tocm] ## 前言 - 最近拿到 RT-Thread 柿饼派M7的开发板,默认运行的是RT-Thread Persim OS,不过我把固件给擦除了,无法开机了,所以先从最基本的启动下手 - 开发板板载SD Nand(sd emmc),也就是板载 SD card,所以无法使用全志的烧卡工具制作【启动卡】,RT-Thread 官方提供了可以烧写板载SD nand 的xfel工具 ## xfel工具 - 全志 F133(d1s),进入FEL模式后,可以使用xfel工具进行各种烧写操作 - 默认当前的xfel 官方版本不支持 SD nand 的烧写(板载在线烧写),RT-Thread 提供的工具,增加了这个sd nand 烧写功能,所以很实用。 - 这里直接使用xfel 官方工具进行操作,初步了解xfel 工具的使用方法 - [https://github.com/xboot/xfel](https://github.com/xboot/xfel) - 这里直接下载 windows下的版本  ## xboot - [https://github.com/xboot/xboot](https://github.com/xboot/xboot) - xboot 可以认为功能强大的bootloader,初步看了下,可用于初始化启动全志 F133,当然其他的功能也很丰富 - git clone xboot的代码到 ubuntu,然后根据 xboot中的文档,下载交叉编译工具链,编译xboot,生成 xboot.bin ## 运行xboot - 经过了解,xboot.bin 可以使用 xfel 工具,可以通过命令初始化F133 的板载ddr,可以把可执行bin文件写到 ddr中并执行,这样比较的方便,当然后期软件固化,可以烧写到板载SD nand 中 - 后面研究是否可以直接使用xboot 启动芯片,不再使用其他的 boot0之类的 ## ddr运行xboot - 首先让开发板进入 FEL模式,有个按键可以在断电后按着,然后USB上电(OTG),松开按键即可进入FEL模式 - 在控制台,我使用RT-Thread ENV工具,输入 `xfel version`,如果正常,就可以直接操作了,如果无法找到FEL设备,就是安装一下驱动  - 操作命令,提前把编译好的xboot.bin,放在 xfel 工具目录下,或者可以找到的目录位置 - `xfel ddr f133` 初始化ddr,F133 内部有个64MB 的DDR RAM - `xfel write 0x40000000 xboot.bin`,烧写 xboot.bin 到 DDR,烧写到 ddr 0x40000000 位置 - `xfel exec 0x40000000`,运行xboot,类似于uboot 的`go`命令 ## 串口信息 - 接上DEBUG串口,可以查看串口的信息 ```c _ _ _ _ | |___ _____ _____ _| |_ \ \/ /| _ | _ | _ |_ _| (C) 2007-2022 ) ( | |_| | |_| | |_| | | |____JIANJUN.JIANG__ /_/\_\|_____|_____|_____| |_____________________| V3.0.0 (Jun 20 2022 - 09:50:03) - [mangopi][MangoPi-MQ Based On Allwinner F133 SOC] [ 0.000020]Probe device 'blk-romdisk.0' with blk-romdisk [ 0.000800]Probe device 'ext-32k' with clk-fixed [ 0.000810]Probe device 'rc-16m' with clk-fixed [ 0.000820]Probe device 'dcxo24m' with clk-fixed [ 0.000830]Probe device 'ext32k-gate' with clk-gate [ 0.000840]Probe device 'iosc' with clk-gate [ 0.000850]Probe device 'iosc-div32k' with clk-fixed-factor [ 0.000860]Probe device 'osc32k' with clk-mux [ 0.000870]Probe device 'dcxo24m-div32k-gate' with clk-gate [ 0.000880]Probe device 'dcxo24m-div32k' with clk-fixed-factor [ 0.000890]Probe device 'rtc32k' with clk-mux [ 0.000900]Probe device 'rtc-1k' with clk-fixed-factor [ 0.000910]Probe device 'pll-cpux' with clk-f133-pll [ 0.000920]Probe device 'pll-ddr0' with clk-f133-pll [ 0.000930]Probe device 'pll-periph0-parent' with clk-f133-pll [ 0.000940]Probe device 'pll-video0' with clk-f133-pll [ 0.000950]Probe device 'pll-video1' with clk-f133-pll [ 0.000960]Probe device 'pll-ve' with clk-f133-pll [ 0.000970]Probe device 'pll-audio0-4x' with clk-f133-pll [ 0.000980]Probe device 'pll-audio1' with clk-f133-pll [ 0.000990]Probe device 'pll-cpux-div' with clk-ratio [ 0.001000]Probe device 'pll-periph0-2x' with clk-divider [ 0.001010]Probe device 'pll-periph0-800m' with clk-divider [ 0.001020]Probe device 'pll-periph0' with clk-fixed-factor [ 0.001030]Probe device 'pll-periph0-div3' with clk-fixed-factor [ 0.001040]Probe device 'pll-video0-4x' with clk-fixed-factor [ 0.001050]Probe device 'pll-video0-2x' with clk-fixed-factor [ 0.001060]Probe device 'pll-video1-4x' with clk-fixed-factor [ 0.001070]Probe device 'pll-video1-2x' with clk-fixed-factor [ 0.001080]Probe device 'pll-audio0-2x' with clk-fixed-factor [ 0.001090]Probe device 'pll-audio0' with clk-fixed-factor [ 0.001100]Probe device 'pll-audio1-div5' with clk-divider [ 0.001110]Probe device 'pll-audio1-div2' with clk-divider [ 0.001120]Probe device 'mux-psi' with clk-mux [ 0.001130]Probe device 'div-psi' with clk-divider [ 0.001140]Probe device 'psi-ahb' with clk-ratio [ 0.001150]Probe device 'mux-apb0' with clk-mux [ 0.001160]Probe device 'div-apb0' with clk-divider [ 0.001170]Probe device 'apb0' with clk-ratio [ 0.001180]Probe device 'mux-apb1' with clk-mux [ 0.001190]Probe device 'div-apb1' with clk-divider [ 0.001200]Probe device 'apb1' with clk-ratio [ 0.001210]Probe device 'mux-riscv' with clk-mux [ 0.001220]Probe device 'riscv' with clk-divider [ 0.001230]Probe device 'riscv-axi' with clk-divider [ 0.001240]Probe device 'mux-timer0' with clk-mux [ 0.001250]Probe device 'timer0' with clk-ratio [ 0.001260]Probe device 'mux-timer1' with clk-mux [ 0.001270]Probe device 'timer1' with clk-ratio [ 0.001280]Probe device 'mux-spi0' with clk-mux [ 0.001290]Probe device 'div-spi0' with clk-divider [ 0.001300]Probe device 'radio-spi0' with clk-ratio [ 0.001310]Probe device 'gate-spi0' with clk-gate [ 0.001320]Probe device 'spi0' with clk-gate [ 0.001330]Probe device 'mux-spi1' with clk-mux [ 0.001340]Probe device 'div-spi1' with clk-divider [ 0.001350]Probe device 'radio-spi1' with clk-ratio [ 0.001360]Probe device 'gate-spi1' with clk-gate [ 0.001370]Probe device 'spi1' with clk-gate [ 0.001380]Probe device 'mux-sdmmc0' with clk-mux [ 0.001390]Probe device 'div-sdmmc0' with clk-divider [ 0.001400]Probe device 'radio-sdmmc0' with clk-ratio [ 0.001410]Probe device 'gate-sdmmc0' with clk-gate [ 0.001420]Probe device 'mux-sdmmc1' with clk-mux [ 0.001430]Probe device 'div-sdmmc1' with clk-divider [ 0.001440]Probe device 'radio-sdmmc1' with clk-ratio [ 0.001450]Probe device 'gate-sdmmc1' with clk-gate [ 0.001460]Probe device 'mux-sdmmc2' with clk-mux [ 0.001470]Probe device 'div-sdmmc2' with clk-divider [ 0.001480]Probe device 'radio-sdmmc2' with clk-ratio [ 0.001490]Probe device 'gate-sdmmc2' with clk-gate [ 0.001500]Probe device 'mux-ledc' with clk-mux [ 0.001510]Probe device 'div-ledc' with clk-divider [ 0.001520]Probe device 'radio-ledc' with clk-ratio [ 0.001530]Probe device 'ledc' with clk-gate [ 0.001540]Probe device 'mux-tpadc' with clk-mux [ 0.001550]Probe device 'gate-tpadc' with clk-gate [ 0.001560]Probe device 'link-tpadc' with clk-link [ 0.001570]Probe device 'mux-de' with clk-mux [ 0.001580]Probe device 'div-de' with clk-divider [ 0.001590]Probe device 'gate-de' with clk-gate [ 0.001600]Probe device 'link-de' with clk-link [ 0.001610]Probe device 'mux-tconlcd' with clk-mux [ 0.001620]Probe device 'div-tconlcd' with clk-divider [ 0.001630]Probe device 'ratio-tconlcd' with clk-ratio [ 0.001640]Probe device 'gate-tconlcd' with clk-gate [ 0.001650]Probe device 'link-tconlcd' with clk-link [ 0.001660]Probe device 'mux-ce' with clk-mux [ 0.001670]Probe device 'div-ce' with clk-divider [ 0.001680]Probe device 'ratio-ce' with clk-ratio [ 0.001690]Probe device 'gate-ce' with clk-gate [ 0.001700]Probe device 'link-ce' with clk-link [ 0.001710]Probe device 'bus-pwm' with clk-gate [ 0.001720]Probe device 'bus-iommu' with clk-gate [ 0.001730]Probe device 'bus-ir-tx' with clk-gate [ 0.001740]Probe device 'bus-gpadc' with clk-gate [ 0.001750]Probe device 'bus-ths' with clk-gate [ 0.001760]Probe device 'bus-spdif' with clk-gate [ 0.001770]Probe device 'bus-dmic' with clk-gate [ 0.001780]Probe device 'bus-audio-codec' with clk-gate [ 0.001790]Probe device 'bus-tpadc' with clk-gate [ 0.001800]Probe device 'bus-tzma' with clk-gate [ 0.001810]Probe device 'bus-uart0' with clk-gate [ 0.001820]Probe device 'bus-uart1' with clk-gate [ 0.001830]Probe device 'bus-uart2' with clk-gate [ 0.001840]Probe device 'bus-uart3' with clk-gate [ 0.001850]Probe device 'bus-uart4' with clk-gate [ 0.001860]Probe device 'bus-uart5' with clk-gate [ 0.001870]Probe device 'bus-i2c0' with clk-gate [ 0.001880]Probe device 'bus-i2c1' with clk-gate [ 0.001890]Probe device 'bus-i2c2' with clk-gate [ 0.001900]Probe device 'bus-i2c3' with clk-gate [ 0.001910]Probe device 'bus-can0' with clk-gate [ 0.001920]Probe device 'bus-can1' with clk-gate [ 0.001930]Probe device 'bus-i2s0' with clk-gate [ 0.001940]Probe device 'bus-i2s1' with clk-gate [ 0.001950]Probe device 'bus-i2s2' with clk-gate [ 0.001960]Probe device 'bus-de' with clk-gate [ 0.001970]Probe device 'bus-di' with clk-gate [ 0.001980]Probe device 'bus-g2d' with clk-gate [ 0.001990]Probe device 'bus-ce' with clk-gate [ 0.002000]Probe device 'bus-ve' with clk-gate [ 0.002010]Probe device 'bus-dma' with clk-gate [ 0.002020]Probe device 'bus-msgbox0' with clk-gate [ 0.002030]Probe device 'bus-msgbox1' with clk-gate [ 0.002040]Probe device 'bus-msgbox2' with clk-gate [ 0.002050]Probe device 'bus-spinlock' with clk-gate [ 0.002060]Probe device 'bus-hstimer' with clk-gate [ 0.002070]Probe device 'bus-dbg' with clk-gate [ 0.002080]Probe device 'bus-dram' with clk-gate [ 0.002090]Probe device 'bus-mmc0' with clk-gate [ 0.002100]Probe device 'bus-mmc1' with clk-gate [ 0.002110]Probe device 'bus-mmc2' with clk-gate [ 0.002120]Probe device 'bus-emac0' with clk-gate [ 0.002130]Probe device 'bus-ohci0' with clk-gate [ 0.002140]Probe device 'bus-ohci1' with clk-gate [ 0.002150]Probe device 'bus-ehci0' with clk-gate [ 0.002160]Probe device 'bus-ehci1' with clk-gate [ 0.002170]Probe device 'bus-otg' with clk-gate [ 0.002180]Probe device 'bus-lradc' with clk-gate [ 0.002190]Probe device 'bus-dpss-top' with clk-gate [ 0.002200]Probe device 'bus-hdmi' with clk-gate [ 0.002210]Probe device 'bus-mipi-dsi' with clk-gate [ 0.002220]Probe device 'bus-tcon-lcd' with clk-gate [ 0.002230]Probe device 'bus-tcon-tv' with clk-gate [ 0.002240]Probe device 'bus-tve-top' with clk-gate [ 0.002250]Probe device 'bus-tve' with clk-gate [ 0.002260]Probe device 'bus-tvd-top' with clk-gate [ 0.002270]Probe device 'bus-tvd' with clk-gate [ 0.002280]Probe device 'bus-ledc' with clk-gate [ 0.002290]Probe device 'bus-csi' with clk-gate [ 0.002300]Probe device 'bus-dsp-cfg' with clk-gate [ 0.002310]Probe device 'bus-riscv-cfg' with clk-gate [ 0.002320]Probe device 'wdg' with clk-link [ 0.002330]Probe device 'reset-f133.0' with reset-f133 [ 0.002340]Probe device 'reset-f133.1' with reset-f133 [ 0.002350]Probe device 'reset-f133.2' with reset-f133 [ 0.002360]Probe device 'reset-f133.3' with reset-f133 [ 0.002370]Probe device 'reset-f133.4' with reset-f133 [ 0.002380]Probe device 'reset-f133.5' with reset-f133 [ 0.002390]Probe device 'reset-f133.6' with reset-f133 [ 0.002400]Probe device 'reset-f133.7' with reset-f133 [ 0.002410]Probe device 'reset-f133.8' with reset-f133 [ 0.002420]Probe device 'reset-f133.9' with reset-f133 [ 0.002430]Probe device 'reset-f133.10' with reset-f133 [ 0.002440]Probe device 'reset-f133.11' with reset-f133 [ 0.002450]Probe device 'reset-f133.12' with reset-f133 [ 0.002460]Probe device 'reset-f133.13' with reset-f133 [ 0.002470]Probe device 'reset-f133.14' with reset-f133 [ 0.002480]Probe device 'reset-f133.15' with reset-f133 [ 0.002490]Probe device 'reset-f133.16' with reset-f133 [ 0.002500]Probe device 'reset-f133.17' with reset-f133 [ 0.002510]Probe device 'reset-f133.18' with reset-f133 [ 0.002520]Probe device 'reset-f133.19' with reset-f133 [ 0.002530]Probe device 'reset-f133.20' with reset-f133 [ 0.002540]Probe device 'reset-f133.21' with reset-f133 [ 0.002550]Probe device 'reset-f133.22' with reset-f133 [ 0.002560]Probe device 'reset-f133.23' with reset-f133 [ 0.002570]Probe device 'reset-f133.24' with reset-f133 [ 0.002580]Probe device 'reset-f133.25' with reset-f133 [ 0.002590]Probe device 'reset-f133.26' with reset-f133 [ 0.002600]Probe device 'reset-f133.27' with reset-f133 [ 0.002610]Probe device 'reset-f133.28' with reset-f133 [ 0.002620]Probe device 'reset-f133.29' with reset-f133 [ 0.002630]Probe device 'reset-f133.30' with reset-f133 [ 0.002640]Probe device 'reset-f133.31' with reset-f133 [ 0.002650]Probe device 'reset-f133.32' with reset-f133 [ 0.002660]Probe device 'reset-f133.33' with reset-f133 [ 0.002670]Probe device 'reset-f133.34' with reset-f133 [ 0.002680]Probe device 'reset-f133.35' with reset-f133 [ 0.002690]Probe device 'reset-f133.36' with reset-f133 [ 0.002700]Probe device 'reset-f133.37' with reset-f133 [ 0.002710]Probe device 'irq-f133.0' with irq-f133 [ 0.002720]Probe device 'irq-f133-gpio.0' with irq-f133-gpio [ 0.002730]Probe device 'irq-f133-gpio.1' with irq-f133-gpio [ 0.002740]Probe device 'irq-f133-gpio.2' with irq-f133-gpio [ 0.002750]Probe device 'irq-f133-gpio.3' with irq-f133-gpio [ 0.002760]Probe device 'irq-f133-gpio.4' with irq-f133-gpio [ 0.002770]Probe device 'irq-f133-gpio.5' with irq-f133-gpio [ 0.002780]Probe device 'gpio-f133.0' with gpio-f133 [ 0.002790]Probe device 'gpio-f133.1' with gpio-f133 [ 0.002800]Probe device 'gpio-f133.2' with gpio-f133 [ 0.002810]Probe device 'gpio-f133.3' with gpio-f133 [ 0.002820]Probe device 'gpio-f133.4' with gpio-f133 [ 0.002830]Probe device 'gpio-f133.5' with gpio-f133 [ 0.002880]Probe device 'dma-f133.0' with dma-f133 [ 0.002930]Probe device 'adc-f133.0' with adc-f133 [ 0.002940]Probe device 'ce-f133-timer.0' with ce-f133-timer [ 0.000024]Probe device 'cs-f133-timer.0' with cs-f133-timer [ 0.005672]Probe device 'uart-16550.0' with uart-16550 [ 0.011100]Probe device 'uart-16550.1' with uart-16550 [ 0.016474]Probe device 'uart-16550.2' with uart-16550 [ 0.021847]Probe device 'uart-16550.3' with uart-16550 [ 0.027216]Probe device 'uart-16550.4' with uart-16550 [ 0.032340]Probe device 'uart-16550.5' with uart-16550 [ 0.037692]Probe device 'i2c-f133.0' with i2c-f133 [ 0.042678]Probe device 'i2c-f133.1' with i2c-f133 [ 0.047460]Probe device 'i2c-f133.2' with i2c-f133 [ 0.052448]Probe device 'i2c-f133.3' with i2c-f133 [ 0.057472]Probe device 'spi-f133.0' with spi-f133 [ 0.062471]The spi nor flash '0x321000' is not yet supported [ 0.068080]Fail to probe device with blk-spinor [ 0.082332]SD/MMC card at the 'sdhci-f133.0' host controller: [ 0.088248] Attached is a SD card [ 0.091637] Version: 2.0 [ 0.094244] Capacity: 121.000MB [ 0.097599] CID: BA677353-444E3147-3800A800-3D0153D1 [ 0.102634] CSD: 007F0032-535A803C-6EBBFF9F-16800035 [ 0.107661] Max transfer speed: 25000000 HZ [ 0.111907] Manufacturer ID: BA [ 0.115114] OEM/Application ID: 6773 [ 0.118754] Product name: 'SDN1G' [ 0.122299] Product revision: 3.8 [ 0.125835] Serial no: 3154091798 [ 0.129223] Manufacturing date: 2021.3 [ 0.134138]Found mbr partition: [ 0.137325] 0x0000000000000000 ~ 0x00000000078fffff 121.000MB - sdhci-f133.0.sdcard [ 0.145059] 0x0000000000800000 ~ 0x00000000061fffff 90.000MB - sdhci-f133.0.sdcard.p0 [ 0.153032] 0x0000000006200000 ~ 0x00000000078fffff 23.000MB - sdhci-f133.0.sdcard.p1 [ 0.160991]Probe device 'sdhci-f133.0' with sdhci-f133 [ 0.166596]Probe device 'rtc-f133.0' with rtc-f133 [ 0.171351]Probe device 'wdg-f133.0' with wdg-f133 [ 0.176079]Probe device 'ldoa' with regulator-f133-ldo [ 0.181428]Probe device 'ldob' with regulator-f133-ldo [ 0.186556]Probe device 'led-gpio.0' with led-gpio [ 0.191321]Probe device 'ledtrigger-heartbeat.0' with ledtrigger-heartbeat [ 0.214298]Fail to probe device with ts-gt911 [ 0.220441]Probe device 'fb-f133-rgb.0' with fb-f133-rgb [ 0.225924]Probe device 'console-uart.0' with console-uart [ 0.232563]mount /private with 'ram' filesystem Press any key to stop auto boot: 0.000 xboot: /# xboot: /# ls application boot framework mnt private storage sys tmp xboot: /# ls -laa ls: cannot access /-laa: No such file or directory xboot: /# ls -la ls: cannot access /-la: No such file or directory xboot: /# ls -l drwxr-xr-x root root 0 application drwxr-xr-x root root 0 boot drwxr-xr-x root root 0 framework drwxr-xr-x root root 0 mnt drwxr-xr-x root root 0 private drwxr-xr-x root root 0 storage drwxr-xr-x root root 0 sys drwxr-xr-x root root 0 tmp ```    - 发现 xboot 可以运行,并且有个 shell 终端 ## 小结 - 这里初步了解到 xboot,可以在 全志 F133上跑起来(烧写到 ddr中),接下来研究如何把 xboot.bin ,烧写到 柿饼派M7的板载 SD卡中,并且开机正常启动 - 后面研究RT-Thread、rt-smart在 柿饼派M7 上的移植与运行
2
条评论
默认排序
按发布时间排序
登录
注册新账号
关于作者
张世争
学以致用
文章
132
回答
818
被采纳
179
关注TA
发私信
相关文章
1
PersimmonUI M7 大屏使用求助
2
求助全志D1S&RDC纪念版资料以及RTSMART移植教程
3
D1S scons编译
4
D1s M7工具链求寻
5
全志D1运行RT-Thread在烧录程序时异常
6
rtthread d1s编译报错
7
目前最新版的userapps如何安装D1s环境
8
[SOLVED] Not compiled for Allwinner D1H
9
导入bsp\allwinner\d1sb出错
10
[SOLVED] Allwinner D1H USB host
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
cubemx
UART
ESP8266
WIZnet_W5500
BSP
ota在线升级
PWM
flash
packages_软件包
freemodbus
潘多拉开发板_Pandora
ADC
GD32
定时器
flashDB
编译报错
keil_MDK
socket
中断
rt_mq_消息队列_msg_queue
Debug
ulog
SFUD
msh
C++_cpp
at_device
本月问答贡献
出出啊
1524
个答案
343
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
818
个答案
179
次被采纳
crystal266
555
个答案
162
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
出出啊
1
篇文章
3
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
10
次点赞
crystal266
2
篇文章
1
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
投诉
建议
回到
底部