DSPRelated.com
Forums

c6711 DSP/BIOS bootloader problem

Started by drag...@yahoo.com April 6, 2008
Hi,

Ie have try to make it hundred of times but without success. After
reading the TI's PDF (spra999a.pdf) I wrote the bootloader without
DSP/BIOS and it is running ok. Unfortunately it is not the same with
the BIOS version.
The first 1k is well copied into the internal ram. The copy table is
read properly and all sections are placed where they have to be. But
when the DSP jump to the entry point, the LEDs are not flashing. If
the DSP is reset from the CCS menu and then load the OUT file they
start flashing …
Please give us some advices, since I need only this to complete my project.
I would be very thankful if you can send me some example project (not
for 6713) that is really working (on the 6711DSK or any other 6711
board)!

Thanks in advance,
Dragomir Nikolov

P.S. there are some sections that are excluded from the HEX file,
since it is in runtime autoinit:

-boot
-bootorg 0x90000400
-bootsection .boot_load 0x90000000

-exclude .sts
-exclude .log
-exclude .args
-exclude .LOG_system$buf
-exclude .LOG_MW1$buf
-exclude .stack
-exclude .logTrace$buf
Dragomir,

On 4/6/08, d...@yahoo.com wrote:
> Hi,
>
> Ie have try to make it hundred of times but without success. After
> reading the TI's PDF (spra999a.pdf) I wrote the bootloader without
> DSP/BIOS and it is running ok. Unfortunately it is not the same with
> the BIOS version.
> The first 1k is well copied into the internal ram. The copy table is
> read properly and all sections are placed where they have to be. But
> when the DSP jump to the entry point, the LEDs are not flashing. If
> the DSP is reset from the CCS menu and then load the OUT file they
> start flashing
> Please give us some advices, since I need only this to complete my project.
> I would be very thankful if you can send me some example project (not
> for 6713) that is really working (on the 6711DSK or any other 6711
> board)!
[mld] Do you have a branch to the entry point in your reset vector??
>
> Thanks in advance,
> Dragomir Nikolov
>
> P.S. there are some sections that are excluded from the HEX file,
> since it is in runtime autoinit:
>
> -boot
> -bootorg 0x90000400
> -bootsection .boot_load 0x90000000
>
> -exclude .sts
> -exclude .log
> -exclude .args
> -exclude .LOG_system$buf
> -exclude .LOG_MW1$buf
> -exclude .stack
> -exclude .logTrace$buf
>
>
>
> Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
>
>
>
>
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php


Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
Thanks for the reply Michael!
Yes, I have a branch to the entry point. The DSP goes to the CINIT section and its behavior becomes stranger. Instead of free running it starts to execute the assembly instruction step by step (I did not put any breaks). I have no idea what is written inside CINIT, therefore I cannot understand is the DSP performs correct.
P.S. I had to modify the boot code for the BIOSed version. When it is for NONBIOS it reads the flash by 16 bits at instruction (mvkl). The BIOSed one, reads the flash by 8bit instruction (ldb) in order to get the correct data. Do you have any idea what caused this since the EMIF initialization is the same?

Hi,
>
>Ie have try to make it hundred of times but without success. After
>reading the TI's PDF (spra999a.pdf) I wrote the bootloader without
>DSP/BIOS and it is running ok. Unfortunately it is not the same with
>the BIOS version.
>The first 1k is well copied into the internal ram. The copy table is
>read properly and all sections are placed where they have to be. But
>when the DSP jump to the entry point, the LEDs are not flashing. If
>the DSP is reset from the CCS menu and then load the OUT file they
>start flashing …
>Please give us some advices, since I need only this to complete my project.
>I would be very thankful if you can send me some example project (not
>for 6713) that is really working (on the 6711DSK or any other 6711
>board)!
>
>Thanks in advance,
>Dragomir Nikolov
>
>P.S. there are some sections that are excluded from the HEX file,
>since it is in runtime autoinit:
>
>-boot
>-bootorg 0x90000400
>-bootsection .boot_load 0x90000000
>
>-exclude .sts
>-exclude .log
>-exclude .args
>-exclude .LOG_system$buf
>-exclude .LOG_MW1$buf
>-exclude .stack
>-exclude .logTrace$buf
>
Dragomir,

On 4/7/08, d...@yahoo.com wrote:
> Thanks for the reply Michael!
> Yes, I have a branch to the entry point. The DSP goes to the CINIT section and its behavior becomes stranger. Instead of free running it starts to execute the assembly instruction step by step (I did not put any breaks).

[mld] Are you saying that the DSP halts, you hit run, and it goes 1
instruction and halts again. If yes, your data is probably incorrect
and the disassembly window shows a lot of 'weird stuff' [some .byte,
.word, etc that represent non-executable code]. The addresses that you
are stopping on will have bit 28 set [0x10000000] indicating a
breakpoint.

I have no idea what is written inside CINIT, therefore I cannot
understand is the DSP performs correct.

[mld] When troubleshooting this type of problem, I don't initially try
to understand cinit. I take my original 'out' file, load it with CCS,
set the PC to 0, step to cinit, maxmize the disassembly window, and
save the screen as a reference. Now I can put a breakpoint at the end
of my loader and asm step to cinit. Maximize the diasm window and
look for differences between it and my reference. Usually there is a
big enough difference that immediately 'jumps out at me' and I see
what is broken.

> P.S. I had to modify the boot code for the BIOSed version. When it is for NONBIOS it reads the flash by 16 bits at instruction (mvkl). The BIOSed one, reads the flash by 8bit instruction (ldb) in order to get the correct data. Do you have any idea what caused this since the EMIF initialization is the same?

[mld] Are you saying that the data is incorrect if you read 16 bits at a time??
If yes, [a] does it start out 'good' and then 'get bad' or [b] is it
always bad??
case a - probably a memory alignment problem caused by odd sized
'byte' variables
case b - something is very wrong somewhere.
A suggestion for troubleshooting:
Can you modify the base address of your loader to point to 'high
SDRAM', preload your image in high SDRAM, load the 1st 1k of mem from
Flash or an 'out' file, and troubleshoot from there. It is a lot
easier than 're-flashing' to test changes.

>
> Hi,
> >
> >Ie have try to make it hundred of times but without success. After
> >reading the TI's PDF (spra999a.pdf) I wrote the bootloader without
> >DSP/BIOS and it is running ok. Unfortunately it is not the same with
> >the BIOS version.
> >The first 1k is well copied into the internal ram. The copy table is
> >read properly and all sections are placed where they have to be. But
> >when the DSP jump to the entry point, the LEDs are not flashing. If
> >the DSP is reset from the CCS menu and then load the OUT file they
> >start flashing
> >Please give us some advices, since I need only this to complete my project.
> >I would be very thankful if you can send me some example project (not
> >for 6713) that is really working (on the 6711DSK or any other 6711
> >board)!
> >
> >Thanks in advance,
> >Dragomir Nikolov
> >
> >P.S. there are some sections that are excluded from the HEX file,
> >since it is in runtime autoinit:
> >
> >-boot
> >-bootorg 0x90000400
> >-bootsection .boot_load 0x90000000
> >
> >-exclude .sts
> >-exclude .log
> >-exclude .args
> >-exclude .LOG_system$buf
> >-exclude .LOG_MW1$buf
> >-exclude .stack
> >-exclude .logTrace$buf
> >
> >
> >
> >Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
> >
> >
>
> Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
>
>
>
>
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php


Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution for Commercial & Consumer End Equipment: www.ti.com/dm6467
You can launch CCS
do a reset, and step through the code.
the cinit source code can be found in the libraries in CCstudio folder, basically it copies initialisation tables into non initialised areas and then call the main.

Regards