<?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>LPCXpresso IDE中的主题 Re: problems using division ROM</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556120#M13985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel.widyanto on Fri Nov 02 02:33:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Please refer to &lt;/SPAN&gt;&lt;A href="http://"&gt;http://www.lpcware.com/content/blog/using-integer-division-routines-rom-lpc11uxx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:32:53 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:32:53Z</dc:date>
    <item>
      <title>problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556110#M13975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mrob on Mon Oct 29 10:14:04 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having some issues getting my project to use the division ROM properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Overloading the "/" operator works fine, but the "%" operator will not compile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the function defined as&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;__value_in_regs uidiv_return __aeabi_uidivmod(unsigned numerator, unsigned denominator)&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The compiler doesn't seem to recognize the "__value_in_regs" flag.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I remove the flag it compiles, but the resulting modulus function doesn't work.&amp;nbsp; If I call the ROM modulus function directly, everythign is fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I get LPCxpresso to recognize the "__value_in_regs" flag properly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Version: LPCXpresso v4.2.3 [Build 292] [30/05/2012]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556110#M13975</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556111#M13976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon Oct 29 22:21:26 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;__value_in_regs is an ARM Realview/Keil specific compiler extension and is not available in the GNU compiler used by LPCXpresso.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What MCU are you using? If you are using LPC12, then the project wizard contains functionality to automatically map in the ROM divide routines...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/RomDivide&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556111#M13976</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556112#M13977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Mon Oct 29 22:23:25 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;__value_in_regs is a Keil-only compiler extension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you see this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/RomDivide&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556112#M13977</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556113#M13978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mrob on Tue Oct 30 11:15:59 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using an LPC11u24 /401&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did look at the link for the 12xx, but it didn't seem to do anything for my 11u24 project (probably because of the missing "aeabi_romdiv_patch.s" file).&amp;nbsp; I guess I'll start up a 12xx project and see if I can use the patch file in my 11u24 project.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556113#M13978</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556114#M13979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Tue Oct 30 17:18:26 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In the CR page about this it says the following&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[LIST=1]&lt;BR /&gt;[*]Select the project in the Project Explorer view and then open the Project properties. &lt;BR /&gt;[*]In the left-hand list of the Properties window, open "C/C++ Build" and select "Settings" and then the "Tool Settings" tab. &lt;BR /&gt;[*]Now choose "MCU C Compiler - Symbols" and add __USE_ROMDIVIDE to the "Defined Symbols". &lt;BR /&gt;[*]Now choose "MCU Assembler - General" and add&amp;nbsp;&amp;nbsp; -D__USE_ROMDIVIDE&amp;nbsp; to the "Assembler flags". &lt;BR /&gt;[*]Now choose "MCU Linker - Miscellaneous" and add --allow-multiple-definition to the "Other Options". &lt;BR /&gt;[*]Repeat steps 3,4 and 5 for all Build Configurations (typically Debug and Release).&lt;BR /&gt;[/LIST]&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Step 5, there is no "MCU Linker - Miscellaneous" section :confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a "MCU C Compiler - Miscellaneous" section with a "Other flags" text box that looks about right. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that where is --allow-multiple-definition supposed to go?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556114#M13979</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556115#M13980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Tue Oct 30 17:52:10 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There *is* a Miscellaneous section for the MCU Linker. Where are you looking?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556115#M13980</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556116#M13981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Tue Oct 30 18:15:28 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Project &amp;gt; properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All I can see is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MCU C Compiler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCU Assembler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCU Archiver&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556116#M13981</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556117#M13982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Tue Oct 30 18:28:11 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;That is becuase you have a library project. Library projects are not linked and so have no linker... You only have a linker when you are creating an application.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556117#M13982</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556118#M13983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Tue Oct 30 18:51:46 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Doh, thanks I see it now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556118#M13983</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556119#M13984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mrob on Tue Oct 30 21:30:41 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I tried copying the "aeabi_romdiv_patch.s"file over from a LPC12xx project and adding the project settings to my 11u24 project.&amp;nbsp; Unfortunately it did not work.&amp;nbsp; The asm listing still shows it calling the standard division routines, not the ROM routines.&amp;nbsp; It seems that it had no effect on the project at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Until someone else has a solution to get the DIVROM to overload the modulus operator on an 11u24, I'm just going to stick with calling the ROM manually.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556119#M13984</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556120#M13985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel.widyanto on Fri Nov 02 02:33:33 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Please refer to &lt;/SPAN&gt;&lt;A href="http://"&gt;http://www.lpcware.com/content/blog/using-integer-division-routines-rom-lpc11uxx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556120#M13985</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556121#M13986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mrob on Fri Nov 02 08:54:59 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I placed the put a file "R2.c" with your code into my project, and i got the following error when I tried to build the project&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;../src/R2.c:59:17: error: initializer element is not constant&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556121#M13986</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556122#M13987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by daniel.widyanto on Sun Nov 04 20:21:28 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I used LPCXpresso 4.2.3, and compiled this without any issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm quite surprise that newer compiler assumes pDivROM assignment as not constant assignment, since I never declared pDivROM as const anyway. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've removed the 'const' from ROM struct. It should have less stringent compiler check and pass through the compilation without any issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556122#M13987</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556123#M13988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon Nov 05 00:53:08 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The compiler is *identical* between 4.2.3 and 4.3.0. In fact, it is identical in all versions 4.x.x.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556123#M13988</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556124#M13989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Skashkash on Wed Nov 07 09:38:49 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: mrob&lt;/STRONG&gt;&lt;BR /&gt;I placed the put a file "R2.c" with your code into my project, and i got the following error when I tried to build the project&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;../src/R2.c:59:17: error: initializer element is not constant&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fwiw, I get that same error with the code from lpcware. (lpcxpresso 4.3.0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Not quite sure how to clear it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556124#M13989</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556125#M13990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fjrg76 on Wed Nov 07 22:37:31 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go to Project-&amp;gt;Properties-&amp;gt;C/C++ Build-&amp;gt;Settings, and in the "Defined symbols&amp;nbsp; (-D)" pane add this symbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__USE_ROMDIVIDE&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556125#M13990</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: problems using division ROM</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556126#M13991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fjrg76 on Wed Nov 07 22:43:41 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: mrob&lt;/STRONG&gt;&lt;BR /&gt;Well, I tried copying the "aeabi_romdiv_patch.s"file over from a LPC12xx project and adding the project settings to my 11u24 project.&amp;nbsp; Unfortunately it did not work.&amp;nbsp; The asm listing still shows it calling the standard division routines, not the ROM routines.&amp;nbsp; It seems that it had no effect on the project at all.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look into your cr_startup_lpc11xx.c file and you'll find the references to the ROM routines. E.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Courier New]Line 341 cr_startup_lpc12xx.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Patch the AEABI integer divide functions to use MCU's romdivide library&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#ifdef __USE_ROMDIVIDE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get base address of romdivide area in MCU ROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int *pDivRom = (unsigned int *) DIVROM_BASE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Load first word of romdivide area, which contains address of first&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // divide function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int *romdiv_func = (unsigned int *)*pDivRom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get address of first divide function (signed divide)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pDivRom_idiv = (unsigned int *)*romdiv_func;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get address of second divide function (unsigned divide)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pDivRom_uidiv= (unsigned int *)*(romdiv_func+1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#endif[/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:32:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/problems-using-division-ROM/m-p/556126#M13991</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:32:57Z</dc:date>
    </item>
  </channel>
</rss>

