CW4CF 6.4: How to create a new project for a new design?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW4CF 6.4: How to create a new project for a new design?

1,121 Views
CLincoln
Contributor I
Hello all,
 
I am a Codewarrior & Coldfire nube. I have an M52233DEMO board and have all sorts of fun with the TCP/IP samples and other trivial experiments using the new project wizard and the appropriate stationery. In a short while, I should have a real target board based on the M52233. My question is this:
 
What is the general practice for creating a new project using CW, if any? The trial projects that I have generated using the M52233DEMO and EVB stationery contain code and files that are particular to those boards. There is also a stationery called CF_V2_ISS. I could any of them as a starting point, but I feel like I am missing the boat.
 
TIA,
 
Chris
Labels (1)
0 Kudos
1 Reply

273 Views
Black
Contributor I

I suggest as a starting point the M52233DEMO evaluation board stationery project created with the CodeWarrior for ColdFire new project wizard, then modify this project and add your own code according to your project requirements.

If you are using a custom board, as a first step you must to be able to debug a project using a board-specific init.cfg file. Furthermore, "Verify Memory Writes" must be checked in the project's CF Debugger Settings panel. Once the debugger can step and run through the main code on the board with Verify Memory Writes on, you can build the ROM version of the project and program the flash.

For a custom board, you will have to write your own init.cfg file with a minimal register initialization to properly configure the board's CPU and peripherals. For a starting point, you can study the init.cfg files from the CodeWarrior support directory (CodeWarrior for ColdFire V6.4 installation folder\E68K_Support\Initialization_Files). Make a copy of the init.cfg file that's the closest match to your board's hardware configuration (for example M52233DEMO.cfg from the stationery project) and name it my_custom_board_init.cfg. Edit this file to match your board's settings (clocks, RAM, flash, register initialization, memory initialization, and so on) exactly. Now perform a Debug->Connect command with the modified init file selected. To have the Debugger use the modified file, in the CF Debugger Settings panel choose Use Target Initialization file and navigate to my_custom_board_init.cfg. Then (if your SDRAM was correctly initialized), you should be able to perform debugging operations on the board.

The same board initialization has to be done in the stand-alone version of the project (ROM version), but from within source code. The my_custom_board_init.cfg file is only executed on the target board at the beginning of a debug session.

You can use the Hardware Diagnostics tool (CW menu Tools->Hardware Diagnostics) with your Target Processor, Connection, and my_custom_board_init.cfg file selected in the Hardware Diagnostics -> Configuration panel when testing RAM memory accesses on the board.

I hope this helps,

Black

0 Kudos