<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can we load bl2_sd file in OCRAM and debug it from there in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1097817#M6535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;You could refer to the section "2. Debug u-boot with CodeWarrior for ARMv8" in &lt;A href="https://community.nxp.com/docs/DOC-331981"&gt;Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards&lt;/A&gt;&amp;nbsp;to configure CodeWarrior IDE panels to debug&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;bl2&amp;nbsp;&lt;/SPAN&gt;with "attach" method. Please import atf/build/ls1088ardb/release/bl2/bl2.elf in CodeWarrior IDE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;ATF is a simple bareboard application, so you should be able to debug it accordingly. There’s no special guide needed. Given the fact that ATF resides in flash and then copied to OCRAM, you’ll need an “attach” launch configuration. As far as I know, there are two elf files required for debugging, one for BL2 and one for BL31. Also, depending on the MMU configuration, you might need to mark some areas as read-only, in order to force HW BPs to be used from GDB. See ‘mem’ command for more details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I brought in discussion the MMU configuration in a more general sense – so not strictly related to ATF. It’s important to know that debugger (GDB) defaults to software breakpoints by default and they will not work on read-only MMU ranges. So you can either set hardware breakpoints using GDB’s ‘hbreak’ command, either add read-only/write-only memory ranges in GDB (see ‘mem’ command) and force GDB this way to always set HW breakpoints inside those ranges.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regarding the MMU configuration performed by ATF, I’m pretty sure it configures MMU. Moreover, I think I’ve accidentally noticed at some point the ATF marking some memory ranges as read-only – but not sure. So, please discuss this subject with someone working on ATF or inspect the ATF sources yourself. There’s also a GDB command implemented in CW-ARMv8 that allows users inspect current MMU configuration – see ‘mmu’ command and its description (use ‘help’ in Debugger Console or read ch. 6.5.6 from ARMv8 Targeting Manual).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2020 03:46:59 GMT</pubDate>
    <dc:creator>yipingwang</dc:creator>
    <dc:date>2020-08-18T03:46:59Z</dc:date>
    <item>
      <title>Can we load bl2_sd file in OCRAM and debug it from there</title>
      <link>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1097816#M6534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to debug my bl2 file. How can we to do ?&lt;/P&gt;&lt;P&gt;Our target is LS1088&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 21:32:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1097816#M6534</guid>
      <dc:creator>benoitmasse</dc:creator>
      <dc:date>2020-08-17T21:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we load bl2_sd file in OCRAM and debug it from there</title>
      <link>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1097817#M6535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;You could refer to the section "2. Debug u-boot with CodeWarrior for ARMv8" in &lt;A href="https://community.nxp.com/docs/DOC-331981"&gt;Use CodeWarrior for ARMv8 to Debug U-boot and Linux Kernel and Bring up Bare Boards&lt;/A&gt;&amp;nbsp;to configure CodeWarrior IDE panels to debug&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;bl2&amp;nbsp;&lt;/SPAN&gt;with "attach" method. Please import atf/build/ls1088ardb/release/bl2/bl2.elf in CodeWarrior IDE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;ATF is a simple bareboard application, so you should be able to debug it accordingly. There’s no special guide needed. Given the fact that ATF resides in flash and then copied to OCRAM, you’ll need an “attach” launch configuration. As far as I know, there are two elf files required for debugging, one for BL2 and one for BL31. Also, depending on the MMU configuration, you might need to mark some areas as read-only, in order to force HW BPs to be used from GDB. See ‘mem’ command for more details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I brought in discussion the MMU configuration in a more general sense – so not strictly related to ATF. It’s important to know that debugger (GDB) defaults to software breakpoints by default and they will not work on read-only MMU ranges. So you can either set hardware breakpoints using GDB’s ‘hbreak’ command, either add read-only/write-only memory ranges in GDB (see ‘mem’ command) and force GDB this way to always set HW breakpoints inside those ranges.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regarding the MMU configuration performed by ATF, I’m pretty sure it configures MMU. Moreover, I think I’ve accidentally noticed at some point the ATF marking some memory ranges as read-only – but not sure. So, please discuss this subject with someone working on ATF or inspect the ATF sources yourself. There’s also a GDB command implemented in CW-ARMv8 that allows users inspect current MMU configuration – see ‘mmu’ command and its description (use ‘help’ in Debugger Console or read ch. 6.5.6 from ARMv8 Targeting Manual).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 03:46:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1097817#M6535</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2020-08-18T03:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can we load bl2_sd file in OCRAM and debug it from there</title>
      <link>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1890503#M14453</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tried this method to debug BL2 on LX2160a RDB using CW Executable Importer for $ATF_SOURCE_DIR/&lt;SPAN&gt;build/lx2160ardb/release/bl2/bl2.elf&lt;/SPAN&gt;. In Debug configuration panel source tab, the code is not automatically found and I tried several method to state the source directory in Source Lookup Path.&lt;/P&gt;&lt;P&gt;Unfortunately, the source are not found when running debug... Only disassembly is available.&lt;/P&gt;&lt;P&gt;Any clue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 15:21:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Can-we-load-bl2-sd-file-in-OCRAM-and-debug-it-from-there/m-p/1890503#M14453</guid>
      <dc:creator>VL38</dc:creator>
      <dc:date>2024-06-19T15:21:05Z</dc:date>
    </item>
  </channel>
</rss>

