eclispe添加GD32E23x库

  1. GD官网下载GD32E23x库
    在这里插入图片描述
    整理在一个文件夹中
    在这里插入图片描述
    在这里插入图片描述
  2. 更新库目录
    Eclipse软件在点击在这里插入图片描述
    后,出现无法下载的PDSC文件,这里选择Ignore All快速完成所有可以下载的pdsc文件。
    在这里插入图片描述
    这些PDSC文件的地址保存index.pidx中
    从https://www.keil.com/pack/index.pidx下载index.pidx,
    index.pidx文件部分内容

在这里插入图片描述
index.pidx文件可能是保存在内存中,在.cache中没有保存。
然后按照index.pidx中PDSC的网络地址挨个下载PDSC文件,下载完一个生成 .*.size文件,用来标记PSDC文件大小。
eclispe下载完所有pdsc文件后,读取所有PSDC文件,提取部分信息写入到
.content_https___www_keil_com_pack_index_pidx.xml,并解析该文件和CMSIS-Packs下已安装的库(包括自己解压缩的库),在界面就可以看到已安装的库了。

注:断网状态下更新库目录,
.content_https___www_keil_com_pack_index_pidx.xml内容会被清空。

  1. 更改.content_https___www_keil_com_pack_index_pidx.xml文件
    在其中添加如下:
   <package name="GD32E23x_DFP">
        <description>GigaDevice GD32E23x Series Device Support and Examples</description>
        <versions>
          <version name="1.0.0">
            <description>update GD32E23x firmware .</description>
            <properties>
              <property name="type">cmsis.pack</property>
              <property name="vendor.name">GigaDevice</property>
              <property name="pack.name">GD32E23x_DFP</property>
              <property name="version.name">1.0.0</property>
              <property name="archive.url">http://gd32mcu.com/data/documents/pack/GigaDevice.GD32E23x_DFP.1.0.0.pack</property>
              <property name="archive.name">GigaDevice.GD32E23x_DFP.1.0.0.pack</property>
              <property name="archive.size">392970</property>
              <property name="dest.folder">GigaDevice/GD32E23x_DFP/1.0.0</property>
              <property name="pdsc.name">GigaDevice.GD32E23x_DFP.pdsc</property>
              <property name="date">2019-03-15</property>
            </properties>
            <outline>
              <keyword name="GigaDevice" />
              <keyword name="Device Support" />
              <keyword name="GD32E23x" />
              <devicefamily name="GD32E23x Series">
                <description>GD32 is a new 32-bit high performance, low power consumption universal microcontroller family powered by the ARM Cortex-M4 RISC core,which targeted at various MCU application areas.
GD32 family integrates features to simplify system design and provide customers wide range of comprehensive and superior cost effective MCU portfolios with proven technology and great innovation.
GD32 family includes entry line, performance line and connectivity line currently.</description>
                <property name="vendor.name">GigaDevice</property>
                <property name="vendor.id">123</property>
              </devicefamily>
              <component name="Device / GD32E23x_StdPeripherals / ADC">
                <description>Analog-to-digital converter (ADC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / BKP">
                <description>Backup register(BKP) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / CAN">
                <description>Controller Area Network (CAN) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / CRC">
                <description>Cyclic Redundancy Check (CRC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / CTC">
                <description>Clock trim controller (CTC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / DAC">
                <description>Digital-to-analog converter (DAC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / DBG">
                <description>Debug (DBG) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / DMA">
                <description>Direct Memory Access (DMA) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / EXMC">
                <description>External memory controller(EXMC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / EXTI">
                <description>External Interrupt/Event (EXTI) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / FMC">
                <description>Flash Memory Controller (FMC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / FWDGT">
                <description>Free watchdog timer(FWDGT) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / GPIO">
                <description>General-purpose and Alternate-function I/Os (GPIO) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / I2C">
                <description>Inter-integrated Circuit (I2C) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / MISC">
                <description>MISC driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / PMU">
                <description>Power Managment Unit(PMU) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / RCU">
                <description>Reset and Clock Control (RCU) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / RTC">
                <description>Real-time Clock (RTC) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / SPI_I2S">
                <description>Serial Peripheral Interface / Inter-IC Sound (SPI_I2S) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / TIMER">
                <description>TIMER driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / USART">
                <description>Universal Synchronous Asynchronous Receiver Transmitter (USART) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / GD32E23x_StdPeripherals / WWDGT">
                <description>Window Watchdog Timer (WWDGT) driver for GD32E23x Devices</description>
              </component>
              <component name="Device / EVAL / GD32E23x">
                <description>Firmware functions to manage Leds, Keys, COM ports</description>
              </component>
              <component name="Device / GD32E23x_libopt">
                <description>Configuration file</description>
              </component>
              <component name="Device / Startup">
                <description>System Startup for GigaDevice GD32E23x  Devices</description>
              </component>
            </outline>
          </version>
        </versions>
      </package>  

把修改后的.content_https___www_keil_com_pack_index_pidx.xml放到 .cache文件夹中
在这里插入图片描述
错误步骤:
不要自己解压缩库放在CMSIS-Packs文件夹中,这样虽然可以看到已安装
在这里插入图片描述
但是在工程的属性中,查看device是看不到库的,因为没有install过程,.installed_devices_boards_books.xml中没有记录已安装的库。
正确步骤:
把以下文件复制到 .cache文件夹中,右击install。
在这里插入图片描述
在这里插入图片描述
在device中查看,已经添加好了。我们看到实际device中查看实际是根据.content_https___www_keil_com_pack_index_pidx.xml和CMSIS-Packs存放的PDSC文件,完成检索。
eclipse Console显示信息如下:

Extracting devices & boards... 
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\Keil\STM32L0xx_DFP\2.1.0\Keil.STM32L0xx_DFP.pdsc"...
Completed in 19ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\Keil\STM32F0xx_DFP\2.1.0\Keil.STM32F0xx_DFP.pdsc"...
Completed in 13ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F20x_DFP\2.1.0\GigaDevice.GD32F20x_DFP.pdsc"...
Completed in 4ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F1x0_DFP\3.2.0\GigaDevice.GD32F1x0_DFP.pdsc"...
Completed in 6ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F3x0_DFP\2.0.0\GigaDevice.GD32F3x0_DFP.pdsc"...
Completed in 3ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F30x_DFP\2.0.0\GigaDevice.GD32F30x_DFP.pdsc"...
Completed in 4ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32E10x_DFP\1.0.3\GigaDevice.GD32E10x_DFP.pdsc"...
Completed in 3ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\Keil\STM32F1xx_DFP\2.3.0\Keil.STM32F1xx_DFP.pdsc"...
Completed in 11ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F4xx_DFP\2.0.0\GigaDevice.GD32F4xx_DFP.pdsc"...
Completed in 5ms.
Parsing PDSC file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\GigaDevice\GD32F10x_DFP\2.0.2\GigaDevice.GD32F10x_DFP.pdsc"...
Completed in 5ms.
Processed 10 packages, found 622 devices, 10 boards.
Writing cache file "C:\Users\xxx\AppData\Roaming\CMSIS-Packs\.cache\.installed_devices_boards_books.xml".
Completed in 102ms.

在这里插入图片描述
库安装好之后,debug时可以看到外设的寄存器。
4. 以后就不能再随意更新库目录了
会把.content_https___www_keil_com_pack_index_pidx.xml还原掉。
在这里插入图片描述
实际实验更新过后,之前安装好的库,因为
.content_https___www_keil_com_pack_index_pidx.xml文件改变后库目录和device中查看都已看不到。
在这里插入图片描述
但是Devices里没有了。
在这里插入图片描述
在CMSIS Packs中Remove后再install后,发现又回来了。
在这里插入图片描述

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值