【Silicon Labs 开发套件评测】+DEMO程序的下载
本帖最后由 cjjh2014 于 2021-7-27 07:20 编辑<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"> <font face="宋体">昨天在安装</font></span></span><b><span style="font-size:16.0000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="font-weight:bold"><span style="font-style:normal"><font face="宋体">Silicon Labs</font></span></span></span></span></span></span></span></b><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">公司的</font> <font face="Calibri">simplicity studio 5</font><font face="宋体">软件后因进入官网下载例程而出现错误,今天来分享下解决的办法基本用法,因是在初次安装后就出现那种无法下载例程,且软件提示是注册异常。所以本人就直接将原来的软件删除,然后重新下载软件,在安装之前需要将之前安装过的所有信息删掉,以免后患。</font><font face="Calibri">C</font><font face="宋体">盘里里的文档位置有一份隐藏的</font><font face="Calibri">SS5</font><font face="宋体">文件这个也要找到删除。然后就是重新安装软件,安装过程如前一篇报告步骤一致,无区别。</font></span></span></span></span></p>
<p> <span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">安装后,需要测试</font><font face="Calibri">SS5</font><font face="宋体">是否安装成功而无问题,最简单的测试就是去官网下载个常规程序,进行编译及下载到</font><font face="Calibri">DEMO</font><font face="宋体">里,只要</font><font face="Calibri">DEMO</font><font face="宋体">里显示正确的功能,则基本上可以判定软件与硬件功能正常。在官网例程中比较简单的一个例程就是通过控制</font><font face="Calibri">MCU</font><font face="宋体">产生</font><font face="Calibri">PWM</font><font face="宋体">波来实现呼吸灯效果。</font></span></span></span></span></p>
<p> <span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">首先打开软件,显示如下。</font></span></span></span></span></p>
<p> <span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">打开软件后将</font><font face="Calibri">DEMO</font><font face="宋体">通过</font><font face="Calibri">USB</font><font face="宋体">连接到电脑,在软件里的</font><font face="Calibri">W</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri">elcom to simplicity studio </span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">选页里自动识别并显示</font><font face="Calibri">DEMO</font><font face="宋体">的型号信息</font><font face="Calibri">,</font><font face="宋体">然后选择 </font><font face="Calibri">Start.</font></span></span></span></span></p>
<p> <span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">接着就是选择</font><font face="Calibri">CREATE</font><font face="宋体">,创建一个工程,如下图所示,将例程序放置在你需要放置的地方。</font></span></span></span></span></p>
<p> </p>
<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在软件组成那一栏菜单里,可以查后到例程的程序。</font></span></span></span></span></p>
<p style="text-indent:21.0000pt; text-align:justify"> </p>
<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">接着就是对例程进行编译,如下图箭头所示位置的。</font></span></span></span></span></p>
<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">对DEMO程序进行编译成功后显示下图信息:,主要看结果的错误及警告等信息。</font></span></span></span></span></p>
<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">最后就是下载到</font><font face="Calibri">DEMO</font><font face="宋体">里,看</font><font face="Calibri">LED</font><font face="宋体">灯的显示效果了是否与我们所需要的效果。</font></span></span></span></span></p>
<p style="text-indent:21.0000pt; text-align:justify"></p>
<p>下面就展示下实际的效果:</p>
<p></p>
<p>下面就是程序内容:</p>
<p>#include "sl_component_catalog.h"<br />
#include "sl_system_init.h"<br />
#include "app.h"<br />
#if defined(SL_CATALOG_POWER_MANAGER_PRESENT)<br />
#include "sl_power_manager.h"<br />
#endif<br />
#if defined(SL_CATALOG_KERNEL_PRESENT)<br />
#include "sl_system_kernel.h"<br />
#else // SL_CATALOG_KERNEL_PRESENT<br />
#include "sl_system_process_action.h"<br />
#endif // SL_CATALOG_KERNEL_PRESENT</p>
<p>int main(void)<br />
{<br />
// Initialize Silicon Labs device, system, service(s) and protocol stack(s).<br />
// Note that if the kernel is present, processing task(s) will be created by<br />
// this call.<br />
sl_system_init();</p>
<p> // Initialize the application. For example, create periodic timer(s) or<br />
// task(s) if the kernel is present.<br />
app_init();</p>
<p>#if defined(SL_CATALOG_KERNEL_PRESENT)<br />
// Start the kernel. Task(s) created in app_init() will start running.<br />
sl_system_kernel_start();<br />
#else // SL_CATALOG_KERNEL_PRESENT<br />
while (1) {<br />
// Do not remove this call: Silicon Labs components process action routine<br />
// must be called from the super loop.<br />
sl_system_process_action();</p>
<p> // Application process.<br />
app_process_action();</p>
<p>#if defined(SL_CATALOG_POWER_MANAGER_PRESENT)<br />
// Let the CPU go to sleep if the system allows it.<br />
sl_power_manager_sleep();<br />
#endif<br />
}<br />
#endif // SL_CATALOG_KERNEL_PRESENT<br />
}</p>
<p> 看main()里面的大循环,跟RSL10的Event Kernel有点像.</p>
<p>也是采用eclipse的IDE;</p>
页:
[1]