<?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 Design StudioのトピックConvert project to C++</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660559#M8709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a large project to which I would like to add some C++ modules.&lt;BR /&gt;No, I do not want to recreate the project from scratch.&lt;BR /&gt;Per this link I added the C++ 'nature' to the .project file:&lt;BR /&gt;&lt;A _jive_internal="true" data-containerid="11213" data-containertype="14" data-objectid="380488" data-objecttype="1" href="https://community.nxp.com/thread/380488"&gt;KDS - add C++ support to existing C proj&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the project fails to link with the following error:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Building target: lwip_httpsrv_freertos_frdmk64f.elf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Invoking: Cross ARM C++ Linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall&amp;nbsp; -g -Xlinker --gc-sections -Wl,-Map,"lwip_httpsrv_freertos_frdmk64f.map" -o "lwip_httpsrv_freertos_frdmk64f.elf"&amp;nbsp; ./utilities/fsl_debug_console.o ./utilities/fsl_sbrk.o&amp;nbsp; ./startup/startup_MK64F12.o ./startup/system_MK64F12.o&amp;nbsp; ./source/DAC_sine_wave.o ./source/heapsort.o ./source/lwip_httpsrv_freertos.o&amp;nbsp; ./lwip/src/netif/ppp/auth.o ./lwip/src/netif/ppp/chap.o ./lwip/src/netif/ppp/chpms.o ./lwip/src/netif/ppp/fsm.o ./lwip/src/netif/ppp/ipcp.o ./lwip/src/netif/ppp/lcp.o ./lwip/src/netif/ppp/magic.o ./lwip/src/netif/ppp/pap.o ./lwip/src/netif/ppp/ppp.o ./lwip/src/netif/ppp/ppp_md5.o ./lwip/src/netif/ppp/ppp_oe.o ./lwip/src/netif/ppp/randm.o ./lwip/src/netif/ppp/vj.o&amp;nbsp; ./lwip/src/netif/etharp.o ./lwip/src/netif/slipif.o&amp;nbsp; ./lwip/src/core/snmp/asn1_dec.o ./lwip/src/core/snmp/asn1_enc.o ./lwip/src/core/snmp/mib2.o ./lwip/src/core/snmp/mib_structs.o ./lwip/src/core/snmp/msg_in.o ./lwip/src/core/snmp/msg_out.o&amp;nbsp; ./lwip/src/core/ipv4/autoip.o ./lwip/src/core/ipv4/icmp.o ./lwip/src/core/ipv4/igmp.o ./lwip/src/core/ipv4/inet.o ./lwip/src/core/ipv4/inet_chksum.o ./lwip/src/core/ipv4/ip.o ./lwip/src/core/ipv4/ip_addr.o ./lwip/src/core/ipv4/ip_frag.o&amp;nbsp; ./lwip/src/core/def.o ./lwip/src/core/dhcp.o ./lwip/src/core/dns.o ./lwip/src/core/init.o ./lwip/src/core/lwip_timers.o ./lwip/src/core/mem.o ./lwip/src/core/memp.o ./lwip/src/core/netif.o ./lwip/src/core/pbuf.o ./lwip/src/core/raw.o ./lwip/src/core/stats.o ./lwip/src/core/sys.o ./lwip/src/core/tcp.o ./lwip/src/core/tcp_in.o ./lwip/src/core/tcp_out.o ./lwip/src/core/udp.o&amp;nbsp; ./lwip/src/api/api_lib.o ./lwip/src/api/api_msg.o ./lwip/src/api/err.o ./lwip/src/api/netbuf.o ./lwip/src/api/netdb.o ./lwip/src/api/netifapi.o ./lwip/src/api/sockets.o ./lwip/src/api/tcpip.o&amp;nbsp; ./lwip/port/ethernetif.o ./lwip/port/sys_arch.o&amp;nbsp; ./freertos/portable/port.o&amp;nbsp; ./freertos/croutine.o ./freertos/event_groups.o ./freertos/heap_4.o ./freertos/list.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_edma.o ./drivers/fsl_enet.o ./drivers/fsl_gpio.o ./drivers/fsl_pit.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/fsl_phy.o ./board/pin_mux.o&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-exit.o): In function `exit':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;exit.c:(.text.exit+0x16): &lt;SPAN style="color: #ff0000;"&gt;undefined reference to `_exit'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;collect2.exe: error: ld returned 1 exit status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Next, I saw from this post that link option -specs=nosys.specs may be required:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fmcuoneclipse.com%2F2014%2F06%2F15%2Ftutorial-diy-kinetis-sdk-project-with-eclipse-startup%2F" rel="nofollow" target="_blank"&gt;https://mcuoneclipse.com/2014/06/15/tutorial-diy-kinetis-sdk-project-with-eclipse-startup/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I added this option to the linker miscellaneous options, and the project builds but I've not yet instantiated any C++ classes. Unfortunately...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I added a test instantiation of a class I defined. The link fails as follows:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Invoking: Cross ARM C++ Linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall&amp;nbsp; -g -Xlinker --gc-sections -Wl,-Map,"lwip_httpsrv_freertos_frdmk64f.map" --specs=nosys.specs -o "lwip_httpsrv_freertos_frdmk64f.elf"&amp;nbsp; ./utilities/fsl_debug_console.o ./utilities/fsl_sbrk.o&amp;nbsp; ./startup/startup_MK64F12.o ./startup/system_MK64F12.o&amp;nbsp; ./source/DAC_sine_wave.o ./source/heapsort.o ./source/lwip_httpsrv_freertos.o&amp;nbsp; ./lwip/src/netif/ppp/auth.o ./lwip/src/netif/ppp/chap.o ./lwip/src/netif/ppp/chpms.o ./lwip/src/netif/ppp/fsm.o ./lwip/src/netif/ppp/ipcp.o ./lwip/src/netif/ppp/lcp.o ./lwip/src/netif/ppp/magic.o ./lwip/src/netif/ppp/pap.o ./lwip/src/netif/ppp/ppp.o ./lwip/src/netif/ppp/ppp_md5.o ./lwip/src/netif/ppp/ppp_oe.o ./lwip/src/netif/ppp/randm.o ./lwip/src/netif/ppp/vj.o&amp;nbsp; ./lwip/src/netif/etharp.o ./lwip/src/netif/slipif.o&amp;nbsp; ./lwip/src/core/snmp/asn1_dec.o ./lwip/src/core/snmp/asn1_enc.o ./lwip/src/core/snmp/mib2.o ./lwip/src/core/snmp/mib_structs.o ./lwip/src/core/snmp/msg_in.o ./lwip/src/core/snmp/msg_out.o&amp;nbsp; ./lwip/src/core/ipv4/autoip.o ./lwip/src/core/ipv4/icmp.o ./lwip/src/core/ipv4/igmp.o ./lwip/src/core/ipv4/inet.o ./lwip/src/core/ipv4/inet_chksum.o ./lwip/src/core/ipv4/ip.o ./lwip/src/core/ipv4/ip_addr.o ./lwip/src/core/ipv4/ip_frag.o&amp;nbsp; ./lwip/src/core/def.o ./lwip/src/core/dhcp.o ./lwip/src/core/dns.o ./lwip/src/core/init.o ./lwip/src/core/lwip_timers.o ./lwip/src/core/mem.o ./lwip/src/core/memp.o ./lwip/src/core/netif.o ./lwip/src/core/pbuf.o ./lwip/src/core/raw.o ./lwip/src/core/stats.o ./lwip/src/core/sys.o ./lwip/src/core/tcp.o ./lwip/src/core/tcp_in.o ./lwip/src/core/tcp_out.o ./lwip/src/core/udp.o&amp;nbsp; ./lwip/src/api/api_lib.o ./lwip/src/api/api_msg.o ./lwip/src/api/err.o ./lwip/src/api/netbuf.o ./lwip/src/api/netdb.o ./lwip/src/api/netifapi.o ./lwip/src/api/sockets.o ./lwip/src/api/tcpip.o&amp;nbsp; ./lwip/port/ethernetif.o ./lwip/port/sys_arch.o&amp;nbsp; ./freertos/portable/port.o&amp;nbsp; ./freertos/croutine.o ./freertos/event_groups.o ./freertos/heap_4.o ./freertos/list.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_edma.o ./drivers/fsl_enet.o ./drivers/fsl_gpio.o ./drivers/fsl_pit.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/fsl_phy.o ./board/pin_mux.o&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;./utilities/fsl_sbrk.o: In function `_sbrk':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;C:/K64/SDK_2.0_FRDM-K64F/devices/MK64F12/utilities/fsl_sbrk.c:65: &lt;SPAN style="color: #ff0000;"&gt;undefined reference to `__HeapLimit'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;collect2.exe: error: ld returned 1 exit status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Apparently, as soon as I instantiate an instance of a class, some memory management code is dragged in...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background: As is normal for classes in systems with no dynamic memory, the test class overrides new, new[], delete, and delete[] with versions that do not use free storage. The compile options for the example cpp file were set to &lt;EM&gt;no exceptions&lt;/EM&gt; and &lt;EM&gt;no RTTI&lt;/EM&gt;. So, I expected no use of free storage runtime...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This leaves two important questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If I want to use the runtime's free storage, what project options are required to link and run ?&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Most importantly:&lt;/STRONG&gt; To avoid dragging in any runtime free storage (as normal for our projects), what additional steps are required?&lt;/LI&gt;&lt;/OL&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I've attached the example code for you to try. Just add this to a project converted from C as above.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338547"&gt;Example_for_NXP_heapsort.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Oct 2016 22:28:37 GMT</pubDate>
    <dc:creator>davenadler</dc:creator>
    <dc:date>2016-10-23T22:28:37Z</dc:date>
    <item>
      <title>Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660559#M8709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a large project to which I would like to add some C++ modules.&lt;BR /&gt;No, I do not want to recreate the project from scratch.&lt;BR /&gt;Per this link I added the C++ 'nature' to the .project file:&lt;BR /&gt;&lt;A _jive_internal="true" data-containerid="11213" data-containertype="14" data-objectid="380488" data-objecttype="1" href="https://community.nxp.com/thread/380488"&gt;KDS - add C++ support to existing C proj&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the project fails to link with the following error:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Building target: lwip_httpsrv_freertos_frdmk64f.elf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Invoking: Cross ARM C++ Linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall&amp;nbsp; -g -Xlinker --gc-sections -Wl,-Map,"lwip_httpsrv_freertos_frdmk64f.map" -o "lwip_httpsrv_freertos_frdmk64f.elf"&amp;nbsp; ./utilities/fsl_debug_console.o ./utilities/fsl_sbrk.o&amp;nbsp; ./startup/startup_MK64F12.o ./startup/system_MK64F12.o&amp;nbsp; ./source/DAC_sine_wave.o ./source/heapsort.o ./source/lwip_httpsrv_freertos.o&amp;nbsp; ./lwip/src/netif/ppp/auth.o ./lwip/src/netif/ppp/chap.o ./lwip/src/netif/ppp/chpms.o ./lwip/src/netif/ppp/fsm.o ./lwip/src/netif/ppp/ipcp.o ./lwip/src/netif/ppp/lcp.o ./lwip/src/netif/ppp/magic.o ./lwip/src/netif/ppp/pap.o ./lwip/src/netif/ppp/ppp.o ./lwip/src/netif/ppp/ppp_md5.o ./lwip/src/netif/ppp/ppp_oe.o ./lwip/src/netif/ppp/randm.o ./lwip/src/netif/ppp/vj.o&amp;nbsp; ./lwip/src/netif/etharp.o ./lwip/src/netif/slipif.o&amp;nbsp; ./lwip/src/core/snmp/asn1_dec.o ./lwip/src/core/snmp/asn1_enc.o ./lwip/src/core/snmp/mib2.o ./lwip/src/core/snmp/mib_structs.o ./lwip/src/core/snmp/msg_in.o ./lwip/src/core/snmp/msg_out.o&amp;nbsp; ./lwip/src/core/ipv4/autoip.o ./lwip/src/core/ipv4/icmp.o ./lwip/src/core/ipv4/igmp.o ./lwip/src/core/ipv4/inet.o ./lwip/src/core/ipv4/inet_chksum.o ./lwip/src/core/ipv4/ip.o ./lwip/src/core/ipv4/ip_addr.o ./lwip/src/core/ipv4/ip_frag.o&amp;nbsp; ./lwip/src/core/def.o ./lwip/src/core/dhcp.o ./lwip/src/core/dns.o ./lwip/src/core/init.o ./lwip/src/core/lwip_timers.o ./lwip/src/core/mem.o ./lwip/src/core/memp.o ./lwip/src/core/netif.o ./lwip/src/core/pbuf.o ./lwip/src/core/raw.o ./lwip/src/core/stats.o ./lwip/src/core/sys.o ./lwip/src/core/tcp.o ./lwip/src/core/tcp_in.o ./lwip/src/core/tcp_out.o ./lwip/src/core/udp.o&amp;nbsp; ./lwip/src/api/api_lib.o ./lwip/src/api/api_msg.o ./lwip/src/api/err.o ./lwip/src/api/netbuf.o ./lwip/src/api/netdb.o ./lwip/src/api/netifapi.o ./lwip/src/api/sockets.o ./lwip/src/api/tcpip.o&amp;nbsp; ./lwip/port/ethernetif.o ./lwip/port/sys_arch.o&amp;nbsp; ./freertos/portable/port.o&amp;nbsp; ./freertos/croutine.o ./freertos/event_groups.o ./freertos/heap_4.o ./freertos/list.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_edma.o ./drivers/fsl_enet.o ./drivers/fsl_gpio.o ./drivers/fsl_pit.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/fsl_phy.o ./board/pin_mux.o&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;c:/freescale/kds_v3/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-exit.o): In function `exit':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;exit.c:(.text.exit+0x16): &lt;SPAN style="color: #ff0000;"&gt;undefined reference to `_exit'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;collect2.exe: error: ld returned 1 exit status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Next, I saw from this post that link option -specs=nosys.specs may be required:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fmcuoneclipse.com%2F2014%2F06%2F15%2Ftutorial-diy-kinetis-sdk-project-with-eclipse-startup%2F" rel="nofollow" target="_blank"&gt;https://mcuoneclipse.com/2014/06/15/tutorial-diy-kinetis-sdk-project-with-eclipse-startup/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I added this option to the linker miscellaneous options, and the project builds but I've not yet instantiated any C++ classes. Unfortunately...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I added a test instantiation of a class I defined. The link fails as follows:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;Invoking: Cross ARM C++ Linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall&amp;nbsp; -g -Xlinker --gc-sections -Wl,-Map,"lwip_httpsrv_freertos_frdmk64f.map" --specs=nosys.specs -o "lwip_httpsrv_freertos_frdmk64f.elf"&amp;nbsp; ./utilities/fsl_debug_console.o ./utilities/fsl_sbrk.o&amp;nbsp; ./startup/startup_MK64F12.o ./startup/system_MK64F12.o&amp;nbsp; ./source/DAC_sine_wave.o ./source/heapsort.o ./source/lwip_httpsrv_freertos.o&amp;nbsp; ./lwip/src/netif/ppp/auth.o ./lwip/src/netif/ppp/chap.o ./lwip/src/netif/ppp/chpms.o ./lwip/src/netif/ppp/fsm.o ./lwip/src/netif/ppp/ipcp.o ./lwip/src/netif/ppp/lcp.o ./lwip/src/netif/ppp/magic.o ./lwip/src/netif/ppp/pap.o ./lwip/src/netif/ppp/ppp.o ./lwip/src/netif/ppp/ppp_md5.o ./lwip/src/netif/ppp/ppp_oe.o ./lwip/src/netif/ppp/randm.o ./lwip/src/netif/ppp/vj.o&amp;nbsp; ./lwip/src/netif/etharp.o ./lwip/src/netif/slipif.o&amp;nbsp; ./lwip/src/core/snmp/asn1_dec.o ./lwip/src/core/snmp/asn1_enc.o ./lwip/src/core/snmp/mib2.o ./lwip/src/core/snmp/mib_structs.o ./lwip/src/core/snmp/msg_in.o ./lwip/src/core/snmp/msg_out.o&amp;nbsp; ./lwip/src/core/ipv4/autoip.o ./lwip/src/core/ipv4/icmp.o ./lwip/src/core/ipv4/igmp.o ./lwip/src/core/ipv4/inet.o ./lwip/src/core/ipv4/inet_chksum.o ./lwip/src/core/ipv4/ip.o ./lwip/src/core/ipv4/ip_addr.o ./lwip/src/core/ipv4/ip_frag.o&amp;nbsp; ./lwip/src/core/def.o ./lwip/src/core/dhcp.o ./lwip/src/core/dns.o ./lwip/src/core/init.o ./lwip/src/core/lwip_timers.o ./lwip/src/core/mem.o ./lwip/src/core/memp.o ./lwip/src/core/netif.o ./lwip/src/core/pbuf.o ./lwip/src/core/raw.o ./lwip/src/core/stats.o ./lwip/src/core/sys.o ./lwip/src/core/tcp.o ./lwip/src/core/tcp_in.o ./lwip/src/core/tcp_out.o ./lwip/src/core/udp.o&amp;nbsp; ./lwip/src/api/api_lib.o ./lwip/src/api/api_msg.o ./lwip/src/api/err.o ./lwip/src/api/netbuf.o ./lwip/src/api/netdb.o ./lwip/src/api/netifapi.o ./lwip/src/api/sockets.o ./lwip/src/api/tcpip.o&amp;nbsp; ./lwip/port/ethernetif.o ./lwip/port/sys_arch.o&amp;nbsp; ./freertos/portable/port.o&amp;nbsp; ./freertos/croutine.o ./freertos/event_groups.o ./freertos/heap_4.o ./freertos/list.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o&amp;nbsp; ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_edma.o ./drivers/fsl_enet.o ./drivers/fsl_gpio.o ./drivers/fsl_pit.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o&amp;nbsp; ./board/board.o ./board/clock_config.o ./board/fsl_phy.o ./board/pin_mux.o&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;./utilities/fsl_sbrk.o: In function `_sbrk':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;C:/K64/SDK_2.0_FRDM-K64F/devices/MK64F12/utilities/fsl_sbrk.c:65: &lt;SPAN style="color: #ff0000;"&gt;undefined reference to `__HeapLimit'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;collect2.exe: error: ld returned 1 exit status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Apparently, as soon as I instantiate an instance of a class, some memory management code is dragged in...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background: As is normal for classes in systems with no dynamic memory, the test class overrides new, new[], delete, and delete[] with versions that do not use free storage. The compile options for the example cpp file were set to &lt;EM&gt;no exceptions&lt;/EM&gt; and &lt;EM&gt;no RTTI&lt;/EM&gt;. So, I expected no use of free storage runtime...&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This leaves two important questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If I want to use the runtime's free storage, what project options are required to link and run ?&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Most importantly:&lt;/STRONG&gt; To avoid dragging in any runtime free storage (as normal for our projects), what additional steps are required?&lt;/LI&gt;&lt;/OL&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I've attached the example code for you to try. Just add this to a project converted from C as above.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338547"&gt;Example_for_NXP_heapsort.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Oct 2016 22:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660559#M8709</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2016-10-23T22:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660560#M8710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see from this post that link option -specs=nosys.specs may be required:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://mcuoneclipse.com/2014/06/15/tutorial-diy-kinetis-sdk-project-with-eclipse-startup/"&gt;https://mcuoneclipse.com/2014/06/15/tutorial-diy-kinetis-sdk-project-with-eclipse-startup/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Checking an example C++ enabled project created by new project wizard, I see that this is set in the linker miscellaneous options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding -specs=nosys.specs to my upgraded project links....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 00:35:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660560#M8710</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2016-10-24T00:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660561#M8711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;-specs=nosys.specs is to tell the linker not to include any special system library functionality.&lt;BR /&gt;it is normally used when project use other RTOS that need not use system library.&lt;BR /&gt;for example, if your C++ project includes SDK, option -specs=nosys.specs is required.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 10:13:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660561#M8711</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-10-24T10:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660562#M8712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jennie - Unfortunately its an incomplete answer. I updated the question above to add the next parts of the question. It would be great if you can answer both of the above questions!&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 11:57:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660562#M8712</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2016-10-24T11:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660563#M8713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't really see your project. But from your file name "&lt;SPAN style="font-size: 13px; font-family: andale mono,monospace;"&gt;lwip_httpsrv_freertos_frdmk64f&lt;/SPAN&gt;", this is from our SDK demo code under SDK install folder. if it is true, what's your SDK version? I need to get your confirmation to check it further. Thanks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 09:02:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660563#M8713</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-10-26T09:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660564#M8714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just had to update a project from C to C++, so here's the &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;complete&lt;/STRONG&gt;&lt;/SPAN&gt; answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(0) Before starting, make a copy of the initial project!&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Verify you really got a complete copy (as opposed to links to the same files on disk)!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Verify you can access and build both copies within Eclipse!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Close Eclipse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1) Edit .project file:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; in &amp;lt;natures&amp;gt; section, add:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;nature&amp;gt;org.eclipse.cdt.core.ccnature&amp;lt;/nature&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For C++, all the include paths and defines from the C portions of the project will be missing.&lt;BR /&gt;You'd like to be able to set common include paths and defines for (debug/release)x(C/C++).&lt;BR /&gt;Unfortunately, there's no way to enforce a common heirarchy for these in Eclipse (short of using your own make file).&lt;BR /&gt;Editing characteristics for multiple configurations in Eclipse is guaranteed to not do what you want.&lt;BR /&gt;So...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(2) In Eclipse, insert dummy include path and define for each of the (C++ debug/release).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Close Eclipse.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Edit .cproject to copy required paths and defines to each configuration (overwriting dummy created above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it should compile (including any C++ modules you've added or changed from C).&lt;BR /&gt;But it won't yet link, because C-link is implicitly replaced with C++-link,&lt;BR /&gt;which looses all your linker settings (flags, libraries).&lt;BR /&gt;So...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(3) Copy the linker settings from your original project's settings&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Add any required C++-specific settings (ie don't use exceptions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;BR /&gt;Best Regards, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 May 2017 21:05:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/660564#M8714</guid>
      <dc:creator>davenadler</dc:creator>
      <dc:date>2017-05-22T21:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert project to C++</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/1754133#M10247</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/132425"&gt;@davenadler&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Can you explain it further - as I can't get it.Let'me explain where I'm stuck.&lt;/P&gt;&lt;P&gt;I've converted project into C/C++ like &lt;A href="https://mcuoneclipse.com/2020/07/11/from-c-to-c-converting-eclipse-c-projekts/" target="_self"&gt;this&lt;/A&gt; and I checked MCU C++ Libraries for the include files/search paths, its completely empty as attached below img&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2023-11-08 15-21-57.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/248994iFB908EC38F147480/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot from 2023-11-08 15-21-57.png" alt="Screenshot from 2023-11-08 15-21-57.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, whether we have to include the path additionally? If so, let me know which else should be added so&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/132425"&gt;@davenadler&lt;/a&gt;&amp;nbsp;...Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 10:14:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Convert-project-to-C/m-p/1754133#M10247</guid>
      <dc:creator>GanesanGuru</dc:creator>
      <dc:date>2023-11-08T10:14:56Z</dc:date>
    </item>
  </channel>
</rss>

