设为首页 加入收藏

TOP

沁恒 CH32V208(三): CH32V208 Ubuntu22.04 Makefile VSCode环境配置(三)
2023-07-23 13:25:38 】 浏览:68
Tags:沁恒 CH32V208 Ubuntu22.04 Makefile VSCode
ac_zicsr, 参考 https://www.blaatschaap.be/on-riscv-bare-metal-toolchains/.
  • 需要增加 _lseek, _close, _isatty 这些函数, 否则编译会报错.
  • 注释掉 __attribute__((interrupt("WCH-Interrupt-fast"))), 这个中断类型在社区版 GCC 中无法识别
  • 避免使用预编译的 .a 库文件, 用到库文件的地方会工作不正常
  • 仓库地址: https://github.com/Seneral/riscv-openocd-wch

    这个验证过能编译, 编译命令

    git clone https://github.com/Seneral/riscv-openocd-wch.git
    cd riscv-openocd-wch/
    git submodule update --init --recursive
    ./bootstrap 
    ./configure --disable-jlink --enable-wlink --disable-werror
    make -j8
    ./src/openocd --version
    

    和沁恒提供的 openocd 的对比

    riscv-openocd-wch$ ./src/openocd --version
    Open On-Chip Debugger 0.11.0+dev-g395b49ca4 (2023-05-04-00:35)
    Licensed under GNU GPL v2
    For bug reports, read
    	http://openocd.org/doc/doxygen/bugs.html
    
    riscv-openocd-wch$ /opt/openocd/wch-openocd-v1.70/bin/openocd --version
    Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-02-22-15:09)
    Licensed under GNU GPL v2
    For bug reports, read
    	http://openocd.org/doc/doxygen/bugs.html
    

    如果用这个仓库代码编译的openocd下载, 要使用沁恒定制的V1.60版本的openocd的cfg, V1.60对应的编程器名称是wlink, 在V1.70里改名为wlinke了.

    首页 上一页 1 2 3 4 下一页 尾页 3/4/4
    】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
    上一篇简单交叉编译学习 下一篇关于汽车电子NVM的笔记

    最新文章

    热门文章

    Hot 文章

    Python

    C 语言

    C++基础

    大数据基础

    linux编程基础

    C/C++面试题目