<?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>Kinetis Microcontrollers中的主题 Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318976#M14166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The odd thing is though, I don't ever remember it being turned on - its always been off yet working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IAR does have a tendency to do very odd things and given the hefty price-tag, it can be a pile of cr**!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Mark, have a good weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jun 2014 21:50:07 GMT</pubDate>
    <dc:creator>weblar</dc:creator>
    <dc:date>2014-06-13T21:50:07Z</dc:date>
    <item>
      <title>K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318971#M14161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a puzzling problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the past 2 weeks, I've been downloading and debugging code written for a Kinetis K22 device through IAR v6.40. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I did have to manually copy across the supporting K22 files from a later version of an IAR trial as the K22 doesn't have the support files in 6.40 - however, this has been working perfectly for the past 2 weeks, i.e. USB CDC device working, OLED display via FlexBus, etc, etc. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of a sudden, I am no longer able to debug because of the following error when trying to download the binary to the device:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to create a new, simple project with just a main function targetting the same K22 device however this also fails with the same issue when downloading and debugging via the Segger J-Link. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I had thought that the device could be securely locked so today I replaced the chip however this has made no difference. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The map file generated by the compiler seems absolutely fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I am sometimes able to download to the device using Seggers own J-Flash utility however this is quite flaky, the device takes a long time to reset but when it does download, the application runs as expected.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having torn pretty much the last of my remaining hair from my head, I can't even begin to think what could have changed. The obvious answer is nothing, I've not updated any drivers or J-Link firmware, nor IAR updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please please please can someone help me with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:01:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318971#M14161</guid>
      <dc:creator>weblar</dc:creator>
      <dc:date>2014-06-13T21:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318972#M14162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This is a message that IAR always displays when the start of Flash (first 4 bytes at 0x00000000) is not programmed. If you do a chip erase and connect to the board using the "Debug without downloading" command rather than the "Download and Debug" command it will always occur. This suggests to me that some setting in the debugger setup has changed, for example the "Suppress download" option has been enabled in the "Debugger | Download" configuration (?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:28:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318972#M14162</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-06-13T21:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318973#M14163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, mysteriously, I've turned on the "Use flash downloader" in the debugger options tab and all is well in the world again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless this was "on" by default and has somehow manage to un-tick itself then I'm in a total state of befuddlement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318973#M14163</guid>
      <dc:creator>weblar</dc:creator>
      <dc:date>2014-06-13T21:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318974#M14164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We must have posted at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try an application, I always use "Download and debug", never the alternative. The answer lies within the "use flash downloader" option - turning this on fixes the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:30:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318974#M14164</guid>
      <dc:creator>weblar</dc:creator>
      <dc:date>2014-06-13T21:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318975#M14165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes these tools seems to have a mind of their own...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I thought it would likely be due to no download taking place because IAR otherwise gives a warning after the download in case any written flash location doesn't match the downloaded code (as in the case of differences in the Flash configuration pattern that it may purposly not set as in the code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:37:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318975#M14165</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-06-13T21:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318976#M14166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The odd thing is though, I don't ever remember it being turned on - its always been off yet working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IAR does have a tendency to do very odd things and given the hefty price-tag, it can be a pile of cr**!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Mark, have a good weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 21:50:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/318976#M14166</guid>
      <dc:creator>weblar</dc:creator>
      <dc:date>2014-06-13T21:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: K22 and IAR - Stack pointer is setup to incorrect alignment</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/1728593#M65561</link>
      <description>&lt;P&gt;Hello, I have same problem, I have migrated code from s32 design studio to IAR embedded workbench, when I am trying "debug without download", I am getting error "&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Mon Sep 25, 2023 11:57:36: : User error: Stack pointer is setup to incorrect alignment.&amp;nbsp; Stack addr = 0xcdcd'cdcd&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Since I don't have orignal hardware, I want to run it in simulator. Please help me if it can be done.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 06:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-and-IAR-Stack-pointer-is-setup-to-incorrect-alignment/m-p/1728593#M65561</guid>
      <dc:creator>sanjay645</dc:creator>
      <dc:date>2023-09-25T06:41:35Z</dc:date>
    </item>
  </channel>
</rss>

