codewarrior v10.x快速指南.docx

上传人:罗晋 文档编号:7199774 上传时间:2020-11-05 格式:DOCX 页数:22 大小:434.03KB
返回 下载 相关 举报
codewarrior v10.x快速指南.docx_第1页
第1页 / 共22页
codewarrior v10.x快速指南.docx_第2页
第2页 / 共22页
codewarrior v10.x快速指南.docx_第3页
第3页 / 共22页
codewarrior v10.x快速指南.docx_第4页
第4页 / 共22页
codewarrior v10.x快速指南.docx_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《codewarrior v10.x快速指南.docx》由会员分享,可在线阅读,更多相关《codewarrior v10.x快速指南.docx(22页珍藏版)》请在三一文库上搜索。

1、for Microcontrollers V10.1Quick StartCodeWarrior Development Studiofor Microcontrollers V10.x Quick StartSYSTEM REQUIREMENTSHardwareWindows OS: PC with 1 GHz Intel Pentiumcompatible processorLinux OS: 1.8 GHz Intel Pentium class processor(or better)2GB of RAMCD-ROM driveDepending on host-target conn

2、ection: ParallelPort, 9-pin Serial Port, or USB PortOperating SystemMicrosoft Windows XP 32-bit and 64-bit(Professional Edition),Microsoft Windows Vista 32-bit and 64-bit (HomePremium Edition and Business Edition), orMicrosoft Windows 7 32-bit and 64-bit (HomePremium Edition and Professional Edition

3、)Red Hat Enterprise Edition 5.2Disk Space2 GB total400MB on Windows system diskThis Quick Start explains how to install the CodeWarrior Development Studio for Microcontrollers V10.x software on Windows and Linux operating systems, and how to use the CodeWarrior IDE to create, build, and debug a proj

4、ect.Section A: Installing CodeWarrior SoftwareNOTEThis section describes how to download and install CodeWarrior for Microcontrollers V10.x from the Web or install it from the CD. The Web version has a time-bombed license.1NOTESpecial Edition: The Special Edition license is automaticallyinstalled wi

5、th your product and you do not need to register it.This license allows you to develop projects with unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives, up to 64KB of C code for ColdFire V1 derivativesand up to 128 KB of C code for ColdFire V2-V4 derivatives.NOTEEvaluation Editi

6、on: The Evaluation Edition license isautomatically installed with your product and you do not needto register it. This license allows you to develop projects asProfessional Edition within the 30-day evaluation period. After30 days, the license works as Special Edition license (freepermanent, but fea

7、ture limited) which supports unlimitedassembly code, up to 32KB of C code for HC(S)08/RS08derivatives, up to 64KB of C code for ColdFire V1 derivativesand up to 128 KB of C code for ColdFire V2-V4 derivatives.NOTECodeWarrior Eclipse usage on a Microsoft WindowsVista or Microsoft Windows 7 system:Adm

8、inistrator rights are required to install CodeWarrior software on Microsoft Windows Vista and Microsoft Windows 7 systems, since the installer copies files into the System and Program Files folders.The default CodeWarrior installation folder is C:Program FilesFreescale CodeWarriorCW MCU v10.1. To pr

9、otect against malware, Windows Vista and Windows 7 do not allow normal processes to change files in the Program Files folder; therefore, you must have administrator rights to install and run CodeWarrior software from this location. If you will be running CodeWarrior software with a non-administratve

10、 user account, then you need to install CodeWarrior software in another folder (e.g., C:Freescale CodeWarriorCW MCU v10.1).Your project workspace needs to be setup in any folder that you can fully access.21. Download CodeWarrior software from the Weba. Go to the CodeWarrior for Microcontrollers v10

11、.x Product Summary page appears.b. Click the Downloads tab the page displays separate downloads for the Windows and Linux operatings systems.c. Click Download next to the required Microcontrollers V10.x download. You will be directed to the Freescale log-in page if you are not logged in already.d. E

12、nter your user name and password and click Log in.NOTEIf you are not a registered user, click Register Now and follow the on-screen instructions.e. A dialog box appears asking you to save the installer file. The extension of the installer file is .exe for Windows and .tar for Linux.f. Specify the lo

13、cation where you want to save the installer file.2. Install CodeWarrior software downloaded from WebWindows OSa. When the download finishes on the Windows host computer, navigate to the CodeWarrior installer EXE file you have downloaded, double-click the EXE file the install wizard appears.b. Follow

14、 the wizard instructions to install the CodeWarrior software.When software installation is finished, wizard displays the installation complete page.c. Check the Display Start Here page checkbox and click Finish to close the wizard.d. The start here page appears in your default browser. The page give

15、s you information about the different documents, such as getting started, user guides, application notes, and cheat sheets available in the product.NOTECodeWarrior Eclipse usage on a Linux system:The CodeWarrior installer must be run from a root account. CodeWarrior service packs are installed with

16、the Eclipse Updater. The updater must also be run from a root account. To start the Eclipse Updater select Window Install new software in the menu.Eclipse needs read/write access to the installation folder. Make3sure the eclipse installation folder has the appropriate permissions for all users.Make

17、sure your project workspace has read and write permissions.If the CodeWarrior software does not restart automatically after a successful CodeWarrior update operation, run ./cwide - clean to launch the CodeWarrior software.Linux OSa. When download finishes on the Linux host computer, navigate to the

18、folder containing the CodeWarrior installer TAR file you have downloaded.b. Right-click the TAR file and select Extract Here. The system extracts the contents of the TAR file. A new folder appears next to the TAR file in the file browser window; usually, the new folders name is disk1.c. Open a new t

19、erminal window the shell session starts.d. In the terminal window, log in as root or super user.e. Issue command: xhost +.f. Change working directory to the disk1 directory.g. Issue command: ./setuplinux the install wizard starts; the welcome page appears.h. Follow wizard instructions to install the

20、 CodeWarrior software.i. When software installation is finished, wizard displays the installation summary page.NOTEUsing P&E hardware via the USB port within the CodeWarriorsoftware requires the Jungo USB drivers. During the Codewarrior software installation on a Linux operating system, it attempts

21、to install the drivers automatically. However, if the driver installation fails and a warning message is displayed, then please refer to the Readme.pdf found withinCodewarriorInstallDirDriverspemicro to manually install the P&E drivers.j. Click Finish.3. Install CodeWarrior Software from CD4a. Inser

22、t CodeWarrior Development Studio CD into CD-ROM drive CW Auto Install begins.NOTEIf Auto Install does not start, navigate to the CodeWarrior installer EXE file, double-click the EXE file the install wizard appears.b. Follow the wizard instructions to install the CodeWarrior software.4. Restart your

23、computer operating system reboots which ensures that CodeWarrior IDE finds newly installed drivers.Section B: Creating and Building a ProjectNOTEBefore starting the CodeWarrior IDE in Linux, make sure that LD_LIBRARY_PATH is set to empty.1. Start CodeWarrior IDEa. For Windows, select Start Programs

24、Freescale CodeWarrior CW for MCU v10.1 CodeWarrior the Workspace Launcher dialog box appears.For Linux, open a new terminal window and change the working directory as shown below:CWInstallDir/eclipse/where, CWInstallDir is the directory in which you installed the CodeWarrior software.Issue command:

25、./cwide the Workspace Launcher dialog box appears.Workspace Launcher Dialog Box5NOTEIf you want to store your projects in the default location, click OK and proceed to step 2, otherwise follow the steps given below.b. Click Browse the Select Workspace Directory dialog box appears.Select Workspace Di

26、rectory Dialog Boxc. Select required folder or click Make New Folder to create a new folder for storing your projects.d. Click OK the Select Workspace Directory dialog box closes.NOTECheck the Use this as the default and do not ask again checkbox in the Workspace Launcher dialog box to set the chose

27、n path as the default location for storing all your projects.e. Click OK the CodeWarrior IDE launches and the Welcome page appears.NOTEThe Welcome page appears only if the CodeWarrior IDE or the selected Workspace is opened first time. Otherwise, the Workbench window appears. Switch directly to step

28、 2a if the Workbench window appears.6Welcome Pagef. In the Welcome Page, click Go to Workbench the Workbench window appears.Workbench Window2. Create new projecta. From the IDE menu bar, select File New Bareboard Project the New Bareboard Project wizard starts; the Create an MCU bareboard Project pa

29、ge appears.b. Enter Project_1 in the New Project Name field.7Create an MCU bareboard Project PageNOTEThe Location field shows the default project location. If you wish to change this location, clear the Use default location checkbox. Click Browse and use the subsequent dialog box to specify a new lo

30、cation. Click OK. The Create an MCU bareboard Project page now shows new location.c. Click Next the Devices page appears.d. Expand the tree control and select HCS08 HCS08G Family MC9S08GB32.Devices Page8e. Clcik Next the Connections page appears.Connections Pagef. Select the desired connection.NOTEI

31、n the Connections page, you can select multiple connections at once.g.Click Next the Add Files page appears.9Add Files Pageh.Click Next the Languages page appears.NOTEThe page displayed may vary depending on the derivative or board selected. For example, if you select ColdFire V2 MCF5221X MCF52210 a

32、nd click Next, the ColdFire Build Options page appears.i. Select the C language.Languages Page10j. Click Next the C/C+ Options page appears.NOTEIf you check only the Relocatable Assembly or Absolute Assembly checkbox and click Next, the Rapid Application Development page appears instead of the C/C+

33、Options page.C/C+ Options Pagek. Click Next the Rapid Application Development page appears.11Rapid Application Development Pagel. Select None from the Rapid Application Development options.m. Click Finish the IDE creates the project.n. Select Project Build Project from the IDE menu bar the IDE build

34、s the project. Expand the project directory in the CodeWarrior Projects view to view the list of files and folders in the project.CodeWarrior Projects ViewNOTETo set Linker, Complier, and Assembler options for a project, select the project in the CodeWarrior Projects view and select Project Properti

35、es from the IDE menu bar. In the Properties dialog box that appears, select C/C+ Build Settings. You can make the required settings in the Tool Settings tab page.Section C: Debugging your Application121. Debug programa. From the IDE menu bar, select Run Debug Configurations the Debug Configurations

36、dialog box appears.b. Expand the CodeWarrior Download tree control in the left pane and select Project_1 - MC9S08GB32 - PnE Full Chip Simulator.Debug Configurations Dialog Boxc. Click the Debugger tab the Debugger page opens in the right pane.Debug Configurations Dialog Box Debugger Paged.Make the a

37、ppropriate changes in the Debug tab.13e. Click Apply to save the changes in the settings, if any.f. Click Debug the debugger downloads program to simulator and the Debug Perspective appears. The execution halts at the first statement ofmain() and program counter icon on the marker bar points to the

38、next statement to be executed.Debug Perspective2. Set and run to breakpointa. Double-click on the marker bar next to a statement the breakpoint indicator (blue dot) appears next to the statement.b. From the Debug view, click Resume the debugger executes all statements up to but not including the bre

39、akpoint statement.3. Control programa. From the Debug view, click Step Over the debugger executes breakpoint statement and halts at next statement.b. From the Debug view, click Resume the simulator resumes program execution.c. From the Debug view, click Terminate the debug session ends.4. Select Fil

40、e Exit from the IDE menu bar to exit the CodeWarrior IDE.14Congratulations!You have created, built, and debugged an Microcontrollers project using CodeWarrior for Microcontrollers V10.x software!15Freescale, the Freescale logo, CodeWarrior and ColdFire are trademarks of Freescale Semiconductor, Inc.

41、, Reg. U.S. Pat. & Tm. Off. Flexis and Processor Expert are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 20102011 Freescale Semiconductor, Inc. All rights reserved.Information in this document is provided solely to enable

42、 system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.Freescale Semiconductor reserves the right t

43、o make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of an

44、y product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customers

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1