What is the "target init script"?

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

What is the "target init script"?

850 Views
henrymcdonald
Contributor I

I am new to the ColdFire processor and CodeWarrior in general.  I have inherited a project which I am attempting to modify.  I have successfully compiled the original application and programmed it onto the target.  After programming the target, I power cycle the system.  Upon powering up, the application begins to run, but it isn't running correctly.  The symptom is essentially that a 2x16 character LCD isn't being written to properly.  It almost looks like one of the command lines isn't being controlled properly as I see text only on the top line and the contrast isn't quite right.

If, after power cycling, I hit the Debug button in CodeWarrior, I get a pop-up box.  In that box, it states:

Execute Target Initialization File

Connection already established

Click 'Yes' to execute the initialization file.

Click 'No' to bypass the initialization file.

Click 'Cancel' to abort the session.

(Change 'Re-execute target init script' Preference in 'Debugger -> Global Settings' to supp

If I click "No", the application runs in the debugger with the improper behavior.  However, if I hit the "Yes" button, the application works as expected.

I've found the actual config file, and it looks like it is writing to some registers.  

What is this config file doing that the MCU initialization code isn't doing?

Config file contents:

ResetHalt

; Set VBR to the beginning of what will be SRAM
; VBR is an absolute CPU register
writecontrolreg 0x0801 0x20000000

; Set RAMBAR1 (SRAM)
writecontrolreg 0x0C05 0x20000021

; Set FLASHBAR (Flash)
writecontrolreg 0x0C04 0x00000061

; Enable PST[3:0] signals
writemem.b 0x40100074 0x0F

0 Kudos
2 Replies

685 Views
henrymcdonald
Contributor I

I don't know what the target init script is, but my issue has been resolved.  This has been a small storm of issues due to the PCB not matching the schematic and the LCD apparently having been customized so that the pinout doesn't match the datasheet, but it is sufficient to say that the LCD initialization appears to have been happening too quickly in the startup routine.  Adding a delay has resolved the issue.

0 Kudos

685 Views
henrymcdonald
Contributor I

This may not be an issue.  I've hooked up a logic analyzer to the board and recorded the first 20 seconds of the data on all of the LCD lines.  It appears to be nearly identical, so I'm starting to suspect that this is a power up issue.  

0 Kudos