This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ERROR(CMD16-TAD59-NAL63): ! Failed to load "helloWorld.axf"

Hi all,

I am working on Agilex-7 SoC Dev-Kit and currently I'm facing a problem while trying to debug a simple hello world app. The error is "ERROR(CMD16-TAD59-NAL63): ! Failed to load "helloWorld.axf" ! Download of 145.536 bytes to address EL3:0x0000000000008000 failed while writing block of 4.096 bytes to address EL3:0x0000000000008000"

Could you please help about that?

Best Regards,

Balerion

Parents
  • Hi Balerion

    Glad to hear that you can now access the peripherals via the debugger :)

    It is puzzling that you can read/write the clock manager block from C code, but only read (and not write) the UART.

    Peripheral registers are sometimes sensitive to the width of the memory access by the processor.  For example, a 32-bit peripheral register might only be accessible with 32-bit read/write instructions (LDR/STR), and 8/16/64-bit accesses won't work.

    Sorry, I don't know the size of the UART registers in your hardware, or whether they have access size constraints like this.  Suggest you check which load/store instructions are being generated when you compile your code.  You can do this by setting a breakpoint in your code just before you try to write to the UART, then open the Disassembly view.  You can then single-step at assembly level through the code (press F10 to toggle between single-stepping at instruction level and source-code level) and check whether it is working correctly.

    If the UART registers are sensitive to the width of the memory access by the processor, then you might need a cast in your C code to force a particular access size load/store instruction to be generated, e.g. "*(short *)" for 16-bit LDRB/STRB.

    As I mentioned before, you can also use the Debugger CLI to force a particular access size read/write, which can be useful for testing.

    Also check that you have marked the peripherals as "volatile" in your C code.

    Stephen

Reply
  • Hi Balerion

    Glad to hear that you can now access the peripherals via the debugger :)

    It is puzzling that you can read/write the clock manager block from C code, but only read (and not write) the UART.

    Peripheral registers are sometimes sensitive to the width of the memory access by the processor.  For example, a 32-bit peripheral register might only be accessible with 32-bit read/write instructions (LDR/STR), and 8/16/64-bit accesses won't work.

    Sorry, I don't know the size of the UART registers in your hardware, or whether they have access size constraints like this.  Suggest you check which load/store instructions are being generated when you compile your code.  You can do this by setting a breakpoint in your code just before you try to write to the UART, then open the Disassembly view.  You can then single-step at assembly level through the code (press F10 to toggle between single-stepping at instruction level and source-code level) and check whether it is working correctly.

    If the UART registers are sensitive to the width of the memory access by the processor, then you might need a cast in your C code to force a particular access size load/store instruction to be generated, e.g. "*(short *)" for 16-bit LDRB/STRB.

    As I mentioned before, you can also use the Debugger CLI to force a particular access size read/write, which can be useful for testing.

    Also check that you have marked the peripherals as "volatile" in your C code.

    Stephen

Children