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
Hello Stephen,
I tried to reduce 1024 to 4, 32, 40 etc. and I saw the memory addresses in memory tab. But I realized that I couldn't write to registers in uart0, uart1, i2c and some other peripherals too. I can only read them, but I have RW access to those registers. I tried to read and write to clock manager block's registers and I am able to RW them. Then I tried to change the registers of uart0 from memory view not in my code, I changed them. So, It seems that I am not able to write to registers of some peripherals in my code while I can change them in memory tab. Do you know what may the problem be here? If so, I'd glad to hear it. Otherwise, I'm going to ask this in Intel's forum however, there are some posts of mine which are still waiting to be responded.
Hi BalerionGlad 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
Hi Stephen,
Thanks for your response. I am currently able to RW to peripherals. That is why I wanted to send a byte from Uart0. I configured its baud rate, parity, stop bit and fifos. Then, I tried to send data from uart but there occured a problem. In console it says "NCONT ERROR in ACK for access 0: ACK = 0x01" Since, I programmed my qspi flash with .jic file which contains .sof and .hex(First stage bootloader) that is why u-boot is writing something from uart0 to my terminal. I don't know what the problem here is. Do you have any idea about it?
Balerion.
Hi again,
Sorry, I have no knowledge of the peripherals on the Intel platforms. You'll need to ask on the Intel forums.
Stephen
Thanks for everything. This post can be marked as solved.