TM IAR Embedded Workbench and Processor Expert Microcontroller
TM IAR Embedded Workbench and Processor Expert Microcontroller Driver Suite How to Integrate The Tools Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc. .
Requirements • Processor Expert Microcontroller Driver Suite v 10. 0 • IAR Embedded Workbench v. 6. 40. 3 • We’ll cover how to build an IAR project to include Processor Expert generated files • We assume you have both tools installed TM 2 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
A Moving Target • Freescale and IAR are working closely to improve integration • We expect major improvements around the end of October 2012 to automate much of what’s covered in this presentation TM 3 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Create a Processor Expert Project • See the Processor Expert documentation • When all components are configured, Generate Code − Click the Generate Code button or use the Project menu TM 4 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
How to Integrate Processor Expert with IAR • You create an IAR project − Set • it up for the right processor To integrate the code you need to do three things − Add files (the auto-generated Processor Expert files) − Add paths (to those files) − Point • to the right linker command file That’s it TM 5 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Create an IAR Project • Project Create New Project • Use Empty project − Click • OK Save it in the same folder as the Processor Expert project − This will make path setup easy TM 6 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Build for the Correct Processor • The empty project defaults to an ARM 7 processor • Project Options (or Right Click the project) − General TM Options, pick the correct device 7 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Add Files to the IAR Project • Make groups to match Processor Expert folder structure − This • is not required, but helps keeps your project organized − Right click the project Add Group − Make groups for Generated Code and Sources Then Add Files for each group − Right click the group Add Files − Navigate − Select TM to the files them all, click Open 8 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Add Include Paths • Like any build environment, you specify paths to files − You • • must identify the paths to all the Processor Expert files Typical paths will include at least these − The path to the Generated_Code folder − The path to the Sources folder − The path to Processor Expert header files − The paths to the code will vary based on your project location The header files in a default installation are here § C: FreescalePEx. Driver. Suite v 10. 0. 0eclipseProcessor. ExpertlibKinetispddinc § C: FreescalePEx. Driver. Suite v 10. 0. 0eclipseProcessor. ExpertlibKinetisiofiles TM 9 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Super Special Path Hint • Don’t worry about trying to figure out the paths − Processor • Expert tells you every path After you generate code, look for Project. Info. xml − This file contains every path − Including TM where the linker command file is 10 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
How to Add Include Paths • In Project Options, C/C++ Compiler, Preprocessor − Set • additional include directories As noted in the prior slide, your precise paths will vary TM 11 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
An Include Path Example • Folder “My. Project” with IAR Project and a Processor Expert folder − This relationship is arbitrary, but simplifies path building • The PE folder contains the generated code − The • name “PE” is arbitrary, it could be anything The paths in Embedded Workbench would look like this − $PROJ_DIR$PEGenerated_Code − $PROJ_DIR$PESources − C: FreescalePEx. Driver. Suite v 10. 0. 0eclipseProcessor. ExpertlibKinetispddinc − C: FreescalePEx. Driver. Suite v 10. 0. 0eclipseProcessor. ExpertlibKinetisiofiles TM 12 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Point to the Linker Command File • Processor Expert provides a linker command file − Project_SettingsLinker_FilesProcessor. Expert. icf • In Project Options Linker, Config − Override TM default and point to the Processor. Expert. icf file 13 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
You can now build your code • The rest is up to you − Add additional files − Call the Processor Expert drivers from your own code − Modify the build properties, optimizations, etc. • Processor Expert has laid the groundwork TM 14 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
Oh! One More Thing • We expect that you would like to debug your code • Processor Expert projects are often set up to run in flash • If the project is built to run in flash, make sure you use the flash loader TM 15 Freescale, the Freescale logo, Alti. Vec, C-5, Code. TEST, Code. Warrior, Cold. Fire, C-Ware, the Energy Efficient Solutions logo, mobile. GT, Power. QUICC, Qor. IQ, Star. Core and Symphony are trademarks of Freescale Semiconductor, Inc. , Reg. U. S. Pat. & Tm. Off. Airfast, Bee. Kit, Bee. Stack, Cold. Fire+, Core. Net, Flexis, Kinetis, Magni. V, MXC, Platform in a Package, Processor Expert, Qor. IQ Qonverge, Qorivva, QUICC Engine, Ready Play, Safe. Assure, the Safe. Assure logo, SMARTMOS, Turbo. Link, Vorti. Qa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2012 Freescale Semiconductor, Inc.
- Slides: 15