Background: In the panel accidentally sent the package can apply for December 19, 2019 GD32VF103 free evaluation development board, overjoyed; before this major technology forum said that they have something MCU-made Zhao Yi innovative RISCV instruction set release, For a time gearing up to buy a development board I would like to come back to experience the difference between my heavenly own production MCU and foreign goods, and look forward to domestic self-reliance that day, for no other reason just to see when the technical documentation is not so tired. Here I set up the hardware, engineering, and firmware libraries and basic aspects of using a debugger such as rough to talk about my views on this made the MCU, in order to initiate a personal level because of the limited evaluation process will inevitably inappropriate and even wrong place, great God criticism please correct me.
First, hardware articles:
1, the preview box, such as evaluation of other underlying white leopard valgus box, two buffer flimsy film, two white lines of data, the development of a blue plate. Packing a bit simple, but for a focus on technology rather than the appearance of the people is enough.
2, the development board preview, the official provided detailed information on the development board schematics, instruction manual hardware, firmware, manuals, first on the map, I marked a moment alone development board various functional modules, development boards almost onboard All functions of the allegations contained in the IC, alone leads to more than 80 IO port of the control IC available, so when you start with this development board debugger even do not have to purchase, on-board debugger official to meet you all the requirements.
3, simple and sophisticated board design, each functional module is marked with a character description, glance, raising his hand to see that this is what function, again with schematics official even entry-level players can easily find out.
4, this control IC development board using Zhao Yi innovative self-developed domestic MCU instruction set-based RISC-V, this is also the Zhao Yi MCU innovation currently the only RISC-V series chips, and board GD32VF103VBT6 is contained in its series with the highest industrial-grade chips.
Second, the development environment chapter
1、了解完开发板的基本情况之后在来看看该开发板所使用的IDE,毕竟没有好的开发环境再好的硬件配置想轻松使用起来也是让人头疼的一件事情,由于GD32VF103系列芯片使用的是芯来科技提供的代号为《Bumblebee》IP内核,所以开发环境需要到芯来科技官网下载下,芯来科技。
2、官方只提供了基于windows的集成开发环境,其他系统的用户只能自己搭建开发环境了。该IDE也是基于一个开源项目Eclipse,官方已经配置好了一切的一切。也就是说你下载下来IDE只需要做的工作量几乎为零,不像IAR,Keil等要配置好多东西。
4、关于怎样建立一个工程,官方已经提供了非常详细的手册,这里我就不复述了,文章末尾会附上相应的配置文件,根据配置文件就可以建立一个工程,事实上实际的建立 一个工程远比官方文档说明的要简单的多。我们自己需要配置环境的步骤少,这样可以把更多的精力放在怎样去编写代码。
三、官方固件篇
1、使用IDE建好一个工程之后我们面临的一个问题就是写代码,现在的MCU由于集成了更多的内部资源,如果像51单片机那样直接去操作寄存器那简直是不敢想的一件折磨人的事情,为此GD和一线国际大厂ST的一样为芯片提供了完善的固件库,加快了用户的开发进度。
2、使用过ST单片机的同学都知道ST有一个非常完善的标准固件库,并且在相对高端的MCU推出了更完善的HAL库,方便在不同产品上的代码移植工作,GD也是一样提供了一个标准的固件库,估计在日后产品线更加丰富之后也能推出类似HAL的固件库,下面我们来对比ST的标准固件库来了解一下GD的固件库。
3、提供固件库之后最重要的事需要有一个固件库的说明和相应的编程手册,这方面ST和GD做的都非常棒,提供了完善的资料,重要的区别是GD提供的是官方编写的中文版资料,ST的大多是技术爱好者自行翻译的中文(英文的对于大多数国人来说晦涩难懂),这就造成因为翻译的问题导致有些细节的地方不准确。
4、不论是ST还是GD的开发流程都大同小异,比如说一个端口的初始化都是一样的,其中一个的区别就是,GD初始化采用的是函数的方式,ST采用的是结构体的方式,比如说官方提供的COM初始化的函数就能看出来,每一个步骤都对应一个函数,而ST的是先配置一个结构体,然后用一个init的函数来完成初始化。
5、除了以上编程思维方面的区别其他的感觉一样,用过ST的同学想上手GD是一件很容易的事情。
四、调试篇
1、之前说过了开发板自带调试器也预留了JlTAG调试接口,对于没有JLink调试器的同学,板载的完全就够了,在建立完工程之后都不用配置调试器,直接点击那个小蜘蛛按钮就可以进行调试。
2、关于调试给我的感觉就是,调试速度慢,由于我没有JTAG调试器不知道是板载调试器的问题还是调试软件优化的问题,打上断点之后命中速度比较慢。另外一个好的地方就是借助Eclipse的强大和调试器的配合可以很方便的看到内存寄存器的状态。