This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320C6713B: secondary BootLoader

Part Number: TMS320C6713B

Tool/software: TI C/C++ Compiler

Hi,

I am working of dsk6713 secondary bootloader. I found some sample code in https://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/144437 . The code is really simple and straight forward. just two confusion points:

1) How CODE_SIZE -4 = BOOT_SIZE -1024???

2) Why B6 is loaded again and again with same Constant value i.e.  CODE_SIZE-4 in loop?

3) Why A1 is incremented first and then the high 16 bits are loaded into B6. i.e. why MVKL and MVKH is splited?



CODE_SIZE .equ 0x0003ffff _boot_loop1: ldb *B4++,B5 ;flash read mvkl CODE_SIZE-4,B6 ;B6 = BOOT_SIZE -1024 add 1,A1,A1 ;A1+=1,inc outer counter || mvkh CODE_SIZE-4,B6 cmplt A1,B6,B0

  • Hi,

    I've notified the sw team. Feedback will be posted here.

    Best Regards,
    Yordan
  • Thanks Yordan Kovachev.
  • Aimal,

    You do do not want to learn C6000 assembly by asking 'why is this done?' on the forum. And you not want to use the code from that thread.

    If you want to learn assembly code, read the CPU & Instruction Set Reference Guide for the C6713. Write a simple program in C and keep the asm file, read it, and look up the instructions and syntax in the CPU & Inst Set RG.

    For a 'secondary bootloader', please refer to the Assembly Language Tools User Guide. Section 7 has a section on Linker-Generated Copy Tables with explanations and example C code to use.

    Regards,
    RandyP
  • Dear RandyP, I am currently looking at c6000 assembly, I am sorry if i am not moving with the required speed. I perfectly understand whats going on in the assembly i gave in the thread. The problem is not about not knowing what the given instructions do, the problem is i couldn't interpret the logic used. If you look at the bulleted question i have given, neither of them says how instruction works, I am actually trying to figure out the logic used. for e.g.

    mvkl CODE_SIZE-4,B6 ;B6 = BOOT_SIZE -1024

    in this piece of assembly, i checked by debugging and from auxiliary register B6, CODE_SIZE -4 was not equal to BOOT_SIZE -1024 but the comment say so.

    Dear RandyP, I will again try to deep dive into assembly and expecially the section you referred. I will let you know then. Bundle of Thanks.

    Kind regards,
    Aimal.
  • Aimal,

    aimal khan said:
    mvkl CODE_SIZE-4,B6 ;B6 = BOOT_SIZE -1024

    in this piece of assembly, i checked by debugging and from auxiliary register B6, CODE_SIZE -4 was not equal to BOOT_SIZE -1024 but the comment say so.

    TI did not write this code so we cannot say why the comment is written as it is.

    Regards,
    RandyP