<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How can I add postbuild options to compute a checksum and add it at an address in Flash?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119796/how-can-i-add-postbuild-options-to-compute-a-checksum-and-add-it-at-an-address-in-flash</link><description>Hi, 
 Currently I use a custom linker section for my code. 
 .my_code_section : { PROVIDE(__my_code_section_start = .); KEEP(*(.my_code_section)) PROVIDE(__my_code_section_end = .); } &amp;gt; FLASH 
 .my_crc32_data_section : { PROVIDE(__my_crc32_data_section_start</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Mar 2025 18:54:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119796/how-can-i-add-postbuild-options-to-compute-a-checksum-and-add-it-at-an-address-in-flash" /><item><title>RE: How can I add postbuild options to compute a checksum and add it at an address in Flash?</title><link>https://devzone.nordicsemi.com/thread/527433?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 18:54:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd7e1e2a-9b3c-4636-91aa-fdc692c07b17</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi AlphaBeta,&lt;/p&gt;
&lt;p&gt;Zephyr projects build with CMake, so you can use &lt;a href="https://cmake.org/cmake/help/v4.0/command/add_custom_command.html#build-events"&gt;the add_custom_command() CMake command with POST_BUILD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please&amp;nbsp;test this thoroughly though, because a&amp;nbsp;part of the nRF Connect SDK build process is signing images for DFU purpose. If you change the image file, it has to be done before signing, or the signature becomes invalid. If that becomes an issue, you will want to explore manual signing&amp;nbsp;solutions.&lt;/p&gt;
&lt;p&gt;Speaking of signature, our DFU solution already include hashing and signing the image to ensure its integrity.&amp;nbsp;Could this already take care of the goal you are trying to achieve with your checksum?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>