<?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: How to Read and Write Flash Addresses from Command Line? in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947884#M2402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alexis.&amp;nbsp; I did find that in the command line help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made some progress.&amp;nbsp; I'm currently having an issue in reading the PC register, or any of the core registers of the cortex (&lt;A class="link-titled" href="https://developer.arm.com/docs/ddi0484/latest/programmers-model/processor-core-registers-summary" title="https://developer.arm.com/docs/ddi0484/latest/programmers-model/processor-core-registers-summary"&gt;Cortex-M0+ Technical Reference Manual | Processor core registers summary – Arm Developer&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking that if I want to read R0 that I would use the command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i% = CMREADREG this 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; Print "Reg[0] read as ";~i%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This always prints 0x00000000.&amp;nbsp; And the same for any other register index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to be doing something wrong.&amp;nbsp; I have successfully read out the UID values (H, M, and L 32-bit words).&amp;nbsp; So in general the setup is good.&amp;nbsp; But I can't read these registers.&amp;nbsp; And when I try to write the script hangs completely and I have to disconnect target to reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am really trying to do is set the PC register (R15) to a local function that will program the flash.&amp;nbsp; But I can't reliably read and write to core registers at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2019 18:51:41 GMT</pubDate>
    <dc:creator>james5</dc:creator>
    <dc:date>2019-07-23T18:51:41Z</dc:date>
    <item>
      <title>How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947881#M2399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking to add a serial number to flash memory of each MKL03Z32xxx4 device on the manufacturing line and to read out the unique 80-bit ID so that we can create our own lookup table between the two pieces of information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do so, I _think_ I need to use the redlinkserv command line utility and a custom connecting script.&amp;nbsp; But I don't know for sure and I'm not familiar with the script language.&amp;nbsp; Could someone suggest what I would need to do to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; Read out the 80-bit UID and print it out to the console&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; Take a command line parameter and write that 32-bit value to address 0x77FC (where the flash variable has been put in memory)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or maybe I'm way off.&amp;nbsp; What I'm trying to do is programatically do those two things so I can integrate into our manufacturing line and automate this process.&amp;nbsp; If there is a better way to do it then I'd love to hear it.&amp;nbsp; I am trying to stay away from having custom software running to support this, though that isn't out of the question (just seems like it shouldn't be necessary).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much, I appreciate any help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2019 17:13:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947881#M2399</guid>
      <dc:creator>james5</dc:creator>
      <dc:date>2019-07-05T17:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947882#M2400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so I figured out half of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a connect script that I can pass to redlinkserv that will read out the UID and spit it out to the terminal.&amp;nbsp; So that is good. (NOTE there is a bug in the command help in specifying the connect script to call, see &lt;A _jive_internal="true" class="jivelink11" href="https://community.nxp.com/message/1174903" title="https://community.nxp.com/message/1174903"&gt;https://community.nxp.com/message/1174903&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second part of writing flash is still TBD. I have forced the flash variable to a specific flash memory address but I need to be able to write that from the command line.&amp;nbsp; Anyone have any ideas on how to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 16:38:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947882#M2400</guid>
      <dc:creator>james5</dc:creator>
      <dc:date>2019-07-09T16:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947883#M2401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/james@stratforddigital.ca"&gt;james@stratforddigital.ca&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the help from the RedLinkServer, there are some commands that could be useful:&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/91000i027294B29D64E104/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;You could give it a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 01:04:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947883#M2401</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-07-12T01:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947884#M2402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alexis.&amp;nbsp; I did find that in the command line help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made some progress.&amp;nbsp; I'm currently having an issue in reading the PC register, or any of the core registers of the cortex (&lt;A class="link-titled" href="https://developer.arm.com/docs/ddi0484/latest/programmers-model/processor-core-registers-summary" title="https://developer.arm.com/docs/ddi0484/latest/programmers-model/processor-core-registers-summary"&gt;Cortex-M0+ Technical Reference Manual | Processor core registers summary – Arm Developer&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking that if I want to read R0 that I would use the command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i% = CMREADREG this 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; Print "Reg[0] read as ";~i%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This always prints 0x00000000.&amp;nbsp; And the same for any other register index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to be doing something wrong.&amp;nbsp; I have successfully read out the UID values (H, M, and L 32-bit words).&amp;nbsp; So in general the setup is good.&amp;nbsp; But I can't read these registers.&amp;nbsp; And when I try to write the script hangs completely and I have to disconnect target to reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am really trying to do is set the PC register (R15) to a local function that will program the flash.&amp;nbsp; But I can't reliably read and write to core registers at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 18:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947884#M2402</guid>
      <dc:creator>james5</dc:creator>
      <dc:date>2019-07-23T18:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947885#M2403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IDE provides a bunch of scripts (.scp files) that do low-level manipulation of the part when starting a debug session. You can find these in the binaries/Scripts directory of the IDE install. Take a look at these scripts and they may give you a clue on how to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 20:08:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947885#M2403</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-07-23T20:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947886#M2404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that is how I started. I took the default kinetis connect script, left the pre-amble, and got it working to the point where I can print out the UID.&amp;nbsp; So in general things seem to be working OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I'm trying to read and write the registers and it's not working as expected.&amp;nbsp; I'm obviously missing something but I don't know what.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 20:12:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947886#M2404</guid>
      <dc:creator>james5</dc:creator>
      <dc:date>2019-07-23T20:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947887#M2405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/james@stratforddigital.ca"&gt;james@stratforddigital.ca&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RedLink interface is only used to access the memory map (RAM and flash). As far as I know it can't be used to access the internal core registers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 22:56:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947887#M2405</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-07-24T22:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947888#M2406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what are the commands CMREADREG and CMWRITEREG for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Wed, Jul 24, 2019, 6:57 PM Alexis Andalon &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2019 23:08:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947888#M2406</guid>
      <dc:creator>james5</dc:creator>
      <dc:date>2019-07-24T23:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read and Write Flash Addresses from Command Line?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947889#M2407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This commands looks like can read the internal register,&amp;nbsp;what is the param that you're using?&amp;nbsp;The MCUXpresso usually recognize this registers with the next notation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r0 - r12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be&amp;nbsp;the same with the redlink commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Alexis Andalon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2019 19:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/How-to-Read-and-Write-Flash-Addresses-from-Command-Line/m-p/947889#M2407</guid>
      <dc:creator>Alexis_A</dc:creator>
      <dc:date>2019-07-31T19:14:12Z</dc:date>
    </item>
  </channel>
</rss>

