<?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>MCUXpresso Generalのトピックassembler functions in MCUXpresso</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831889#M1027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to adapt some teaching material (ARM university program) for the KL25Z that contains assembler functions in it.&amp;nbsp; While it probably worked in Keil, it's giving me syntax errors in MCUXpresso (10.2).&amp;nbsp; MCUXpresso generates a syntax error on the first line of the function (__asm void...). Is there a recommended way to write assembler functions like this using MCUXpresso?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;#include &amp;lt;MKL25Z4.H&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;__asm void my_strcpy(const char *src, char *dst)&lt;BR /&gt;{&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt; [not including contents of the function]&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-left-color: #3d3d3d; border-left-style: none; border-left-width: 0px; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;" /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; BX&amp;nbsp;&amp;nbsp;&amp;nbsp; lr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; Else return from subroutine&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;__asm void my_capitalize(char *str)&lt;BR /&gt;{&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; [not including contents of the function]&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BX&amp;nbsp;&amp;nbsp;&amp;nbsp; lr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; Else return from subroutine&lt;BR /&gt;}&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const char a[] = "Hello world!";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char b[20];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;my_strcpy (a, b);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;my_capitalize(b);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;while (1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;BR /&gt;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Oct 2018 04:14:57 GMT</pubDate>
    <dc:creator>drsmith_yorku</dc:creator>
    <dc:date>2018-10-07T04:14:57Z</dc:date>
    <item>
      <title>assembler functions in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831889#M1027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to adapt some teaching material (ARM university program) for the KL25Z that contains assembler functions in it.&amp;nbsp; While it probably worked in Keil, it's giving me syntax errors in MCUXpresso (10.2).&amp;nbsp; MCUXpresso generates a syntax error on the first line of the function (__asm void...). Is there a recommended way to write assembler functions like this using MCUXpresso?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;#include &amp;lt;MKL25Z4.H&amp;gt;&lt;/DIV&gt;&lt;DIV&gt;__asm void my_strcpy(const char *src, char *dst)&lt;BR /&gt;{&lt;BR /&gt;&lt;EM&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="text-align: left; color: #3d3d3d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-variant: normal; font-weight: 400; text-decoration: none; word-spacing: 0px; display: inline !important; white-space: normal; orphans: 2; float: none; -webkit-text-stroke-width: 0px; background-color: transparent;"&gt; [not including contents of the function]&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR style="background-attachment: scroll; background-clip: border-box; background-color: transparent; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; border-left-color: #3d3d3d; border-left-style: none; border-left-width: 0px; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;" /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; BX&amp;nbsp;&amp;nbsp;&amp;nbsp; lr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; Else return from subroutine&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;__asm void my_capitalize(char *str)&lt;BR /&gt;{&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; [not including contents of the function]&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; BX&amp;nbsp;&amp;nbsp;&amp;nbsp; lr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; Else return from subroutine&lt;BR /&gt;}&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const char a[] = "Hello world!";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char b[20];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;my_strcpy (a, b);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;my_capitalize(b);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;while (1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;BR /&gt;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 04:14:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831889#M1027</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2018-10-07T04:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: assembler functions in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831890#M1028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MCUXpresso uses the standard GNU assembler syntax, see&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.ethernut.de/en/documents/arm-inline-asm.html" title="http://www.ethernut.de/en/documents/arm-inline-asm.html"&gt;ARM GCC Inline Assembler Cookbook&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example would be written something like this:&lt;/P&gt;&lt;P&gt;void my_strcpy(const char *src, char *dst)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; // [not including contents of the function]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;__asm volatile(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "BX&amp;nbsp;&amp;nbsp;&amp;nbsp; lr\n" //&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Else return from subroutine&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 18:05:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831890#M1028</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-10-09T18:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: assembler functions in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831891#M1029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's a great reference.&amp;nbsp; I'll be referring to that a lot, I think!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all the best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2018 12:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/assembler-functions-in-MCUXpresso/m-p/831891#M1029</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2018-10-10T12:34:37Z</dc:date>
    </item>
  </channel>
</rss>

