Ok, the issue seems in your configuration.
You are building your UEFI image with Linux or Cygwin (see path
'/home/..../edk2/Build/MyBoard') while you are trying to debug it with
Windows (see 'Z:\....\cmd_load_symbols.py').

The DS-5 command 'set substitute-path path1 path2' might help you:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0452c/CIHJFHH
J.html
Could you before running the script call:
set substitute-path /home/..../edk2 'Z:\....\edk2

I have just had confirmation from the DS-5 team that the DS-5 debugger will
automatically handle both \ and /.

Another way is to manually load the symbols in DS-5:
add-symbole-file
Z:\....\edk2\MyBuild\Board\DEBUG_ARMGCC\ARM\ArmPlatformPkg\PrePi\PeiUniCore\
DEBUG\ArmPlatformPrePiUniCore.dll 0x90001180

Olivier


> -----Original Message-----
> From: Prabhakar Kushwaha [mailto:prabha...@freescale.com]
> Sent: 23 October 2013 11:06
> To: Olivier Martin; 'Sharma Bhupesh-B45370'; edk2-
> de...@lists.sourceforge.net; 'Andrew Fish'
> Cc: 'Kim Phillips'; boot-architecture@lists.linaro.org; Kushwaha
> Prabhakar-B32579
> Subject: Re: [edk2] Debugging Sec and PI phases {Source symbols}
> 
> Hi Oliver,
> 
> at very early stage UEFI firmware is present in DRAM.
> with DDR mapped from 0x90000000 size 512MB.
> 
> while running source Z:\....\cmd_load_symbols.py -f
> (0x90001000,0x20000000) -a -v, I am getting following error
> 
> Add symbols of
> /home/<...>/edk2/MyBuild/Board/DEBUG_ARMGCC/ARM/ArmPlatformPkg/PrePi/Pe
> iUniCore/DEBUG/ArmPlatformPrePiUniCore.dll
> at 0x90001180
> Warning: not possible to load symbols from
> /home/..../edk2/Build/MyBoard/DEBUG_ARMGCC/ARM/ArmPlatformPkg/PrePi/Pei
> UniCore/DEBUG/ArmPlatformPrePiUniCore.dll
> at 0x90001180
> Note: no symbols have been found in System Memory (possible cause: the
> UEFI permanent memory has been installed yet)
> 
> 
> Also FDF file has following entries
> [FD.MyBoard_EFI]
> BaseAddress   = 0x90001000|gArmTokenSpaceGuid.PcdFdBaseAddress #The
> base
> address of the DDR Device.
> Size          = 0x20000000|gArmTokenSpaceGuid.PcdFdSize #The size in
> bytes of the DDR Device
> ErasePolarity = 1
> BlockSize     =  0x00001000
> NumBlocks     = 0x20000
> 
> 
> Regards,
> Prabhakar
> 
> 
> On 10/23/2013 03:22 PM, Olivier Martin wrote:
> > To parse your FV file (embedded in your FD file), you can use
> > './BaseTools/BinWrappers/PosixLike/VolInfo <location of your FV
> file>'
> >
> > If you want to debug the early stage of your UEFI boot process, you
> can only
> > use (you do not need -m (...,...)):
> > source edk2/ArmPlatformPkg/Scripts/Ds5/cmd_load_symbols.py -f
> (..,...) -a -v
> >
> > At the early stage of the boot, the UEFI firmware has not loaded its
> > binaries into DRAM yet.
> > The UEFI System Table will not be found in System Memory.
> >
> > Where your UEFI firmware lives when started? In DRAM or in Flash/ROM
> memory?
> >
> >> -----Original Message-----
> >> From: Sharma Bhupesh-B45370 [mailto:b45...@freescale.com]
> >> Sent: 23 October 2013 06:33
> >> To: Olivier Martin; edk2-de...@lists.sourceforge.net; 'Andrew Fish'
> >> Cc: 'Kim Phillips'; boot-architecture@lists.linaro.org; Kushwaha
> >> Prabhakar-B32579
> >> Subject: RE: [edk2] Debugging Sec and PI phases {Source symbols}
> >>
> >> Hi Olivier,
> >>
> >> I tried to use the DS-5 scripts, but landed in some issues, like:
> >> "System table not found in System Memory".
> >>
> >> It seems there is some issue with the .FD gets generated for my
> >> BoardPkg.
> >>
> >> I am also now trying to understand if there is some
> documentation/tool
> >> available that
> >> can parse my .FD and .FV files and can tell me about the sections in
> >> this particular output
> >> file. For e.g. something like 'readelf -a XXX.ELF' produces as an
> >> output.
> >>
> >> Also I am using the following method to build the .FD to allow
> >> debugging of the source
> >> using the DS5 scripts:
> >> - export EDK2_DSC, EDK2_TOOLCHAIN, EDK2_ARCH, EDK2_BUILD.
> >>
> >> - Run 'make -f ArmPlatformPkg/Scripts/Makefile'
> >>
> >> - This will generate a .FD specific to my Board Pkg in
> >> 'Build/Board_Pkg_Name/DEBUG_ARMGCC/..'
> >>
> >> - Load this .FD using the DS5 and then try to load source symbols
> >> using:
> >> source edk2/ArmPlatformPkg/Scripts/Ds5/cmd_load_symbols.py -f
> (..,...)
> >> -m (..,...) -a
> >>
> >> - This gives me an error:
> >> "System table not found in System Memory".
> >>
> >> Any pointers on the above two points..
> >>
> >> Regards,
> >> Bhupesh
> >>
> >>> -----Original Message-----
> >>> From: boot-architecture-boun...@lists.linaro.org [mailto:boot-
> >>> architecture-boun...@lists.linaro.org] On Behalf Of Olivier Martin
> >>> Sent: Tuesday, October 22, 2013 2:27 PM
> >>> To: edk2-de...@lists.sourceforge.net; 'Andrew Fish'
> >>> Cc: 'Kim Phillips'; boot-architecture@lists.linaro.org; Kushwaha
> >>> Prabhakar-B32579
> >>> Subject: RE: [edk2] Debugging Sec and PI phases {Source symbols}
> >>>
> >>> Hi Bhupesh,
> >>> Yes, if you are using ARM DS-5, this is the wikipage to look at to
> >> setup
> >>> your environment to debug UEFI. Let me know if you have issue.
> >>> Regards,
> >>> Olivier
> >>>
> >>>> -----Original Message-----
> >>>> From: Sharma Bhupesh-B45370 [mailto:b45...@freescale.com]
> >>>> Sent: 22 October 2013 07:56
> >>>> To: 'Andrew Fish'; 'edk2-de...@lists.sourceforge.net'
> >>>> Cc: 'Kim Phillips'; 'boot-architecture@lists.linaro.org'; Kushwaha
> >>>> Prabhakar-B32579
> >>>> Subject: Re: [edk2] Debugging Sec and PI phases {Source symbols}
> >>>>
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: boot-architecture-boun...@lists.linaro.org [mailto:boot-
> >>>>> architecture-boun...@lists.linaro.org] On Behalf Of Andrew Fish
> >>>>> Sent: Tuesday, October 22, 2013 2:07 AM
> >>>>> To: edk2-de...@lists.sourceforge.net
> >>>>> Cc: 'Kim Phillips'; 'boot-architecture@lists.linaro.org';
> >> Kushwaha
> >>>>> Prabhakar-B32579
> >>>>> Subject: Re: [edk2] Debugging Sec and PI phases {Source symbols}
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Oct 21, 2013, at 11:38 AM, Sharma Bhupesh-B45370
> >>>>> <b45...@freescale.com> wrote:
> >>>>>
> >>>>>> [Resending as I got a 'You must be subscribed to post messages
> >> to
> >>>> this
> >>>>>> mailing list' message from edk2 list]
> >>>>>>
> >>>>>> Hi List,
> >>>>>>
> >>>>>> I am new to UEFI and am trying to debug my UEFI ported code
> >> (from
> >>>> u-
> >>>>> boot) on a ARMv7 based SoC.
> >>>>>> I am able to do some basic debugging of the ARM CPU init code
> >>>>>> using
> >>>> a
> >>>>> DS-5 debugger attached to the board.
> >>>>>> I see that the ported code crashes somewhere while making a
> >>>> transition
> >>>>> from Sec to PI phase.
> >>>>>> However, I can only verify this by seeing instruction level
> >>>>>> disassembly. I cannot figure out a way to load the source code
> >>>> using
> >>>>> the DS-5 debugger.
> >>>>>> I am used to seeing ELF files which have the debug information
> >> and
> >>>>> which can be loaded via the debugger.
> >>>>>> Using the 'file' command I cannot find any ELF file in the
> >> output
> >>>>>> directory 'Build/..'. The FV and FD files don't seem to be ELF
> >>>> files as
> >>>>> well.
> >>>>> FD is short for Flash Device. So it is usually the layout of the
> >> ROM.
> >>>> You
> >>>>> could have multiple ROMs, but the most common thing is to just
> >> have
> >>>>> a single FD.
> >>>>> FV is a Firmware Volume. Basically a simple Flash Filesystem that
> >>>> allows
> >>>>> files, named by GUIDs to be discovered.
> >>>>>
> >>>>> EFI is a collection of relocatable PE/COFF images, and in general
> >> an
> >>>> INF
> >>>>> file (no for a library) in your project maps to a PE/COFF file
> >>>> getting
> >>>>> generated.
> >>>>>
> >>>>> It can vary by compiler, but it is common for the *.dll file to
> >> be
> >>>> the
> >>>>> native image with the debug info. So that is the file you want to
> >>>> load
> >>>>> symbols for.
> >>>>>
> >>>>> There are various schemes on how to do this. Some platforms print
> >>>>> out debug messages that map into the commands you need to load
> >>> symbols.
> >>>> Some
> >>>>> platforms have scripts that can load symbols.
> >>>>>
> >>>>> Sorry I don't remember the latest recommendation on which scheme
> >> to
> >>>> use
> >>>>> for your platform? Try looking at the *.Fv.map file as I think it
> >>>>> has info about how to load symbols. You would need a script to
> >>>>> convert
> >>>> this
> >>>>> into some format the DS-5 understands.
> >>>>>
> >>>>> Maybe the scripts in
> >>>>>
> >>
> https://svn.code.sf.net/p/edk2/code/trunk/edk2/ArmPlatformPkg/Scripts/
> >>>> D
> >>>> s5
> >>>>> / are what you are looking for?
> >>>> Many thanks Andrew. It seems the DS5 scripts will work for me. I
> >> found
> >>>> the wiki for the same here:
> >>>>
> >>
> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPkg
> >>>> /
> >>>> Ds5
> >>>>
> >>>> I will try to debug the target using these scripts and get back
> >> with
> >>>> my results.
> >>>>
> >>>> Regards,
> >>>> Bhupesh
> >>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Andrew Fish
> >>>>>
> >>>>>> Any pointers to which ELF file is generated while compiling a
> >> UEFI
> >>>>>> BoardPkg and how it can be loaded via the debugger.
> >>>>>>
> >>>>>> Thanks for your help.
> >>>>>> Regards,
> >>>>>> Bhupesh
> >>>>>>
> >>>>>>
> >>>>>> ---------------------------------------------------------------
> >> ---
> >>>>>> -
> >>>> ---
> >>>>>> -------- October Webinars: Code for Performance Free Intel
> >>>>>> webinars can help you accelerate application performance.
> >>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get
> >>>>>> the most from the latest Intel processors and coprocessors. See
> >>>> abstracts
> >>>>>> and register >
> >>>>>>
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.c
> >>>>>> lktrk _______________________________________________
> >>>>>> edk2-devel mailing list
> >>>>>> edk2-de...@lists.sourceforge.net
> >>>>>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> >>>>>
> >>>>> _______________________________________________
> >>>>> boot-architecture mailing list
> >>>>> boot-architecture@lists.linaro.org
> >>>>> http://lists.linaro.org/mailman/listinfo/boot-architecture
> >>>>
> >>>>
> >>>> ------------------------------------------------------------------
> -
> >> ---
> >>>> -
> >>>> -------
> >>>> October Webinars: Code for Performance Free Intel webinars can
> help
> >>>> you accelerate application performance.
> >>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get
> the
> >>>> most from the latest Intel processors and coprocessors. See
> >> abstracts
> >>>> and register >
> >>>>
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.c
> >>>> l
> >>>> ktrk
> >>>> _______________________________________________
> >>>> edk2-devel mailing list
> >>>> edk2-de...@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> boot-architecture mailing list
> >>> boot-architecture@lists.linaro.org
> >>> http://lists.linaro.org/mailman/listinfo/boot-architecture
> >>
> >
> >
> >
> >
> 
> 
> 





_______________________________________________
boot-architecture mailing list
boot-architecture@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/boot-architecture

Reply via email to