<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應用 > 【32位MCU】9G-CM0 新唐CM0+MDK-ARM入門開發(fā)過程簡介

          【32位MCU】9G-CM0 新唐CM0+MDK-ARM入門開發(fā)過程簡介

          作者: 時間:2016-11-29 來源:網(wǎng)絡 收藏
          9G-CM0 新唐CM0+MDK-ARM入門開發(fā)過程簡介

          一,準備MDK-ARM + 新唐CM0軟件包

          本文引用地址:http://www.ex-cimer.com/article/201611/323203.htm

          1,在http://www.mcu123.com/news/Soft/embsof/arm/201006/529.html
          下載RealView MDK-ARM 4.12 (MDK-ARM V4.12,MDK4.12)
          mdk412_mcu123.rar
          在http://www.mcu123.com/news/Soft/ShowSoftDown.asp?UrlID=3&SoftID=529上
          右擊“下載地址:”后的“下載”選擇“目標另存為”下載文件到本地硬盤。
          (自己查找破解文件“keygen.exe”)
          http://esoft.mcu123.com/MCU123_temp_20100103@/arm/mdk412_mcu123.rar

          2,在http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=403a9c50-52c2-4463-9057-2595190602c5上
          上下載 “NUC1xx Keil ICE driver (Build 3814) V1.01.zip”
          NUC1xxKeilICEdriverBuild3814V101.zip
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Documents/NUC1xxKeilICEdriverBuild3814V101.zip

          下載“NUC1xx Nu-Tiny-EVB and Nu-Link-Me Board user manual EN v1.0.pdf”文檔
          NUC1xxNuTinyEVBandNuLinkMeBoardusermanualENv10.pdf
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Documents/NUC1xxNuTinyEVBandNuLinkMeBoardusermanualENv10.pdf

          下載“NUC1xx Nu-Link-Me_001 Board Schematic v1.0.pdf”文檔
          NUC1xxNuLinkMe_001BoardSchematicv10.pdf
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Documents/NUC1xxNuLinkMe_001BoardSchematicv10.pdf

          下載“NUC1xx Nu-Tiny-EVB_001 Board Schemetic v1.0.pdf”文檔
          NUC1xxNuTinyEVB_001BoardSchemeticv10.pdf
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Documents/NUC1xxNuTinyEVB_001BoardSchemeticv10.pdf

          3,在http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=7052964b-b71b-46b7-91b2-221afeddd575上
          上下載 “NUC1xxBSP_v1.1.1.zip”
          NUC1xxBSP_v111.zip
          http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=38a57efd-e9f8-4809-a585-21e62f8b6041

          4,新唐官方資料網(wǎng)址
          新唐CM0官方資料主頁
          http://www.nuvoton.com/hq/chs/Pages/default.aspx
          新唐CM0主頁資料入口
          ARM單片機 -> ARM Cortex?-M0 單片機 NuMicro? 家族
          新唐CM0主頁資料網(wǎng)址
          http://www.nuvoton.com/NuvotonMOSS/Community/ProductInfo.aspx?tp_GUID=30cfcae5-0f93-414d-a8df-b3bac8b932a2
          新唐CM0在線選型工具
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Pages/SelectGuide.aspx
          新唐CM0在線培訓教程
          http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ConsumerElectronicsIC/ARMMicrocontroller/ARMCortexTMM0/Pages/OnLineTraining.aspx

          二,建立CM0的MDK-ARM+Nu-LINK開發(fā)環(huán)境

          1,雙擊“mdk412_mcu123.rar”運行里面的“MDK412.exe”,一路的“NEXT”再“NEXT”,最后就會安裝MDK-ARM 4.12到電腦上,將會在桌面產(chǎn)生Keil uVision4的快捷方式;

          2,雙擊“keygen.exe”,把“uVision4”的“File->License Management”菜單里面的“CID”復制到keygen里面的CID框中,選擇“TARGET”為“ARM”后點擊“Generate”,把
          產(chǎn)生的序列號復制到前面“uVision4”的窗口中的“LIC”框中,點擊“ADD LIC”便會解除編譯限制;

          3,雙擊“NUC1xxKeilICEdriverBuild3814V101.zip ”運行里面的“Nu-Link_Driver.EXE”,便會在KEIL目錄中安裝上相關(guān)的“Nu-LINK”的驅(qū)動。

          三,建立CM0的MDK-ARM基本工程

          1,在電腦開始菜單中打開“Keil uVision4”,在“uVision4”的IDE菜單中選擇“Project”->“New uVision Project”創(chuàng)建一個新工程,在“Create New Project”選擇存儲目錄
          到D:works9G-CM0uc140project下面,工程名叫“nuc140.uvproj”;

          2,接著在“select a CPU Data Base File”菜單中選擇“NUVOTON NUC1XX Devices”點擊“OK”,選擇“Nuvoton”公司下面的“NUC140VE3AN”點擊“OK”后確認復制啟動代碼“startup_NUC1xx.s”和
          加入到工程項目中,即可產(chǎn)生一個空工程,再點擊全部保存項目,會D:works9G-CM0uc140project目錄中發(fā)現(xiàn)“nuc140.uvproj”和“nuc140.uvopt”,“startup_NUC1xx.s”等文件;

          3,在“D:works9G-CM0uc140”下建立文件夾“include”,“driver”,“library”,“source”,等子目錄,解壓“NUC1xxBSP_v111.zip”,把里面的目錄“NUC1xxBSP”解壓到“library”里面,在D:works9G-CM0uc140project
          下建立子目錄“obj”和“lst”;

          4,在“uVision4”的IDE菜單中選擇“Project”->“Manage”->“Components,Environment,Books”打開“Components,Environment,Books”頁面里的“Project Components”,
          雙擊“Target1”改名為“NUC140”,雙擊“Source Group 1”改名為“boot”再添加“lib”“drv”“src”“inc”等目錄后確定。

          5,在“uVision4”的IDE菜單中選擇“File”->“New”后選擇“File”->“Save”把新建立的文件保存到D:works9G-CM0uc140source,文件名為“main.c”,右擊項目窗口中的“src”選擇“Add Files
          to Group src”并在“main.c”中填入下面內(nèi)容:
          #include /* NUC1xx definitions */
          void SystemInit(void){}
          void GPIO_Init(void){ NUC_GPIOC->PMD = 0x00005555;} /* LEDs on PORT C defined as Output */
          int main(void)
          {
          int i;

          GPIO_Init();
          while(1)
          {
          for(i=0;i<1000000;i++);NUC_GPIOC->DOUT &= 0xFFFFFF00;/* switch on LEDs */
          for(i=0;i<1000000;i++);NUC_GPIOC->DOUT |= 0x000000FF;/* switch off LEDs */
          }
          }

          三,配置CM0的MDK-ARM基本工程

          1,在“uVision4”的IDE菜單中選擇“Project”->“Opitions for Target ‘NUC140’”,在“Output”頁面勾選“Create HEX File”,并在“Select Folder Objects”指定目錄到“D:works9G-CM0uc140projectobj”,
          后點擊“OK”,同樣在“Listing”中在“Select Folder Listings”指定目錄到“D:works9G-CM0uc140projectlst”;

          2,在“Opitions for Target ‘NUC140’”的“Debug”頁面選擇用硬件仿真器“Nu-Link Debugger”勾選“Run to main{}”,在“Utilities”頁面選擇“Use Target Driver for Flash Programming”用
          “Nu-Link Debugger”勾選上“Update Target before Debugging”后在“Setting”里面的“Configure”,確保用內(nèi)置22M晶體,和從“APROM”啟動及低壓檢測電壓值等配置選項后點擊“OK”再“OK”退出;

          3,在“Opitions for Target ‘NUC140’”的“C/C++”頁面的“Include Paths”中填入“C:KeilARMINCNuvotonNUC1xx”

          四,調(diào)試CM0的MDK-ARM基本工程

          1,點擊在“uVision4”的IDE菜單中選擇“Flash”->“Download”便會自己編譯代碼生成HEX文件并下載到目標板子中;

          2,點擊在“uVision4”的IDE菜單中選擇“Debug”->“Start/Stop Debug session”進入調(diào)試狀態(tài),然后選擇“Debug”->“Run”,全速運行,可以看到IO口上的LED在閃爍。9G-CM0-20100629.zip

          四,建立CM0的MDK-ARM高級工程
          (待續(xù))



          關(guān)鍵詞: 32位MCU新唐CM0MDKARM入

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();