<?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>QorIQのトピックRe: Debugging U-Boot on new bare board</title>
    <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1291545#M10285</link>
    <description>&lt;P&gt;To close out the topic,&amp;nbsp; I did get U-Boot to execute completely.&amp;nbsp;&amp;nbsp;&amp;nbsp; The final issues were:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I had not properly&amp;nbsp; updated code in \packages\firmware\atf\plat\nxp&amp;nbsp; (I suggest reading all files in the folder and then realizing while parts of the file names it is going to append.)&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The DDR configuration settings were good enough to get through DDR Init and some simple stuff but not good enough to actually execute code from.&amp;nbsp;&amp;nbsp; The BL2 bootloader would execute right up to the jump to BL3 and then die since BL3 is going to run from DRAM.&amp;nbsp;&amp;nbsp;&amp;nbsp; Getting the proper DDR4 DRAM settings is very difficult for me since the Validator will not run properly on my board.&amp;nbsp;&amp;nbsp; This documented in other posts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tip-off that it is a DDR problem is to go and dump the DDR registers with CCS after the bootloader crashes. &amp;nbsp; If address E40 shows error bits set, then you can figure that the crash was due to data corruption when it tried to read the DRAM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should note that I never did learn how to really debug U-Boot with the CodeWarrior TAP.&amp;nbsp;&amp;nbsp; Once I got the BL3 bootloader running, then remainder of the code executed without errors.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jun 2021 19:23:02 GMT</pubDate>
    <dc:creator>smiller2</dc:creator>
    <dc:date>2021-06-11T19:23:02Z</dc:date>
    <item>
      <title>Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289392#M10272</link>
      <description>&lt;P&gt;I have a new bare board.&amp;nbsp; I am trying to get U-Boot to run, but so far not successful.&amp;nbsp;&amp;nbsp; I have followed the steps in CodeWarrior for ARMv8 Using in u.pdf&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; I programmed the QSPI flash at 0x00100000&amp;nbsp; the the file generated by flex-builder.&amp;nbsp;&amp;nbsp;&amp;nbsp; However, when I attempt to execute, it always goes immediately into the weeds.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was suspecting that this is a issue with the hand-off from the multiple bootloader sections since the defconfig that flex-builder is running is a "tfa" version. &amp;nbsp; I programmed both the binaries, produced by the "atf" build option, but still no go. &amp;nbsp; The debugger starts up, but then goes to unknown code immediately. &amp;nbsp; When I stop it, there are two cores running. &amp;nbsp; One is stuck at address&amp;nbsp; 0x10000384 and the other at address 0xfbe00000.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Can I simplify the boot process to not use secure boot or trusted firmware?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Is there a way to step through the bootloader process to figure out where it is going bad?&lt;/P&gt;&lt;P&gt;3. Are there any other app notes on bring a new board up with U-Boot?&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; DRAM initialization is still a problem for me.&amp;nbsp; However, I am assuming that U-Boot will at least start running as its running from Flash.&amp;nbsp;&amp;nbsp; At what point would it be going to DRAM?&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Flex-Builder is running on another machine as a Virtual Box.&amp;nbsp;&amp;nbsp; So, the code is not built on the machine running Code Warrior.&amp;nbsp; Code Warrior is installed an running on a Lab PC only.&amp;nbsp;&amp;nbsp; Are there any documents on linking back the software for debugging purposes?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I did copy and link to the u-boot executable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:55:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289392#M10272</guid>
      <dc:creator>smiller2</dc:creator>
      <dc:date>2021-06-08T19:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289464#M10273</link>
      <description>&lt;P&gt;So I found that it actually getting stuck in the BL2 bootloader.&amp;nbsp;&amp;nbsp; When I reloaded both portions of the QSPI,&amp;nbsp; I forgot to reconfigure the serial port on the PC after a reboot.&amp;nbsp;&amp;nbsp; That caused me to miss the output it generated.&amp;nbsp; When I reconfigured the serial port and rebooted again, then I get messages about failed DDR configuration and&lt;/P&gt;&lt;P&gt;NOTICE: BL2: v1.5(release):LSDK-20.12&lt;BR /&gt;NOTICE: BL2: Built : 14:04:20, Jun 8 2021&lt;/P&gt;&lt;P&gt;So,&amp;nbsp; how are these multiple stages of bootloader debugged in Code Warrior? &amp;nbsp; These are not part of U-Boot so loading the U-Boot executable for symbols will not help me.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 01:13:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289464#M10273</guid>
      <dc:creator>smiller2</dc:creator>
      <dc:date>2021-06-09T01:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289571#M10274</link>
      <description>&lt;P&gt;&lt;SPAN&gt;u-boot debugging please refer to &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.nxp.com/t5/CodeWarrior-for-QorIQ-Knowledge/Use-CodeWarrior-for-ARMv8-to-Debug-U-boot-and-Linux-Kernel-and/ta-p/1114872" target="_blank"&gt;https://community.nxp.com/t5/CodeWarrior-for-QorIQ-Knowledge/Use-CodeWarrior-for-ARMv8-to-Debug-U-boot-and-Linux-Kernel-and/ta-p/1114872&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DDR initialization porting in TFA, please refer to section “5.2.1.1 TF-A DDR Driver” in LSDK 20.12 document.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The DDR driver supports the following board level applications for DDR: &lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt; DIMM: Driver reads SPD for configuring DDR timing parameters &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt; Mock DIMM: Hardcoded timing in place of reading SPD &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt; Discrete DDR: Driver requires a static DDR configuration to be added&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;When a board design uses DIMM module for dynamic memory configuration. _init_ddr function uses DDR board parameters to read the attached SPD and configure the DDR controller&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When a board design uses fixed or discrete DDR, hardcoded or static timing can be used to configure DDR timing parameters. Define macro “CONFIG_DDR_NODIMM” in plat/nxp/&amp;lt;SOC&amp;gt;/&amp;lt;Board&amp;gt;/platform_def.h to enable MOCK DIMM support. Define function “ddr_get_ddr_params” and structure dim_params in ddr_init.c file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When a board design uses fixed or discrete DDR, static timing can be used to configure DDR timing parameters. Define macro “CONFIG_STATIC_DDR” in plat/nxp/&amp;lt;SOC&amp;gt;/&amp;lt;Board&amp;gt;/plafform_def.h to enable discrete DDR timings. Define board_static_ddr() function and structure ddr_cfg_regs in file ddr_init.c&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could use QCVS DDR tool to assist you to calculate and optimize DDR controller initialization parameters. Please refer to the following document and the attached user manual.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.nxp.com/t5/Qonverge-Knowledge-Base/DDR-Controller-Configuration-on-LS2085-LS2080-Bringing-up/ta-p/1128310" target="_blank"&gt;https://community.nxp.com/t5/Qonverge-Knowledge-Base/DDR-Controller-Configuration-on-LS2085-LS2080-Bringing-up/ta-p/1128310&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 04:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1289571#M10274</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-06-09T04:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1290342#M10279</link>
      <description>&lt;P&gt;I found that my ddr_init.c&amp;nbsp; was not being compiled because of errors in the \firmware\atf\plat\nxp directory.&amp;nbsp;&amp;nbsp; When I created my custom board in that directory, I did not properly reconfigure it.&amp;nbsp;&amp;nbsp;&amp;nbsp; I really don't know how to properly add a board or platform there and basically had to hack it.&amp;nbsp;&amp;nbsp; Once my code was part of the build, then I got the BL2 bootloader to run.&amp;nbsp;&amp;nbsp; It now crashes on BL3 as shown below:&lt;/P&gt;&lt;P&gt;NOTICE: 2 GB DDR4, 64-bit, CL=11, ECC off&lt;BR /&gt;NOTICE: BL2: v1.5(release):LSDK-20.12-dirty&lt;BR /&gt;NOTICE: BL2: Built : 15:07:02, Jun 9 2021&lt;BR /&gt;NOTICE: BL2: Booting BL31&lt;/P&gt;&lt;P&gt;(It is reporting "dirty" because of the hacks that&amp;nbsp; I added.)&lt;/P&gt;&lt;P&gt;The fip_uboot.bin I am programming to 0x00100000&amp;nbsp; in the QSPI.&amp;nbsp;&amp;nbsp;&amp;nbsp; If I delete that section then the message change:&lt;/P&gt;&lt;P&gt;NOTICE: 2 GB DDR4, 64-bit, CL=11, ECC off&lt;BR /&gt;NOTICE: BL2: v1.5(release):LSDK-20.12-dirty&lt;BR /&gt;NOTICE: BL2: Built : 15:07:02, Jun 9 2021&lt;BR /&gt;ERROR: BL2: Failed to load image (-2)&lt;BR /&gt;Authentication failure&lt;/P&gt;&lt;P&gt;So,&amp;nbsp; I think it is finding the BL3 bootloader.&amp;nbsp;&amp;nbsp; However, I do not have a clue as to what is happening with the launch of that bootloader.&amp;nbsp;&amp;nbsp; I tried to enable more printouts, but I cannot find out how to do that from flex-builder.&amp;nbsp;&amp;nbsp;&amp;nbsp; I tried adding LOG_LEVEL=60 to make it higher than the verbose level, but it just seemed to ignore it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I change the LOG_LEVEL or turn on DEBUG when using flex-builder?&lt;/P&gt;&lt;P&gt;What is the recommended way to debug problems with executing the bootloaders?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 02:23:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1290342#M10279</guid>
      <dc:creator>smiller2</dc:creator>
      <dc:date>2021-06-10T02:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1290609#M10280</link>
      <description>&lt;P&gt;BL2 initializes the DRAM, then&amp;nbsp;BL2 loads BL31, BL32, and BL33 images to the DDR memory after validating these images.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is problem in DDR controller initialization section in ATF code, so there is problem to load images to DRAM.&lt;/P&gt;
&lt;P&gt;Please use QCVS DDR tool to assist you to calculate and optimize DDR controller initialization parameters, then use these parameters in ATF source code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could use static timing method to configure DDR timing parameters. Define macro “CONFIG_STATIC_DDR” in plat/nxp/&amp;lt;SOC&amp;gt;/&amp;lt;Board&amp;gt;/plafform_def.h to enable discrete DDR timings. Define board_static_ddr() function and structure ddr_cfg_regs in file ddr_init.c&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For compiling atf with debugging message, you could go to atf source code folder&amp;nbsp;packages/firmware/atf, please add "DEBUG :=1" in&amp;nbsp;Makefile, then go back to&amp;nbsp;flexbuild_lsdk2012 folder run the command "flex-builder -c atf -m &amp;lt;platform&amp;gt; -b &amp;lt;type&amp;gt;"&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 09:16:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1290609#M10280</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-06-10T09:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging U-Boot on new bare board</title>
      <link>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1291545#M10285</link>
      <description>&lt;P&gt;To close out the topic,&amp;nbsp; I did get U-Boot to execute completely.&amp;nbsp;&amp;nbsp;&amp;nbsp; The final issues were:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I had not properly&amp;nbsp; updated code in \packages\firmware\atf\plat\nxp&amp;nbsp; (I suggest reading all files in the folder and then realizing while parts of the file names it is going to append.)&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The DDR configuration settings were good enough to get through DDR Init and some simple stuff but not good enough to actually execute code from.&amp;nbsp;&amp;nbsp; The BL2 bootloader would execute right up to the jump to BL3 and then die since BL3 is going to run from DRAM.&amp;nbsp;&amp;nbsp;&amp;nbsp; Getting the proper DDR4 DRAM settings is very difficult for me since the Validator will not run properly on my board.&amp;nbsp;&amp;nbsp; This documented in other posts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tip-off that it is a DDR problem is to go and dump the DDR registers with CCS after the bootloader crashes. &amp;nbsp; If address E40 shows error bits set, then you can figure that the crash was due to data corruption when it tried to read the DRAM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should note that I never did learn how to really debug U-Boot with the CodeWarrior TAP.&amp;nbsp;&amp;nbsp; Once I got the BL3 bootloader running, then remainder of the code executed without errors.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 19:23:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Debugging-U-Boot-on-new-bare-board/m-p/1291545#M10285</guid>
      <dc:creator>smiller2</dc:creator>
      <dc:date>2021-06-11T19:23:02Z</dc:date>
    </item>
  </channel>
</rss>

