AnsweredAssumed Answered

What is the "target init script"?

Question asked by HENRY MCDONALD on Sep 15, 2017
Latest reply on Sep 18, 2017 by HENRY MCDONALD

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

Outcomes