<?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: main application address or backup application address in reliable update bootloader in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684852#M42161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ylkenvin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; After contact with our bootloader AE, the base address actually is the main application address.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 May 2017 09:23:03 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-05-23T09:23:03Z</dc:date>
    <item>
      <title>main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684849#M42158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In "Kinetis Bootloader v2.0.0 Reference Manual" Page 156, its description is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Whether the crcStartAddress is equal to the start address of the vector table of the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;question: the application is referred to main application or backup application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The package "NXP_Kinetis_Bootloader_2_0_0" source code tells that it refers to the main application , however, what is the purpose for the crcStartAddress in BCA of backup application code to contain the address of main application code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any of guys can explain? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 08:46:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684849#M42158</guid>
      <dc:creator>ylkevin</dc:creator>
      <dc:date>2017-05-18T08:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684850#M42159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ylkevin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; From the Kinetis Bootloader v2.0.0 Reference Manual.pdf description, page 156,&lt;/P&gt;&lt;P&gt;1. Whether the crcStartAddress is equal to the start address of the vector table of the application.&lt;/P&gt;&lt;P&gt;This application should be the backup application.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/19341i6AFD70B92285E295/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. what is the purpose for the crcStartAddress in BCA of backup application code to contain the address of main application code?&lt;/P&gt;&lt;P&gt;&amp;nbsp; Even from the ROM bootloader CRC description,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/19396i5F174F3273A95695/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;CRC should used to check the application integrity. If you check the backup application, the crcStartAddress should be the backup application address.&lt;/P&gt;&lt;P&gt;You said source code tells that it refers to the main application, could you point which source code, and tell me the detail information.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 02:38:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684850#M42159</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-22T02:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684851#M42160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the BL code goes to bootloader_reliable_update_as_requested&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt; if (is_specified_application_valid(backupApplicationBase))&lt;/P&gt;&lt;P&gt; if (header.crcStartAddress != mainApplicationBase)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        return false;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Here crcStartAddress must be BL_APP_VECTOR_TABLE_ADDRESS or BL_BACKUP_APP_START.&lt;/P&gt;&lt;P&gt;Two code comments ( as listed ) gave different explanation.&lt;/P&gt;&lt;P&gt;If BL_BACKUP_APP_START, surely return false, then reliable update fail to complete!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Liyue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Determine if the application is valid.&lt;/P&gt;&lt;P&gt;// Note: the applicaiton is valid only if following conditions are met:&lt;/P&gt;&lt;P&gt;//       1. (backup image only)crcByteCount &amp;lt;= backup app start - BL_APP_VECTOR_TABLE_ADDRESS -&lt;/P&gt;&lt;P&gt;//       sizeof(header.expectedCrcValue).&lt;/P&gt;&lt;P&gt;//       2. crcStartAddress = BL_APP_VECTOR_TABLE_ADDRESS&lt;/P&gt;&lt;P&gt;//       3. The calculated crc checksum = expectedCrcValue&lt;/P&gt;&lt;P&gt;static bool is_specified_application_valid(uint32_t applicationBase)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    crc_checksum_header_t header;&lt;/P&gt;&lt;P&gt;    uint32_t crcChecksumBase = get_bootloader_config_area_base(applicationBase);&lt;/P&gt;&lt;P&gt;    uint32_t mainApplicationBase = get_application_base(kSpecifiedApplicationType_Main);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    memcpy(&amp;amp;header, (void *)crcChecksumBase, sizeof(header));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    // The size of the backup image must be less than or equal to maximumn reserved backup application space&lt;/P&gt;&lt;P&gt;    if (applicationBase != mainApplicationBase)&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        uint32_t maxBackupAppSize = get_max_backup_app_size(applicationBase);&lt;/P&gt;&lt;P&gt;        int32_t backupAppSize = header.crcByteCount;&lt;/P&gt;&lt;P&gt;        if (backupAppSize &amp;gt; maxBackupAppSize)&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            return false;&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;    // crcStartAddress must be BL_BACKUP_APP_START, and calculated crc checksum must be expectedCrcValue&lt;/P&gt;&lt;P&gt;    if (header.crcStartAddress != mainApplicationBase)&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        return false;&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;    else&lt;/P&gt;&lt;P&gt;    {&lt;/P&gt;&lt;P&gt;        header.crcStartAddress = applicationBase;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        uint32_t calculatedCrc = calculate_application_crc32(&amp;amp;header, crcChecksumBase);&lt;/P&gt;&lt;P&gt;        if (calculatedCrc != header.crcExpectedValue)&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            return false;&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;        else&lt;/P&gt;&lt;P&gt;        {&lt;/P&gt;&lt;P&gt;            return true;&lt;/P&gt;&lt;P&gt;        }&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 03:00:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684851#M42160</guid>
      <dc:creator>ylkevin</dc:creator>
      <dc:date>2017-05-22T03:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684852#M42161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ylkenvin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; After contact with our bootloader AE, the base address actually is the main application address.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 09:23:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684852#M42161</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-23T09:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684853#M42162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the information. It might be a source bug in released bootloader package.&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 09:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684853#M42162</guid>
      <dc:creator>ylkevin</dc:creator>
      <dc:date>2017-05-23T09:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: main application address or backup application address in reliable update bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684854#M42163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&amp;nbsp; You are welcome, yes, I already transfer the problem you mentioned to the according department.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 09:32:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/main-application-address-or-backup-application-address-in/m-p/684854#M42163</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-05-23T09:32:08Z</dc:date>
    </item>
  </channel>
</rss>

