Kinetis L - CodeWarrior.pdf
-
Upload
pedro-alvarado -
Category
Documents
-
view
239 -
download
0
Transcript of Kinetis L - CodeWarrior.pdf
-
8/10/2019 Kinetis L - CodeWarrior.pdf
1/21
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, C odeWarrior, ColdFire, C-Ware, t
he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony
are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack,
ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ
Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarksof Freescale Semiconductor, Inc. All other product or service names are the property
of their respective owners. 2011 Freescale Semiconductor, Inc.
-
8/10/2019 Kinetis L - CodeWarrior.pdf
2/21
1. What is CodeWarrior?
2. Creating a new Project
3. C/C++ Perspective
4. Debugging a Project
5. Debug Perspective
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
2
6. Settings7. Flashing a Binary File
8. Running Example
-
8/10/2019 Kinetis L - CodeWarrior.pdf
3/21
Complete Integrated Development Environment (IDE).
Based on Eclipse platfform
Visual Interface and automated framework Compiler, assembler and debugging support.
Tracing support
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
3
-
8/10/2019 Kinetis L - CodeWarrior.pdf
4/21
Open CodeWarrior 10.3 or above
Select menu File > New > Bareboard Project
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
4
-
8/10/2019 Kinetis L - CodeWarrior.pdf
5/21
In the next window write a name for your project and clickNext > button
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
5
-
8/10/2019 Kinetis L - CodeWarrior.pdf
6/21
Then select the MCU youwill use. In this caseMKL25Z128 is used.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
6
-
8/10/2019 Kinetis L - CodeWarrior.pdf
7/21
Select the connectiontype that you are using,
you can select as manyconnections as youwant. In this lab onlyOpenSDA is used.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
7
-
8/10/2019 Kinetis L - CodeWarrior.pdf
8/21
In the next window you can set:
Language
Select C, C++ or ASM according to yourrequirements. For this lab select Clanguage.
Floating Point support
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
8
Floating Point unit. Software is selectedautomatically.
I/O Support
Codewarrior provides 3 different libraryoptions for I/O Support. Select UART for
this lab. You can change your library set later in
menu Project > Properties > C/C++ Build> Settings > Librarian
-
8/10/2019 Kinetis L - CodeWarrior.pdf
9/21
Rapid ApplicationDevelopment features arenot covered in this lab, selectNone and click FinishButton.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
9
-
8/10/2019 Kinetis L - CodeWarrior.pdf
10/21
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
10
-
8/10/2019 Kinetis L - CodeWarrior.pdf
11/21
Once your project is created you must choose a Build Configuration. KL25 projectonly provide FLASH configuration, but other Freescale devices provide FLASH and
RAM targets.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
11
To build the project, go to menu Project > Build Project, or alternately click the buildbutton
-
8/10/2019 Kinetis L - CodeWarrior.pdf
12/21
To debug your project, go to menu Run > Debug Configurations and select
the Debug Configuration that matches with your Build Configuration andconnection.
Then clickDebug
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
12
-
8/10/2019 Kinetis L - CodeWarrior.pdf
13/21
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
13
-
8/10/2019 Kinetis L - CodeWarrior.pdf
14/21
To edit your project settings go to menu Project > Properties > C/C++Build > Settings
To open a new perspective go to menu Window > Open Perspective> Debug
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
14
You can find all the views and open a new one in menu Window >Show View
To edit CodeWarrior settings and prefernces go to menu Window >Preferences
-
8/10/2019 Kinetis L - CodeWarrior.pdf
15/21
Click the drop down arrow besides the Flashprogrammer button to display the context
menu and select Flash File to Target.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
15
Select your connection.
In file to Flash search for freedom.bin
Click Erase and Program.
-
8/10/2019 Kinetis L - CodeWarrior.pdf
16/21
Open a terminal program. Agood choice in my view is
TeraTerm Connect to the board with
115200 baud
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
16
-
8/10/2019 Kinetis L - CodeWarrior.pdf
17/21
Push the onboard reset button. You will see next screen in
terminal.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
17
-
8/10/2019 Kinetis L - CodeWarrior.pdf
18/21
Below you can find some instructions
print "Hello World!core.led = %red
core.led = %blue
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCoreand Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
18
core.led = %greencore.led = %black
Other colors are accepted too (see below or the CoreBASICmanual).
-
8/10/2019 Kinetis L - CodeWarrior.pdf
19/21
A LED blink loop. You can copy and paste the followingcode:
10 for i = 1 to 5
20 print i
30 core.led = %ma enta
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore
and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
19
40 pause 0.550 core.led = %black
60 pause 0.5
70 next I
The command to run a program is: of course run
-
8/10/2019 Kinetis L - CodeWarrior.pdf
20/21
Please visit the link below to see the whole example post.
http://mcuoneclipse.com/2013/01/18/back-to-basics-with-the-freedom-board/
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore
and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off . BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a
Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
20
-
8/10/2019 Kinetis L - CodeWarrior.pdf
21/21
TM