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.

Unexpected behaviour when using "load" and "run" directive in linker command file

Hi All,

I add the statements in my cmd file like:

main_code_sect  : load = 0x82000000,
                                   run = 0x10800000

which main_code_sect is the code section where main() function located in. I originally want the section to be loaded in DDR3 and run in L2SRAM.

But the running result is the same on both simulation and emulation, the program seems run to collapse.

I have disabled the L1P and L2 cache before. I also repeat the test in the section rather than main(), it's the same...

Allen

 

  • Okay, the Assembly Language Tools denotes that it's user's responsibility to copy the section from its load address to run address in the run-time.

    So I manually copy the code from source to destination before invoking it and it works well.