回复: Re: How to use visionC lick to program MPC555 shadow and boot from internal flash?
pegasus wu <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Dear David ,
Thank you so much!
I do have two REG files, one for programming the shadow and another for the Main flash. The diffrence of them is that in the former :CMFMCR_A is 89FF00FF(SIE bit is 1 ) , and in the later : CMFMCR_A is changed into 81FF00FF. But I still have some problems when operation in VisionClick to program the shadow.
formerly the board would read the reset configuration word form the databus and when i programming, I just program the Main flash and in visionClick I just select the : MPC555 K1,2,3,M ( 448 x 8 ) 1 Device” Driver.
and all these do work.
But here I want the board would read the Shadow when rest or power on, so when I change the .reg file, and before programming the shadow, which driver should I select ? There is no such drivers just for shadow in my visionClick.
another question is : how I get the special .bin(256 byte)
file for the shadow? the visionclick have provide a example 256_shadow.bin ( please see the following) but
it's more than 256 byte! More over, how I change this example for my application?
dear Dees Randy-rsaf has provded me a sample code for shadow:S107000010000000E8, but I don't kown how to make it suit for the visionClick spesial .bin file style!
I think the first 32 bit in the shadow should be:0x1040 0000, that is : the bit 20 should be 0?
Best regards!
David Wybo <[email protected]> 写道:
You need to think about this as two separate steps. Think of the shadow
flash as a separate flash array. So, you need to program the main flash
array with your program and then program the shadow flash.
Here is how I do it. I set up a REG file to configure the target the way
I want. I then set up a second REG file that is just a copy of the first
one, except the CMFMCR bit is configured to shadow flash.
I then program the main flash with my executable program, using the REG
file with VisionCLick that uses the main flash array. Then I invoke
VisionCLick again, only this time I program a special BIN file
containing only 256 bytes (size of shadow flash) and has the proper
value for my reset config word in it. I use the second REG file above
with VisionCLick to do this programming.
Additionally, when I build my executable program, I know whether I am
building to run out of internal flash, external flash, or RAM, so I have
my initialization code written to use global symbols as the values to
program the CS registers. THese global symbols are defined in one of
three linker command files, and I choose the appropriate linker command
file based on where I want the code to run.
This way, I can have a makefile that I run and all I need to tell it is
where I want the code to execute, iflash, xflash, or ram. The
appropriate linker command file is used for linking, so the memory maps
are correct, the CS registers are programmed properly, and the rest of
the application does not need to change. The makefile then determines if
the shadow flash needs to be programmed and does the proper flashing steps.
I hope this helps you.
wupegasus wrote:
>In last few days I have asked some question about my MPC555 board
>and Many kindhearted men have helped me! Thank all!
> Now I think My board is ok and the problen is that: I do not
>program the Shadow as someone told me!
> HereI describe the problem again and wish someone who familiar the
>visionClick and MPC555 can help me about this!
>
> My MPC555 development platform inlude: Tornado for OSEKWorks,
>Visionprobe II, VisionClick 7.10.
> Now I meet some problems in developing the minimum mpc555
>system, that is : I do not extend the Data bus out and let the
>RSTCONF* connectted to the SRESET*, still I wish the cpu would read
>the reset configuration word form the shadow, not the Data bus, and
>then boot from the internal flash.
>
> Usually, in my former board, I have extend the databus and make
>the CPU read the reset configuration word for Databus. So I need not
>burn the shadow. After I finished the programming in the Tornado,
>I will do the following steps to make it boot from internal board:
>
>1。Make the project in Tornado and then get the *.elf file
>2. Use the "convert" tools to convert the *.elf to *.bin
>3. Use "mpc555fc.exe" to produce the special *.bin(449k)
>4. Use the program the flash tool : Select the “00: MPC555 K1,2,3,M
>( 448 x 8 ) 1 Device” Driver.
>5. set internal RAM workspace starting at 0x003F9800.
>6.Set physical flash Base Address to 0x0*.
>7.Click on “Erase-only”. This will erase BOTH Shadow and Main
>Arrays.
>8.Program data into Main array (448K-bytes,)
>
>After these, my board will read the RCW form the Data bus and then
>boot from the internal flash when power on or reset. All these are
>ok for my applications.
>
>Now I think I need not extend the Data bus out and let the RSTCONF*
>connectted to the SRESET*. I wish the cpu would read the reset
>configuration word form the shadow, but not the Data bus, and then
>boot from the internal flash when power on or reset..
>
> I have read the Application Note-AN-0043, and iact as follows:
>
>1 Select the “00: MPC555 K1,2,3,M ( 448 x 8 ) 1 Device” Driver.
>2 Use internal RAM workspace starting at 0x003F9800.
>3 Set physical flash Base Address to 0x0*.
>4 Run any target prerequisite programs/scripts, e.g. enable VPP,
>and force Sys. Clock to 40MHz(4*10,My MF is 9) etc.
>5 Click on “Erase-only”. This will erase BOTH Shadow and Main
>Arrays.
>6 manually set CMFMCR_A SIE bit to“1” in the register .
>7 Program data into Shadow array (256 bytes) (I do not kown how to
>prepare the *.bin for the shadow!!!! So i juast use your dSample
>test files “256_shdw.bin” )
>8 After completion, return the CMFMCR_A SIE bit to “0” .
>9 Program data into Main array (448K-bytes,) ( the same pragram for
>former board )
> And then remove the Probe. when power on, the board should read
>the Reset configuration word from the shadow and boot from the
>internal flash. But it does not work at all!
>
> Here I would appreciate much if you can tell me what I should do ?
> Especially, I am not clear about the following questions:
>1.how to prepare the *.bin which would program into the shadow?
>2. Just as I have mentioned, for the minimum system, what I should
>write into the CMFCFIG in 0x0000 of shadow?
>3.When program the shadow, what kind of Device Driver should I
>select ? Still the “00: MPC555 K1,2,3,M ( 448 x 8 ) 1 Device”?
>
> I really appreciate much for your help!
> Best regards!
> wu
>
>
>
>
>
>
>
>
>-----------------------------------------------------------
>To learn more about Freescale Microcontrollers, please visit
>http://www.freescale.com/mcu
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
--
David Wybo mailto:[email protected]
RealTime Consultants, Inc. Phone: 248.345.6160
www.realtimeconsultantsinc.com
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "MPC500" on the web.
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
DO YOU YAHOO!?
雅虎免费G邮箱-No.1的防毒防垃圾超大邮箱
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h1tjjk8/M=362131.6882499.7825260.1510227/D=groups/S=1706554205:TM/Y=YAHOO/EXP=1124549432/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life -brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/