<?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 C++ &amp; NewLib - 92 kB code for blinky ??? in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-NewLib-92-kB-code-for-blinky/m-p/548322#M10491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rob65 on Thu Dec 22 00:09:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am helping out a friend with his project: porting scmRTOS and drivers to the lpc176x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;scmRTOS seems to be a nice, small C++ based operating system. After importing his work and fixing an almost standard issue with namespaces and a different assembler tool (IAR maybe) everything compiles and downloads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But then the fun starts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea why, but if I set a breakpoint in the assembly language code and single step I cannot explain what happens: registers change but not according to my code. After switching on the disassembly view I noticed that the disassembly did not match the assembly in the source and a closer shows that the program counter is set to 0x000030 - which is inside the vector table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked the .map file and there I see that this code should be somewhere else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There could be an issue inside scmRTOS since the application does not work as expected but it is still strange that the debugger connects the source to this address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next thing (no, the first - but I skipped this 'cause I wanted to see if the code runs) is that my text segment is about 92 kB in size. Most of this space is taken by the newlib c++ libraries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have an idea why this is the case? (I also tried without scmRTOS, results are almost the same)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a 'proper' C++ library for embedded applications?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The embed uses c++ all the way (unfortunately I do not own one) can anyone provide information about the size of an embed C++ program like blinky?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For those interested, the code can be found at &lt;/SPAN&gt;&lt;A href="http://http://hg.bikealive.nl/scmRTOS/file/4df55451898d"&gt;hg.bikealive.nl/scmRTOS&lt;/A&gt;&lt;SPAN&gt; (mercurial SCM).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,[INDENT]Rob&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:35:51 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:35:51Z</dc:date>
    <item>
      <title>C++ &amp; NewLib - 92 kB code for blinky ???</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-NewLib-92-kB-code-for-blinky/m-p/548322#M10491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rob65 on Thu Dec 22 00:09:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am helping out a friend with his project: porting scmRTOS and drivers to the lpc176x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;scmRTOS seems to be a nice, small C++ based operating system. After importing his work and fixing an almost standard issue with namespaces and a different assembler tool (IAR maybe) everything compiles and downloads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But then the fun starts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea why, but if I set a breakpoint in the assembly language code and single step I cannot explain what happens: registers change but not according to my code. After switching on the disassembly view I noticed that the disassembly did not match the assembly in the source and a closer shows that the program counter is set to 0x000030 - which is inside the vector table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked the .map file and there I see that this code should be somewhere else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There could be an issue inside scmRTOS since the application does not work as expected but it is still strange that the debugger connects the source to this address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next thing (no, the first - but I skipped this 'cause I wanted to see if the code runs) is that my text segment is about 92 kB in size. Most of this space is taken by the newlib c++ libraries.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have an idea why this is the case? (I also tried without scmRTOS, results are almost the same)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a 'proper' C++ library for embedded applications?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The embed uses c++ all the way (unfortunately I do not own one) can anyone provide information about the size of an embed C++ program like blinky?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For those interested, the code can be found at &lt;/SPAN&gt;&lt;A href="http://http://hg.bikealive.nl/scmRTOS/file/4df55451898d"&gt;hg.bikealive.nl/scmRTOS&lt;/A&gt;&lt;SPAN&gt; (mercurial SCM).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,[INDENT]Rob&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-NewLib-92-kB-code-for-blinky/m-p/548322#M10491</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:35:51Z</dc:date>
    </item>
  </channel>
</rss>

