Reply by Robert E. Payan January 20, 20062006-01-20
Hello,

We had a similar problem.
Our problem was that our flash is 16 bit.
The boot process uses DMA to copy the first 1K from flash to on chip ram (
address 0 ).
Since the flash is 16 bit, and address bit 0 is not used, the DMA copied 1K
of even address bytes ( spanning 2K of flash ) to the ram.

We solved this by the following steps:
1. Make the flash section for boot 1K.
2. Move the other sections in flash back 1K - starting flash address is at
2K.
3. Write a small utility that reads the hex file and duplicates all bytes
in the boot section ( first 1K addresses lines ). This doubles the boot
section by making two lines out of one, and adding to the last line if it is
not too long.
4. Use flash burn to program the flash with the altered file. Best regards,
Bob
----- Original Message -----
From: "Jeremy Turner" <jeremy@jere...>
To: <c6x@c6x@...>
Sent: Tuesday, January 17, 2006 8:40 PM
Subject: [c6x] Booting from Flash vs Ram > Hi,
>
> Using DM642 on custom hardware, all hardware has been tested and
> verified (External SDRAM/FLASH etc).
>
> I have a program that runs correctly when loaded via JTAG into RAM and
> executed in CCS. However when the program is loaded from FLASH (via CE0
> boot selection) it does not execute the same.
>
> I know the GEL file in CCS helps setup the EMIF registers/flush cache
> etc. I have also written an asm boot file to setup EMIF registers etc.
> The image that is flashed is obtained after using hex6x and FlashBurn.
>
> What are the differences in startup etc between loading via JTAG
> compared to FLASH?
>
> Does anyone have any ideas on what to look for? I can give more detail
> about the program, but don't want to make my post overly complicated.
>
> Any assistance/pointers on things to try would be much appreciated. > --
> Jeremy Turner
> Design Engineer
> Farco Technologies Ltd www.farco.co.nz
> (+64) 3 374 5533 >
>



Reply by Jeff Brower January 18, 20062006-01-18
Jeremy-

> Using DM642 on custom hardware, all hardware has been tested and
> verified (External SDRAM/FLASH etc).
>
> I have a program that runs correctly when loaded via JTAG into RAM and
> executed in CCS. However when the program is loaded from FLASH (via CE0
> boot selection) it does not execute the same.
>
> I know the GEL file in CCS helps setup the EMIF registers/flush cache
> etc. I have also written an asm boot file to setup EMIF registers etc.
> The image that is flashed is obtained after using hex6x and FlashBurn.
>
> What are the differences in startup etc between loading via JTAG
> compared to FLASH?

One thing to try is use CCS in "observe only" mode:

-modify your Reset vector code (or code soon after)
to do an idle loop; i.e. do nothing once boot
is completed. Add a mem var check that allows this
idle loop code to break and continue

-Reset the system, boot from Flash, etc -- whatever
it is you want to do in stand-alone mode. CCS
should *not* be started or connected at this point

-open CCS with no .gel file; very important this
has to be a "connect only" with no 'Heisenberg'
affect on the measurement

-do a "Load Symbols" -- but download no code

Then at this point if you Halt you should be able to see your code looping. Set the
mem var so the code gets out of the loop, and start single-stepping.

The difficult part of this approach is when code jumps into DSP/BIOS, CSL and other
black-hole initialization blocks, but you can set breakpoints based on symbols to get
past those. At some point your code will "go in but not come out", or at least come
out looking defeated in battle, and that's where you can find something.

-Jeff



Reply by Jeremy Turner January 18, 20062006-01-18
Hi,

Using DM642 on custom hardware, all hardware has been tested and
verified (External SDRAM/FLASH etc).

I have a program that runs correctly when loaded via JTAG into RAM and
executed in CCS. However when the program is loaded from FLASH (via CE0
boot selection) it does not execute the same.

I know the GEL file in CCS helps setup the EMIF registers/flush cache
etc. I have also written an asm boot file to setup EMIF registers etc.
The image that is flashed is obtained after using hex6x and FlashBurn.

What are the differences in startup etc between loading via JTAG
compared to FLASH?

Does anyone have any ideas on what to look for? I can give more detail
about the program, but don't want to make my post overly complicated.

Any assistance/pointers on things to try would be much appreciated. --
Jeremy Turner
Design Engineer
Farco Technologies Ltd www.farco.co.nz
(+64) 3 374 5533