matlab的一个demo 需要用2009打开
If you would like to change the exisTIng derivaTIve with a different one,
you have to consider following points:
- You will need to adapt the CodeWarrior project setTIngs: In the ‘Assembler for
HC12’ and ‘Compiler for HC12’ panels make sure that the new CPU will be used
in the ‘Command Line Arguments’:
- HC12: -CpuHC12
- HCS12: -CpuHCS12
- HCS12X: -CpuHCS12X
- The derivaTIve header and source files are located in the following directories:
- {CodeWarrior}lib\hc12c\include (derivative header files)
- {CodeWarrior}lib\hc12c\src (derivative source files)
You will need to drag and drop from the directories above the new derivative
header and source files to the ‘Libraries’ group.
HINT: To open a ‘Windows Explorer’ where the file is located:
Use the context menu/right mouse click on
the derivative header/source file in the ‘Libraries’ project folder
and select ‘Open in Windows Explorer’。
- You can now remove the derivative header and source files that are referenced
by the wizard from the project. Remove the derivative header and source files
in the ‘Libraries’ group: context menu/right mouse click on the derivative header
and source files in the ‘Libraries’ group and select ‘Remove’。
- You will need to adapt the main source file. This file can be found in the
‘Sources’ group. Open this file and change the name of the included
derivative header file to the new one. In case of a C/C++ project you will
also need to adapt the pragma ‘LINK_INFO DERIVATIVE’ to the new derivative.
This pragma tells the simulator which derivative to simulate. However you can
also remove this pragma and setup the new derivative in the HI-WAVE debugger
itself (see next point)。
- You will need to adapt the PRM file as well. PRM files are located in the
following directory:
- {CodeWarrior}lib\hc12c\prm
You need to open the new PRM file and copy & past the content to your currently
used PRM file. In case you don not have a banked memory model, you will need to
adapt the content as well. You may have a look at the existing prm file.
- After successful compilation and linkage you can start the HI-WAVE debugger.
You will need to setup the debugger for the new derivative.
- For the Full Chip Simulation\Simulator Connection:
Use the ‘Set Derivative.。.’ dialog by using the menu option
‘Simulator’ 》 ‘Set Derivative.。.’。 In the opened dialog box you can
select the new derivative. The names used there might also be used
with the pragma ‘LINK_INFO DERIVATIVE’。
- For the P&E Multilink/Cyclone Pro Connection:
Use the ‘Set Derivative.。.’ dialog by using the menu option
‘MultilinkCyclonePro’ 》 ‘Set Derivative.。.’。 In the opened dialog box you can
select the new derivative.
- For the SofTec HCS12 Connection:
Use the ‘MCU Configuration’ dialog by using the menu option
‘inDART-HCS12’ 》 ‘MCU Configuration’。 In the opened dialog box you can
select the new derivative.
- For the HCS12 Serial Monitor target:
The derivative is determined automatically from the connected hardware.
However, the debugger might still display a list of parts where a thinner
selection between silicons from the same family should be done.
- Now you should have a project for the new derivative.