CodeWarrior
is a very powerful and professional IDE. The main feature of CodeWarrior IDE is the
source level debugger in assembler and C. CodeWarrior Special Edition is a wonderful gift from Freescale to all of us and it's
free for educational use. What's more, by CodeWarrior supporting serial monitor, they have made it very
affordable to support CodeWarrior for the OEM.
Freescale has invested millions of dollar into CodeWarrior and the current versions work
very well. What's more, Freescale knows
they will never sell enough copies of CodeWarrior to make back what they have
invested. They did it to drive chip sales.
As a software developer, the first thing you look at is available tools
and what it will cost.
There are many companies making MCU chips these days and for the most part they
all have about the same features at a similar price. Special Edition CodeWarrior sets Freescale apart from others. There is no any MCU chip maker
offers you a such first class C source level debugger free of charge.
CodeWarrior IDE does not work with D-Bug12, but it works with serial
monitor. Before Freescale created the serial monitor a BDM is needed
as an interface between the PC and HCS12. Freescale created the serial
monitor for working with CodeWarrior to eliminate the cost of a
BDM.
Now a student can use the serial monitor with CodeWarrior to debug his programs and in fact, many universities have been using the serial monitor with CodeWarrior without a BDM in their classrooms.
Without spending money on a BDM, a student will be
able to spend his savings on purchasing a more advanced trainer, like the
Dragon12-Plus board with many on-board peripherals.
Purchasing an EVB board that comes with a BDM at a reasonable price, most
likely leaves the student with an EVB of only limited functionality.
Some universities use D-Bug12 monitor first, then replace the D-Bug12 monitor with serial monitor to be used with CodeWarrior IDE. In this case, a school laboratory only needs to have one BDM or use one Dragon12 board as a BDM POD, to program all students' boards with serial monitor.
To replace bootloader and D-Bug12 monitor with serial monitor, you need a BDM or a BDM POD to perform the task. The procedure to program the on-chip flash memory is provided at: www.evbplus.com/TinyBDM_9s12/TinyBDM_9s12.html
Some universities use CodeWarrior IDE only. In this case, we pre-load the on-chip flash memory with serial monitor.
A quick check of monitor type on your board:
For the Dragon12 and Dragon12 Plus boards:
If your board is pre-installed with D-Bug12 monitor,
the Port B LED indicators will light up from left to right one at a time
and the speaker will chirp once when the board is turned on. If the chirp is too
soft you can remove the sticker on the speaker to increase the volume.
If you ordered the board with serial monitor for Code Warrior, it would be pre-installed with serial monitor and a factory test program. The state of the left switch of the 2-position DIP switch (S7) is tested by the serial monitor for selecting RUN or LOAD mode during power up or reset, and the Port B LED indicators will light up from right to left one at a time and the speaker will chirp once to indicate that the serial monitor is functioning.
If the left switch is placed in "LOAD" mode (in the "low" position) the monitor will wait for a command from PC.
If the left switch is placed in "RUN" mode (in the "up" position) the LED indicators will light up again from left to right to indicate that the program execution is diverted to the user code.
Code Warrior communicates with serial monitor only in LOAD mode and so in order to interface with Code Warrior you have to reset the left switch in the “low “position. The Port B LED indicators will light up from right to left one at a time and the speaker will chirp once when the board is turned on.
If the serial monitor is not installed or erased by a BDM, the LED indicators will not light up one at a time during power up or reset.
For the MiniDragon+ and MiniDragon Plus2 boards:
If your board is pre-installed with D-Bug12 monitor, it will display the diagnostic code “E-4-3” on the 7-segment LED and the speaker will chirp once when the board is turned on. The code character "E" stands for EVB mode.
If you ordered the board with serial monitor for Code Warrior, it would be pre-installed with serial monitor and a factory test program. The state of the left switch of the 2-position DIP switch (S7) is tested by the serial monitor for selecting RUN or LOAD mode during power up or reset.
If the left switch is placed in "LOAD" mode (in the "low" position) the monitor will display the diagnostic code “S-4-3” on the 7-segment LED and the speaker will chirp once and then wait for a command from PC.
If the left switch is placed in "RUN" mode (in the "up" position) the monitor will display the diagnostic code “U-4-3” on the 7-segment LED and the speaker will chirp once to indicate that the program execution is diverted to the user code.
The code character "U" stands for running a User program and the code character "S" is displayed as the number "5" and stands for Serial monitor.
Code Warrior communicates with serial monitor only in LOAD mode and so in order to interface with Code Warrior you have to reset the left switch in the “low “position. It will display the diagnostic code “5-4-3” on the 7-segment LED and the speaker will chirp once when the board is turned on
If the serial monitor is not installed or erased by a BDM, the LED indicators will not light up one at a time during power up or reset.
Useful links for learning Code Warrior:
Finally, the first book written exclusively for the CodeWarrior has arrived.
Dr. Richard Haskell and Dr. Darrin Hanna
have completed a new book for learning
to program in C using CodeWarrior. The book
includes sample programs tested on our Dragon12-Plus and the
MiniDragon-Plus2 boards.
The CodeWarrior itself can be daunting, but
their book will make it easy for you to learn what you need to get
your project up and running quickly.
You can find a description of the book
at this website: http://www.lbebooks.com/index.htm
The CodeWarrior stationery file for the Dragon12-Plus and MiniDragon-Plus2 can be used in two new books "Learning by example using C - Programming the Dragon12-Plus using CodeWarrior" and "Learning by example using C - Programming the MiniDragon-Plus2 using CodeWarrior". The books are written by professors Richard Haskell and Darrin Hanna at Oakland University.
Instructions
of how to download Code Warrior from Freescale's web site and
CodeWarrior
tutorial can be found at Professor Paterno's web site:
http://web.njit.edu/~paterno/ECET310/T3-CodeWarrior%20Simulator.pdf
The
CodeWarrior project setup procedure can be found at Professor Jeff Sumey's web site:
The Code Warrior tutorial: http://www.microdigitaled.com/HCS12/HCS12_books.htm
The
most resourceful “CodeWarrior for the Dragon12 trainer” web site:
http://www.mecheng.adelaide.edu.au/robotics/wpage.php?wpage_id=56
The
mechanical engineering of University of Adelaide in Australia is awesome.
Here you can see what their students have achieved in so many great projects:
http://www.mecheng.adelaide.edu.au/news/
Following
is the web site for downloading the free CodeWarrior special edition version
5.0:
http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=01272600610BF1
The file size is 337 MB and it's quite large. It will take a few hours to download, so you should first save it on your hard drive in case you need to install it in another PC.
Following
is the web site for downloading the CodeWarrior full edition for a 30-day free
evaluation:
http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=01272600612247