查看: 432|回复: 0
收起左侧

[IDE] ArchLinux 下使用 MounRiver Studio 社区版开发

[复制链接]

  离线 

  • TA的每日心情
    拍拍
    2022-10-3 08:50
  • 签到天数: 1 天

    [LV.1]

    发表于 2022-11-6 10:15:58 | 显示全部楼层 |阅读模式

    有人预言,RISC-V或将是继Intel和Arm之后的第三大主流处理器体系。欢迎访问全球首家只专注于RISC-V单片机行业应用的中文网站

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    本帖最后由 魏定国 于 2022-11-6 10:15 编辑

    MounRiver Studio 集成开发环境 (社区版)

    将 MounRiver-Studio-Community-Linux 打包到 Arch Linux 的 AUR 仓库
    1. # Maintainer: taotieren
    2. pkgbase=mounriver-studio-community-bin
    3. pkgname=($pkgbase)
    4. pkgver=100
    5. pkgrel=1
    6. arch=('x86_64')
    7. url='http://www.mounriver.com/'
    8. license=('GPL2' 'GPL3' 'custom')
    9. provides=('MounRiver-Studio-Community-Linux')
    10. conflicts=()
    11. depends=()
    12. makedepends=('tar')
    13. optdepends=('ch34x-dkms-git: CH341SER driver with fixed bug'
    14.             'i2c-ch341-dkms: CH341 USB-I2C adapter driver'
    15.             'spi-ch341-usb-dkms: SPI/GPIO driver for CH341'
    16.             'ch341eepromtool: An i2c serial EEPROM programming tool for the WCH CH341A'
    17.             'ch341prog-git: A simple command line tool (programmer) interfacing with ch341a'
    18.             'ch341eeprom-git: A libusb based programming tool for 24xx I²C EEPROMs using the WCH CH341A')
    19. source=("${pkgbase}-${pkgver}.tar.xz::http://file.mounriver.com/upgrade/MounRiver_Studio_Community_Linux_x64_V${pkgver}.tar.xz"
    20.         )
    21. sha256sums=('78509ace8628caa117e0680df8d71e611c8fa3a2e61030d93098d89c43dfcf6f')
    22. options=('!strip')
    23. noextract=(${pkgbase}-${pkgver}.tar.xz)
    24. prepare() {
    25.     tar -xf "${srcdir}/${pkgbase}-${pkgver}.tar.xz" --strip-components=1 -C "${srcdir}/"
    26. }
    27. package_mounriver-studio-community-bin() {
    28.     export LC_CTYPE="zh_CN.UTF-8"
    29.     pkgdesc="为 Eclipse 平台爱好者提供的一款 RISC-V 内核芯片集成开发环境,支持 WCH 系列 MCU 的工程模板、代码编译、下载、调试等功能。 "
    30.     depends=('bash'
    31.              'libftdi-compat'
    32.              'libusb'
    33.              'hidapi'
    34.              'libusb-compat'
    35.              'libudev.so')
    36.     install -dm0755 "${pkgdir}/opt/wch/${pkgname%-bin}/"
    37.     cp -a "${srcdir}"/MRS_Community/* "${pkgdir}/opt/wch/${pkgname%-bin}"
    38.     install -Dm0644 "${srcdir}/beforeinstall/50-wch.rules" "${pkgdir}/usr/lib/udev/rules.d/50-wch-community.rules"
    39.     install -Dm0644 "${srcdir}/beforeinstall/60-openocd.rules" "${pkgdir}/usr/lib/udev/rules.d/60-openocd-wch-community.rules"
    40.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/openocd-wch-community-arm" << EOF
    41. #!/bin/env bash
    42. exec /opt/wch/${pkgname%-bin}/toolchain/OpenOCD/bin/openocd -f /opt/wch/${pkgname%-bin}/toolchain/OpenOCD/bin/wch-arm.cfg "\$@"
    43. EOF
    44.     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/openocd-wch-community-riscv" << EOF
    45. #!/bin/env bash
    46. exec /opt/wch/${pkgname%-bin}/toolchain/OpenOCD/bin/openocd -f /opt/wch/${pkgname%-bin}/toolchain/OpenOCD/bin//wch-riscv.cfg "\$@"
    47. EOF
    48.     install -Dm0644 /dev/stdin "${pkgdir}/etc/profile.d/${pkgname%-bin}.sh" << EOF
    49. #!/bin/sh
    50. [ -d /opt/wch/${pkgname%-bin}/toolchain/arm-none-eabi-gcc/bin/ ] && append_path '/opt/wch/${pkgname%-bin}/toolchain/arm-none-eabi-gcc/bin/'
    51. [ -d /opt/wch/${pkgname%-bin}/toolchain/RISC-V\ Embedded\ GCC/bin/ ] && append_path '/opt/wch/${pkgname%-bin}/toolchain/RISC-V\ Embedded GCC/bin/'
    52. export PATH
    53. EOF
    54.     install -Dm755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-bin}" << EOF
    55. #!/bin/sh
    56. /opt/wch/${pkgname%-bin}/MounRiver\ Studio_Community "\$@"
    57. EOF
    58.     install -Dm0644 "${pkgdir}/opt/wch/${pkgname%-bin}/icon.xpm" "${pkgdir}/usr/share/icons/${pkgname%-bin}.xpm"
    59.     install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/${pkgname%-bin}.desktop" << EOF
    60. [Desktop Entry]
    61. Name=MounRiver Studio Community
    62. Comment=MounRiver Studio Community
    63. GenericName=MounRiver Studio Community
    64. Exec=env GDK_BACKEND=x11 ${pkgname%-bin} %F
    65. Icon=${pkgname%-bin}.xpm
    66. Path=/opt/wch/${pkgname%-bin}/
    67. Terminal=false
    68. StartupNotify=true
    69. Type=Application
    70. Categories=Development;RISC-V;ARM;
    71. EOF
    72. }
    73. # vim: ts=4 sw=4 et
    复制代码

    已经上传到 AUR 仓库:https://aur.archlinux.org/packages/mounriver-studio-community-bin
    提供如下的包
    1. yay -S mounriver-studio-community-bin
    复制代码
    使用 Arch 的包管理器,进行安装卸载更新等。用户只需要一条命令行即可解决。

    其他 Linux 发行版可以参考 PKGBUILD 的内容就行移植。
    GD32VF 单片机芯片及应用-[IDE] ArchLinux 下使用 MounRiver Studio 社区版开发risc-v单片机中文社区(1)






    上一篇:【Arch Linux】安装 Nuclei Studio IDE 的 AUR 包
    下一篇:[IDE] ArchLinux 下使用 MounRiver 工具链开发
    RISCV作者优文
    全球首家只专注于RISC-V单片机行业应用的中文网站
    回复

    使用道具 举报

    高级模式
    B Color Image Link Quote Code Smilies

    本版积分规则

    关闭

    RISC-V单片机中文网上一条 /2 下一条



    版权及免责声明|RISC-V单片机中文网 |网站地图

    GMT+8, 2024-4-26 00:03 , Processed in 0.697533 second(s), 49 queries .

    快速回复 返回顶部 返回列表