1 //------------------------------------------------------------------------
3 //------------------------------------------------------------------------
4 This project is configure to get you up and running quickly using
5 CodeWarrior with the Freescale MCF52259 board.
7 This project provides full support for the selected board.
8 The created project provides Standard IO Support through console and terminal window.
10 Sample code for the following language:
14 //------------------------------------------------------------------------
16 //------------------------------------------------------------------------
17 The Hardware has the following memory map:
19 # MCF52259 Derivative Memory map definitions from linker command files:
20 # __IPSBAR, __RAMBAR, __RAMBAR_SIZE, __FLASHBAR, __FLASHBAR_SIZE linker
21 # symbols must be defined in the linker command file.
23 # Memory Mapped Registers (IPSBAR= 0x40000000)
24 ___IPSBAR = 0x40000000;
26 # 32 Kbytes Internal SRAM
27 ___RAMBAR = 0x20000000;
28 ___RAMBAR_SIZE = 0x00008000;
30 # 512 KByte Internal Flash Memory
31 ___FLASHBAR = 0x00000000;
32 ___FLASHBAR_SIZE = 0x00080000;
36 //------------------------------------------------------------------------
38 //------------------------------------------------------------------------
39 The project generated contains various files/groups:
40 - readme.txt: information for this project
41 - Sources: application source codes, user customizable startup
42 code, uart library, exception table
43 - Includes: derivative and board header files, ...
44 - Libs: runtime and libs
45 - Project Settings: linker command files for the different build
46 targets, the initialization and memory configuration files for
47 the hardware debugging, the common startup code, etc...
49 //------------------------------------------------------------------------
51 //------------------------------------------------------------------------
52 - CONSOLE_INTERNAL_RAM:
53 This project target is setup to load and debug code from internal RAM.
54 It should be used during your application development.
55 The application outputs to the CodeWarrior's console window.
58 This project target is setup to load and debug code from internal RAM.
59 It should be used during your application development.
60 This is the very basic project that outputs to the UART.
61 You needs to connect a Terminal Program to see the output.
64 This project target is setup to load and debug code in Internal FLASH.
65 This is the very basic project that outputs to the UART. User needs
66 to connect the terminal to see the output.
70 ===================================================================
71 WARNING regarding debugging new project wizard code with CCS-SIM
72 ===================================================================
73 The CCS-SIM is an instruction set simulator, it does not implement
75 The new project generated by the wizard are using startup code
76 performing some hardware peripheral initializations.
77 When debugging with the CCS-SIM it might happen that the simulation
78 stuck on loop using non implemented peripheral register flag as
79 condition (PLL initialization as example).
80 In this case, you should either:
81 - move the PC to next statement
83 - define a simulator specific macro which used when define allos you
84 to comment out the unwanted code in order to debug with CCS-SIM
87 ===================================================================
88 WARNING regarding code located in RAM
89 ===================================================================
90 Many possible ColdFire target processors have an external bus, so
91 you can use large external RAM devices for debugging applications
92 during development. But some processors do not have an external
93 bus, so you must accommodate applications in on-chip memory.
94 Although this on-chip RAM accommodates this CodeWarrior project,
95 it probably is too small for full development of your application.
96 Accordingly, for a processor without external bus, you should locate
97 your applications in flash memory.
99 //------------------------------------------------------------------------
101 //------------------------------------------------------------------------
102 1. Select the appropriate project target and build it
103 2. Make sure the correct remote connection is selected in the Remote
104 Connection debugger panel
105 3. In the CodeWarrior IDE menu, select Project > Set Default Project
106 and select your project
107 4. In the CodeWarrior IDE menu, select Project > Set Default Target
108 and select the project target that has the code you want to flash
109 5. In the CodeWarrior IDE menu, select Tools > Flash Programmer
110 6. Go to the flash programmer Target Configuration panel, click Load
112 7. Browse to the <your project location>\cfg sub folder and
113 select the flash settings xml file matching your build target
114 8. Check that Use Custom Settings checkbox is not selected
115 9. Go to the Erase/Blank Check panel, select the All Sectors option and
117 10. Go to Program/Verify panel, click Program
118 11. Your code should now be flashed
120 //------------------------------------------------------------------------
122 //------------------------------------------------------------------------
123 In case the UART is supported, the terminal should be setup with:
130 Please check this file in the project.
132 //------------------------------------------------------------------------
134 //------------------------------------------------------------------------
135 To build/debug your project, use the CodeWarrior IDE menu Project > Debug
136 or press F5. This will launch the debugger. Press again F5 in the
137 debugger (or the CodeWarrior IDE menu Project > Run) to start the
138 application. The CodeWarrior IDE menu Project > Break stops the
141 //------------------------------------------------------------------------
142 // Adding your own code
143 //------------------------------------------------------------------------
144 Once everything is working as expected, you can begin adding your own code
145 to the project. Keep in mind that we provide this as an example of how to
146 get up and running quickly with CodeWarrior. There are certainly other
147 ways to handle interrupts and set up your linker command file. Feel free
148 to modify any of the source files provided.
150 //------------------------------------------------------------------------
151 // Additional documentation
152 //------------------------------------------------------------------------
153 Read the online documentation provided. In CodeWarrior IDE menu, select
154 Help > CodeWarrior Help.
156 //------------------------------------------------------------------------
157 // Contacting Freescale
158 //------------------------------------------------------------------------
159 For bug reports, technical questions, and suggestions, please use the
160 forms installed in the Release_Notes folder.