AR# 70121

SDK - Green Hills Memory write error at 0x10000. Invalid address

Description

When an ELF file compiled with the Green Hills toolchain is downloaded using the dow command in XSCT, a memory write error is generated even with a correct memory map:

Failed to download <application.elf>
xsct% Memory write error at 0x10000. Invalid address


This error is due to XSDB making use of the paddr field of the ELF Program Header when downloading an ELF file to the target. 

The Linaro toolchain included in Xilinx SDK sets both vaddr and paddr fields, however GHS only makes use of vaddr so the loading process fails when an ELF file compiled with GHS is being used.

StartApplication.elf:     file format elf32-littlearm
StartApplication.elf
architecture: arm, flags 0x00000012:
EXEC_P, HAS_SYMS
start address 0x01001004

Program Header:
    LOAD off    0x00000540 vaddr 0x01001000 paddr 0x00000000 align 2**4
         filesz 0x00000134 memsz 0x00000134 flags r-x
    LOAD off    0x00000674 vaddr 0x01001134 paddr 0x00000000 align 2**2
         filesz 0x0000002c memsz 0x0000002c flags r-x

...


This issue is present up to the SDK 2018.3 release.

Solution

There are two work-arounds for this issue.

  1. Use a binary file rather than ELF.

dow -data test.bin <addr>
  1. Patch SDK to include -vaddr option for the dow command.

dow -vaddr application.elf

Patch installation:

  1. Extract the patch into a known folder
  2. Set XILINX_PATH to point to the patch folder


For more details on patch usage see (Xilinx Answer 66722)

Attachments

Associated Attachments

Name File Size File Type
ar70121_2017_4_patch.zip 181 KB ZIP
ar70121_2018.1_patch.zip 201 KB ZIP

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
66303 SDK 2018.2 - Release Notes and Known Issues N/A N/A
70372 SDK 2017.4 - Release Notes and Known Issues N/A N/A
70673 SDK 2018.1 - Release Notes and Known Issues N/A N/A
AR# 70121
Date 12/10/2018
Status Active
Type Known Issues
Tools More Less