Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    为方便大家研究全志RISCV D1芯片,花了点时间编写了一个精简版的裸机程序,方便大家学习参考。

    D1系列-RISC-V
    1
    1
    382
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tripod9 LV 5 last edited by

      研究RISCV D1芯片已经一个月有余了,中间为了方便开发,也开发了一个烧写工具xfel,为方便大家研究学习,这里编写了一个简化的裸机程序,供大家参考,实现比较简单,但该有的都有了。(从xboot精简而来,想要研究高阶功能,就去参考xboot源码树)

      在DDR中运行d1-baremetal.bin,这种方式比较适合快速开发调试。借助xfel工具就可以实现。

      sudo xfel ddr ddr3;sudo xfel write 0x40000000 d1-baremetal.bin;sudo xfel exec 0x40000000;
      

      烧写d1-baremetal.bin到spi nor flash,固化程序到spi nor flash, 然后上电,自动实现初始化ddr,并自拷贝到ddr中运行。

      sudo xfel spinor write 0 d1-baremetal.bin
      
      

      程序正确运行后,会打印如下信息

      D1 baremetal
      count = 0
      count = 1
      count = 2
      count = 3
      count = 4
      count = 5
      count = 6
      count = 7
      count = 8
      count = 9
      count = 10
      count = 11
      count = 12
      count = 13
      count = 14
      count = 15
      count = 16
      

      D1-babaremetal.7z

      一些参考链接
      https://github.com/xboot/xfel
      https://github.com/xboot/xboot

      1 Reply Last reply Reply Quote Share -1
      • Referenced by  Kirin Kirin 
      • 1 / 1
      • First post
        Last post

      Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策