DSPRelated.com
Forums

Bootloader for C6711?

Started by dan_eyer July 12, 2002
Hi, I need some advice on how to get a C6711 (on a custom board)
to boot up from flash.

We have an old custom board with a C31 chip. The C31 has built-in
bootloading ability; if the executable was converted correctly
before being placed in the flash, the C31 bootloader will copy
the different sections from flash and place them where they
belong, in both internal and external RAM.

Our new version of this board has a C6711 chip, and I've
converted our software using a DSK board as a testbed. Our new
board works, we can run the software on it, and we can program
the flash on it, but at this late date we are discovering that
we don't know how to make it boot from flash.

Instead of a bootloader, the C6711 simply copies the first 1K
bytes from the flash to the internal RAM, and starts executing
it. The obvious thing to do is to put bootloading code in this
first 1K, but there don't seem to be any tools to generate this
code automatically (which there could be, since CCS has to do
this when you say "Load Program").

The example I got from TI has the addresses and lengths of the
sections that need to be copied hardcoded into the assembly.
Unless I'm mistaken, this would mean that every time I compile
the code, I would have to then check these addresses and lengths
against the map file, and if any have changed I would have to
alter the bootloader code to match, and compile again.

I can't believe there isn't some tool to automate this, but TI
says no. They also said I wasn't the first to be upset about this.

I've contemplated adapting the C31 bootloader code, but that has
its own problems. I've also considered writing a program to
extract the new numbers from the map file, and patch them into
the executable. The best solution would be for CCS to auto-
generate a bootloader when it links, but getting that could take
a while (even though TI hinted that something is being worked on).

I'm hoping that someone has worked out a somewhat general
solution for this already, so I don't have to reinvent the
wheel (again). If not, I'd still appreciate any advice from
people who have dealt with this before.

Thanks,
Dan Eyer

Mayflower Communications Co.