<?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 clean a LPCXpresso environment, without deleting projects in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-clean-a-LPCXpresso-environment-without-deleting-projects/m-p/640504#M32614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aside&amp;nbsp;: here is the LPCware thread you quoted within this community :&amp;nbsp;&lt;A href="https://community.nxp.com/thread/423351" rel="nofollow noopener noreferrer" target="_blank"&gt;C++ pure virtual class with newlib&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, LPCXpresso IDE creates C++ projects configured using techniques similar to those described in this external site :&amp;nbsp;&lt;A class="link-titled" href="http://www.webalice.it/fede.tft/cpp_on_microcontrollers_tricks/cpp_on_microcontrollers_tricks.html" rel="nofollow noopener noreferrer" title="http://www.webalice.it/fede.tft/cpp_on_microcontrollers_tricks/cpp_on_microcontrollers_tricks.html" target="_blank"&gt;Using C++ on microcontrollers code size tricks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that you compare the compiler options, defines, etc - plus the code within your project - with a new C++ project generated from scratch using the Quickstart Panel -&amp;gt; New project wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing to do would be to ensure that if possible you reconfigure your project to use NewlibNano rather than the default Newlib :&amp;nbsp;&lt;A href="https://community.nxp.com/thread/389086" rel="nofollow noopener noreferrer" target="_blank"&gt;Newlib-Nano Support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, when using C++ always try to avoid..&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;#include &amp;lt;iostream&amp;gt;&lt;/PRE&gt;&lt;P&gt;in your source code, as this will generally&amp;nbsp;increase the size of your final image very noticeably (due to the code included in the C++ header, along with the references this will also trigger) even if you don't directly use iostream.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2017 11:35:19 GMT</pubDate>
    <dc:creator>lpcxpresso_supp</dc:creator>
    <dc:date>2017-01-24T11:35:19Z</dc:date>
    <item>
      <title>How to clean a LPCXpresso environment, without deleting projects</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-clean-a-LPCXpresso-environment-without-deleting-projects/m-p/640503#M32613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I've faced the problem that after trying to use pure virtual functions I cannot longer compile because the generated code is bigger than that of the LPC812 chip, even when there are not any class declared/defined in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm writing (or at least, trying to write) an embedded framework using OOP concepts. There exist -- and it's documented -- an issue with pure virtual functions on LPCXpresso + NewLib + stdc++ lib, as it's mentioned in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.lpcware.com/content/forum/c-pure-virtual-class-with-newlib" title="https://www.lpcware.com/content/forum/c-pure-virtual-class-with-newlib"&gt;C++ pure virtual class with newlib | www.LPCware.com&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using an interfaz and its implementation (for the I2C module) the generated code was 16% or so above the 16KB on the LPC812 flash:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;struct I2C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; &lt;STRONG&gt;virtual uint16_t Write () = 0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; // other pure virtual methods&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;class I2C_LPC812 : public I2C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;&amp;nbsp; // ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono,monospace;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to isolate the error, I deleted all classes in my driver program in order to simulate a restoration point just before I started to use the pure virtual methods, &lt;STRONG&gt;but the code size issue is still there: size code bigger than the available flash&lt;/STRONG&gt;. Why? Before using the pure virtual methods I had almost 50% of the flash, but now, with that same code (no virtual methods nor classes, as stated) I have no flash!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that LPCXpresso is keeping a state something related to the virtual methods even when they not longer exist, so that it's unable to compile anymore. However there should be a way to restore it, without the need to delete the project nor to create a new one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now my driver program's source code is a mess (but a mess without virtual methods), nonetheless I can clean it if necessary so that you can see what I'm talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 00:24:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-clean-a-LPCXpresso-environment-without-deleting-projects/m-p/640503#M32613</guid>
      <dc:creator>fjrg76</dc:creator>
      <dc:date>2017-01-24T00:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to clean a LPCXpresso environment, without deleting projects</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-clean-a-LPCXpresso-environment-without-deleting-projects/m-p/640504#M32614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aside&amp;nbsp;: here is the LPCware thread you quoted within this community :&amp;nbsp;&lt;A href="https://community.nxp.com/thread/423351" rel="nofollow noopener noreferrer" target="_blank"&gt;C++ pure virtual class with newlib&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, LPCXpresso IDE creates C++ projects configured using techniques similar to those described in this external site :&amp;nbsp;&lt;A class="link-titled" href="http://www.webalice.it/fede.tft/cpp_on_microcontrollers_tricks/cpp_on_microcontrollers_tricks.html" rel="nofollow noopener noreferrer" title="http://www.webalice.it/fede.tft/cpp_on_microcontrollers_tricks/cpp_on_microcontrollers_tricks.html" target="_blank"&gt;Using C++ on microcontrollers code size tricks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that you compare the compiler options, defines, etc - plus the code within your project - with a new C++ project generated from scratch using the Quickstart Panel -&amp;gt; New project wizard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing to do would be to ensure that if possible you reconfigure your project to use NewlibNano rather than the default Newlib :&amp;nbsp;&lt;A href="https://community.nxp.com/thread/389086" rel="nofollow noopener noreferrer" target="_blank"&gt;Newlib-Nano Support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, when using C++ always try to avoid..&lt;/P&gt;&lt;PRE style="padding-left: 30px;"&gt;#include &amp;lt;iostream&amp;gt;&lt;/PRE&gt;&lt;P&gt;in your source code, as this will generally&amp;nbsp;increase the size of your final image very noticeably (due to the code included in the C++ header, along with the references this will also trigger) even if you don't directly use iostream.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 11:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/How-to-clean-a-LPCXpresso-environment-without-deleting-projects/m-p/640504#M32614</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-01-24T11:35:19Z</dc:date>
    </item>
  </channel>
</rss>

