I will not demonstrate the installation process of IAR here. There are many demonstration documents on the Internet. Please search for them yourself. Now let's see how to create a new project and generate execution code:
1. Start IAR software.
Enter the IAR home page
2. Create a
new workspace
File->New->Workspace
3. Create a new project Project-
>Create New Project
Select C Voice Template
Click OK, and a save project window will pop up. We will create a new folder Test and save the project as Test.
Click Save
4. Save the
workspace
File->Save Workspace
We name the workspace file Testw and click Save.
The project has been created, but we still need to make some general settings, such as model selection and file output.
5. Project configuration
Project->Options
Or you can right-click the project name in the workspace and select Options to open the project configuration window.
Project Configuration Window
1.0 MCU model selection: For example, our target MCU model is msp430f249, so select
2.0 Output file settings --- Output files for BSL download. Click the Output option of Linker. The window is as follows
Check both options, as shown in the picture
Change the suffix of Test.d43 to txt, click OK and the file setting for BSL download is completed.
Compile the entire program
Right-click the project name in the workspace and select Rebuild All to see if there are any errors in the output window
There are no errors or warnings. Let's see where the generated files are.
In the following address of the project: Test\debug\Exe
Use BSL download software to select the txt suffix file in this path to download. So far, the settings for program writing and target file generation have been completed. Other settings can be set according to your own needs.
3.0 Output file settings --- JTAG online simulation settings, click the Output option of Linker, save the default options, the window is as follows
Click FET Debugger in Driver's Setup in Debugger
Set the Connection in the Setup window of the FET Debugger
Most of the tools now use USB communication, so just select the first option here. Of course, this depends on your own tools.
Click OK to exit the setup window. Now we can compile the program and simulate it online.
Download the program and enter the simulation interface. It should be noted that the software will first detect the firmware version of your simulator. If the firmware version is lower, it will prompt you to upgrade. If there is no problem, you can enter the simulation interface.
Okay, the creation and setup of a project is now complete, and the rest is up to you to learn on your own.
|