<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                * 導師視頻講解:[**去聽課**](https://www.bilibili.com/video/BV1k34y1D7Vz?p=3) >[success] **技術支持說明:** >**1**.一般以自主學習為主 > **2**.可到官方問答社區中提問:[**去提問**](https://bbs.csdn.net/forums/zigbee) > **3**.工程師**會盡快**解答社區問題,但他們是一線開發,【**難以保證**】解答時效,解答辛苦,感謝理解! <br/> ## **新建源碼文件夾** 在保存工作空間和工程的目錄下,新建一個code文件夾,用于保存源碼,如圖所示。 ![](https://img.kancloud.cn/a6/37/a637857a35da07eec6039d937d32fee9_315x263.png =200x) ### 依次選擇File和New File,新建源代碼文件,如圖所示。 ![](https://img.kancloud.cn/0b/d6/0bd6de79c35629eb537f0821876d558e_419x706.png =300x) ### 新建源代碼文件成功,如圖所示。 ![](https://img.kancloud.cn/a9/eb/a9ebec2e6182f7a171a98e7cf6e9373d_1110x704.png =600x) ### 點擊Save按鈕,保存源文件,如圖所示。 ![](https://img.kancloud.cn/1e/8a/1e8adfeba9d4a49efa62c2ec9f8fa77e_415x463.png =300x) ### 選擇源文件保存目標,并把源文件命名為main.c,然后點擊保存,如圖所示。 ![](https://img.kancloud.cn/d5/64/d564201b8341010d1112791f0f692418_944x595.png =400x) <br/> ## **添加源文件到工程中** 鼠標右擊工程名稱,然后依次選擇Add和AddGroup,新建一個組,如圖所示。 ![](https://img.kancloud.cn/5b/68/5b68557bb4386fbdcc3e1195f11e6fc4_600x709.png =400x) ### 設置組名稱為Main,然后點擊OK,如圖所示。 ![](https://img.kancloud.cn/03/db/03db82868b7cc3502b7ff0a424af2988_387x148.png =300x) ### 鼠標右擊新建的組,依次選擇Add和Add "main.c",在組中添加新建的源文件,如圖所示。 ![](https://img.kancloud.cn/84/14/8414cab06d3c34a17334717dd86d52be_618x708.png =400x) ### 添加源文件成功后,如圖所示。 ![](https://img.kancloud.cn/46/6d/466d8229a0e7a80dad6fba4f01763be3_415x464.png =350x) <br/> ## **編寫一個簡單的測試程序** 添加好main.c后,可以在mian.c添加如下代碼: ``` #include "ioCC2530.h" #include <stdio.h> void main() { printf("Hello World!\r\n"); while(1){}//無限循環 } ``` <br/> ## **設置字體和行號** 可以根據個人喜好來設置代碼字體和行號,依次選擇Tools和Options,打開設置,如下圖所示。 ![](https://img.kancloud.cn/19/7f/197fdd9ee5e68e08b9b802af805a6dd1_620x328.png =400x) ### 依次選擇Editor、Colors and Font,然后點擊Font...,最后選擇字體,如圖所示。 ![](https://img.kancloud.cn/79/4a/794a7b54cccc526e6159060d92da649e_974x663.png =600x) ### 選擇Editor,然后勾選Show line numbers,顯示行號,如圖所示。 ![](https://img.kancloud.cn/0f/05/0f059b54247064fdb1b759f503901cb3_975x660.png =600x) <br/> ## **工程配置** 添加好源代碼后,需要配置一下工程后才能編譯。鼠標右擊工程名稱,然后選擇Options...,如圖所示。 ![](https://img.kancloud.cn/62/65/626508c3f2421723c4e5b30ac49ba0e3_701x516.png =400x) <br/> **基礎配置** 可以根據所使用的ZigBee芯片型號來進行配置,這里以CC2530F256為例講解配置過程。依次選擇General Options、Target、Device和Texas Instruments,如圖所示。 ![](https://img.kancloud.cn/30/41/304116e865ac396c7f77736bd5d16341_967x948.png =500x) ### 依次選擇CC25xx、3x和CC2530F256,如圖所示。 ![](https://img.kancloud.cn/d0/f3/d0f3e169163cb0a1f279e7c079dab1fa_787x267.png =300x) ### 確認配置沒有問題后,點擊OK,如圖所示。 ![](https://img.kancloud.cn/93/1a/931aded1839ec8b7f7029151bec770e4_811x668.png =600x) ### 選擇Stack/Heap,配置數據段XDATA的大小為1FF,如圖所示。 ![](https://img.kancloud.cn/15/87/1587121f27477b684856cf54004f2f1c_808x668.png =600x) <br/> **鏈接和輸出配置** 依次選擇Linker和Config,然后選lnk51ew_cc2530f256_banked.xcl,如圖所示。 ![](https://img.kancloud.cn/ab/3e/ab3e8fd6a7a60338a8a6fdf583683567_826x675.png =600x) ### 選擇Output,按如圖所示配置。 ![](https://img.kancloud.cn/95/10/95107a2b9b096e24a249f68e0848aeff_826x675.png =600x) ### 選擇Extra Output,按如圖所示配置。 ![](https://img.kancloud.cn/50/6e/506ee3830fa52b291379df939fe18fa7_813x670.png =600x) ### 選擇Debugger,在Driver中選擇Texas Instruments,如圖所示。 ![](https://img.kancloud.cn/fa/54/fa5432015d2910985d79856ae84ff9c1_850x670.png =600x) <br/> ## **編譯鏈接工程** 配置完成后,可以編譯鏈接工程。鼠標右擊工程名字,然后選擇Rebuild All,重新編譯鏈接整個工程,如圖所示。 ![](https://img.kancloud.cn/ae/4f/ae4f863703b8e7183bf7d4fc6bee38f0_773x597.png =500x) ### 可以在如圖所示位置查看編譯鏈接結果。 ![](https://img.kancloud.cn/29/33/29334791d4afea4bded6e64072134f75_777x1029.png =500x) <br/> <br/> ## **商務合作** 如有以下需求,可掃碼添加管理員好友,注明“**商務合作**” * 項目定制開發,技術范圍:**NB-IoT**、**CATn(4G)**、**WiFi**、**ZigBee**、**BLE Mesh**以及**STM32**、**嵌入式Linux**等; * 入駐平臺,成為講師; * 接項目賺外快; * 善學坊官網:[www.sxf-iot.com](https://www.sxf-iot.com/) ![](https://img.kancloud.cn/ca/73/ca739f92cab220a3059378642e3bd502_430x430.png =200x) * 非合作**勿擾**,此處**非**技術支持
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看