<?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>LPC MicrocontrollersのトピックRe:  FreeRTOS+UDP demo and LPCOpen</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540736#M12119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Wed Jan 21 07:13:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; I thought it by default used the USB COM channel. Is that not the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please read the FreeRTOS+CLI documentation - a link to which has already been posted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; Didn't realize you guys were on line here too&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS support forum is the correct place to post questions about FreeRTOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPCWare support forum is the correct place to post questions about LPCOpen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes there is a cross over.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:24:53 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:24:53Z</dc:date>
    <item>
      <title>FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540730#M12113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Mon Jan 19 12:44:33 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have built and can debug the freertos_tcpecho code in LPCOpen.&amp;nbsp; It pings as expected and seems to be working properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I am looking at the&amp;nbsp; FreeRTOS+UDP demo on the freeRTOS page and they discus the USB console and the CLI interface using a terminal program.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I get a console port with the freertos_tcpecho thingie in LPCOpen?&amp;nbsp; I do not see any COM ports in device manager when running the code.&amp;nbsp; Is this only available with the app on the freeRTOS page.&amp;nbsp; ( I was hoping that the&amp;nbsp; console port was available any time you run an RTOS project? )&amp;nbsp;&amp;nbsp; Maybe it is just disabled in the LPCOpen code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540730#M12113</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:49Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540731#M12114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Tue Jan 20 00:56:10 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;To have a console available you need to add &lt;/SPAN&gt;&lt;A href="http://http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_CLI/FreeRTOS_Plus_Command_Line_Interface.shtml"&gt;FreeRTOS+CLI&lt;/A&gt;&lt;SPAN&gt; into your project.&amp;nbsp; It is only one source file, and commercial licenses are free for LPC17xx and LPC18xx users.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very soon we (Real Time Engineers ltd/FreeRTOS) will be releasing a &lt;/SPAN&gt;&lt;A href="http://http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/index.html"&gt;FreeRTOS+TCP&lt;/A&gt;&lt;SPAN&gt; project for the LPC18xx that has a lot of additional functionality.&amp;nbsp; This has been supplied to some early adopters already, but needs a little clean up before general release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540731#M12114</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:49Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540732#M12115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Tue Jan 20 06:33:23 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good to hear about the FreeRTOS+TCP project...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540732#M12115</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:50Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540733#M12116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Tue Jan 20 14:40:31 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will the FreeRTOS+CLI run on the lpc1837?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I built the demo, changed the MCU in the project settings to 1837.&amp;nbsp; Edited the memory details so the sram looked like it did for the 1830.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to debug I get a Hardfault at 0x1a0001fc which is I think in the range for flash.&amp;nbsp; is the code trying to write to flash as though it were sram?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there is an easy adjustment, please let me know before my head gets too bruised.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540733#M12116</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540734#M12117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Tue Jan 20 14:51:42 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;FreeRTOS+CLI itself has no hardware dependencies, and will run on any device.&amp;nbsp; You do however have to provide input and output for the CLI, and that naturally does have a hardware dependency.&amp;nbsp; We have examples that use a UART, a UDP port, a TCP port (in the lab) and USB CDC drivers for character input and output - I can recall which the demo you are talking about is using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS+TCP project we have running on both the LPC1830 and LPC1835 Xplorer boards from NGX, with the only changes being to the target MCU and associated memory map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540734#M12117</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:52Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540735#M12118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Wed Jan 21 07:05:10 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to spend a couple of days on another project so I'll set this aside for now....&amp;nbsp; but one question about the CLI.&amp;nbsp; I thought it by default used the USB COM channel.&amp;nbsp; Is that not the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a related issue, I posted the same "does it work on 1837" question on your sourceforge forum.&amp;nbsp; Did I do a bad by duplicating?&amp;nbsp;&amp;nbsp; Didn't realize you guys were on line here too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540735#M12118</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:52Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540736#M12119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Wed Jan 21 07:13:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; I thought it by default used the USB COM channel. Is that not the case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please read the FreeRTOS+CLI documentation - a link to which has already been posted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; Didn't realize you guys were on line here too&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS support forum is the correct place to post questions about FreeRTOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPCWare support forum is the correct place to post questions about LPCOpen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes there is a cross over.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540736#M12119</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:53Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540737#M12120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Wed Jan 21 11:51:30 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sorry.&amp;nbsp; I completely bollixed up this posting.&amp;nbsp;&amp;nbsp; I started out right.&amp;nbsp; I am trying to build the FreeRTOS_UDP project.&amp;nbsp; Somewhere in the middle I started calling it FreeRTOS+CLI... brain fart.&amp;nbsp; I am only working on FreeRTOS+UDP.&amp;nbsp; This project has some CLI responses built in as shown in the video on the FreeRTOS site.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the question I meant to ask a couple of postings ago...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Will the FreeRTOS+UDP project work on an LPC1837?&amp;nbsp; ... by only changing the MPU choice and memory map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry about the confusion,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540737#M12120</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:53Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540738#M12121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Wed Jan 21 13:52:41 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This question was asked on the FreeRTOS forum just yesterday - I assumed it was from you.&amp;nbsp; In any case, there is an answer here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fsourceforge.net%2Fp%2Ffreertos%2Fdiscussion%2F382005%2Fthread%2F7e08dd08%2F" rel="nofollow" target="_blank"&gt;https://sourceforge.net/p/freertos/discussion/382005/thread/7e08dd08/&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540738#M12121</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540739#M12122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Mon Jan 26 13:14:51 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been away for a couple of days and now have had some time do devote to this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see where I went wrong with the LPC1837.&amp;nbsp; I edited the MCP memory map which made the project build OK but since I was telling the tool that there was a 96kb segment at 0x10000000 of course it would fail when run.&amp;nbsp; There is only a 32kB segment at that location in the LPC1837.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Going back and making the MCU memory map correct for the LPC1837 hardware I get build errors indicating that the '.bss' section will not fit in the reagion RamLoc32.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I need to tell whatever is making the bss section to only use 32kB.&amp;nbsp; ( or use the other SRAM region which is 40kB ).&amp;nbsp; I can track this down to a section in the file "FreeRTOS_UDP_Demo_Debug.ld" which is a generated file and should not be edited.&amp;nbsp; The auto comments in the file indicate that this is setup automatically by the linker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now I am snarled up in the internals of FreeRTOS_UDP and the LPCXpresso environment.&amp;nbsp; Not the place I want to be when just trying to learn the MPU, the tool, and the RTOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please Help.&amp;nbsp; What do I need to do to get the demo to run on the LPC1837?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540739#M12122</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:55Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540740#M12123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" rel="nofollow noopener noreferrer noopener noreferrer" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Mon Jan 26 14:08:39 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The biggest thing in the bss will be the &lt;/SPAN&gt;&lt;A href="http://http://www.freertos.org/a00111.html" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;FreeRTOS heap&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way I get around this on the LPC is to use heap_5.c (see the link above) and set the heap in the linker script to as close to 0 as you can get it.&amp;nbsp; You may however find that the compiler libraries call malloc(), and that will break things if the heap in the linker is near zero - to prevent that also build in the printf-stdarg.c file you will find multiple copies of in the FreeRTOS/Demo sub-directories of the main FreeRTOS download.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When using heap_5.c you can define each memory region separately, then create have the FreeRTOS heap span across all the regions.&amp;nbsp; It is just like heap_4.c but the memory it uses does not have to be in a contiguous block.&amp;nbsp; That way you can access all the RAM for the task heaps and network buffers without them appearing in the linker script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FreeRTOS+TCP demo does it like this.&amp;nbsp; The linker only knows about the lowest block of RAM on the LPC.&amp;nbsp; Then there is the following structure:&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;const HeapRegion_t xHeapRegions_LPC1830[] =
{
{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ucHeapBlock1,&amp;nbsp;&amp;nbsp; configTOTAL_HEAP_SIZE }, /* See definition above. */
{ ( uint8_t * ) mainRAM_LOC_40,&amp;nbsp;&amp;nbsp; ( 40UL * 1024UL ) },
{ ( uint8_t * ) mainRAM_AHB_32,&amp;nbsp;&amp;nbsp; ( 32UL * 1024UL ) },
{ ( uint8_t * ) mainRAM_AHB_16,&amp;nbsp;&amp;nbsp; ( 16UL * 1024UL ) },
{ NULL, 0 }&amp;nbsp; /* Terminates the array. */
};&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which actually works on the LPC1830 and LPC1837 (? might have that number wrong).&amp;nbsp; ucHeapBlock1 is in the bottom block of RAM, the one the linker knows about, so configTOTAL_HEAP_SIZE just dimensions what comes from that lowest block.&amp;nbsp; The other three regions are not known to the linker so you can do with them as you will.&amp;nbsp; You must use this structure to initialise the heap before any FreeRTOS calls are made:&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;vPortDefineHeapRegions( xHeapRegions_LPC1830 );&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:36:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540740#M12123</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2020-11-02T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540741#M12124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Tue Jan 27 14:55:04 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540741#M12124</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:56Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540742#M12125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Thu Jan 29 13:32:39 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Your reply above was very helpful but unfortunately I do not have enough trained neurons to connect all the dots by myself!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I placed the heap descriptors in main.c above the function calls and put the vPortDefineHeapRegions() as the first call in main().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My region descriptors look like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;const HeapRegion_t xHeapRegions_LPC1830[] =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ ( uint8_t * ) 0x10000000,&amp;nbsp;&amp;nbsp; ( 32UL * 1024UL ) },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ ( uint8_t * ) 0x10080000,&amp;nbsp;&amp;nbsp; ( 40UL * 1024UL ) },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ ( uint8_t * ) 0x20000000,&amp;nbsp;&amp;nbsp; ( 32UL * 1024UL ) },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ ( uint8_t * ) 0x20008000,&amp;nbsp;&amp;nbsp; ( 16UL * 1024UL ) },&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{ NULL, 0 }&amp;nbsp; /* Terminates the array. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am confused about the start address and size for the 1st descriptor.&amp;nbsp; In your example you used a variable to locate the start of the 1st region.&amp;nbsp; The lpc1837 first SRAM starts at 0x10000000 so I just used that.&amp;nbsp; Is that OK?&amp;nbsp; Is there something that I need to be aware of that would move the start address up from the actual SRAM start?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand that I need to set the size of the 1st region as small as I can.&amp;nbsp; How do I know how small that is.&amp;nbsp; Would I use the smallest value that does not produce compiler errors?&amp;nbsp; Do I set it to some test value and then run something to see if it crashes?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I understand what you are saying about compiling in the printf-stdarg.c file.&amp;nbsp; If it is linked into the project all malloc() calls will be intercepted and sent to pvPortMalloc(), yes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Last question.&amp;nbsp; You mention the linker script.&amp;nbsp; Being new to lpcXpresso I could be completely wrong but would you be referring to the&amp;nbsp; build properties, MCU settings, where the memory details are defined.&amp;nbsp; ( the items that I was incorrectly modifying several posts ago )&amp;nbsp;&amp;nbsp; Would I set the size of the SRAM blocks in there?&amp;nbsp; I would set the first block to the same small value that would be used in the 1st descriptor.&amp;nbsp; I would set the other ones to ZERO.&amp;nbsp; Is that correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540742#M12125</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:57Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540743#M12126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Thu Jan 29 14:53:18 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The linker script will tell the linker which memory region to place the .data and .bss sections.&amp;nbsp; That will take up some room in one of the RAM blocks, but you don't know how much room until your build your application.&amp;nbsp; As you don't know how much room it will take, you don't know how much of that RAM block you can give to the FreeRTOS heap by including it in the HeapRegion_t structure.&amp;nbsp; Therefore I did not explicitly allocate any RAM in the first RAM block (which is the RAM block the linker script placed the .data and .bss) in the HeapRegion_t.&amp;nbsp; Instead I declared a variable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ucHeapBlock1[ configTOTAL_HEAP_SIZE ];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The linker will place the RAM allocated to that variable in the .bss section, which in turn it will place in the first block of RAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I find out how much RAM I can use from that block by playing with the size of configTOTAL_HEAP_SIZE.&amp;nbsp; If it is set too big the application will not link because it will run out of RAM in the .bss block.&amp;nbsp; When it fails to link it will tell you how much more memory it would have required in order to link.&amp;nbsp; Adjust configTOTAL_HEAP_SIZE down by that amount, and the application will link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By doing that the heap regions, as defined in the structure, will have *all* of the RAM from the blocks that are not used by the linker, and as much as possible from the first block of RAM, which is used by the linker.&amp;nbsp; The memory from the first block is the memory in the ucHeapBlock1 array - so that appears in the structure.&amp;nbsp; The memory in the other blocks is just hard coded to grab all the RAM in that block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think in fact the LPC1830 has yet another block of RAM higher up the memory that is not in the xHeapRegions_t structure I posted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that make sense?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Compiling in printf-stdarg.c will not direct malloc calls to pvPortMalloc() - although there are linker command line options you can use to achieve that if you want to.&amp;nbsp; What it does do is direct any calls to sprintf() type functions to the version in printf.starg.c, preventing any such function coming in from the C library.&amp;nbsp; The versions in the C library will call malloc in unexpected places, so preventing the ones from the library being linked into your project prevents malloc being called when you don't expect it to.&amp;nbsp; In fact one of the libraries in LPCXpresso (can't remember if it is Newlib nano or Redlib) will cause malloc to be called *before* you even reach main().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540743#M12126</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:57Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540744#M12127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Fri Jan 30 11:04:42 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, it does make sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPC1837 does have an additional 16kB up at 0x2000C000. I was planning on asking about that after I got everything working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh and concerning the malloc()...&amp;nbsp; I noticed that printf-stdarg.c is already part of the project.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540744#M12127</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540745#M12128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Tue Feb 03 08:26:49 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have my FreeRTOS+UDP up and running on my LPC1837 board.&amp;nbsp; Yay!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set the memory size of the 1st segment as you suggested.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have: #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 14336 ) )&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which is a few bytes less than where I get compile errors for bss segment fitting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also set up that last segment of SRAM in the table handed to vPortDefineHeapRegions();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using TeraTerm to look at the CLI.&amp;nbsp; I get an IP addres from the command ip-config.&amp;nbsp; I can ping the LPC1837 board from my PC which is on the same network and it&amp;nbsp; never fails to respond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am experiencing some incorrect behavior which I am wondering if it has to do where I am calling vPortDefineHeapRegions( xHeapRegions_LPC1830 ), or where I placed const HeapRegion_t xHeapRegions_LPC1830[] =.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The CLI seems to hang rather frequently.&amp;nbsp; For example if I issue the command "stat-tasks" repetitively.&amp;nbsp; ( slowly, once a second ) After a few tries ( less than 10 ) the CLI hangs up.&amp;nbsp; I can not get it to communicate except for power cycling the board.&amp;nbsp; This happens with other commands too.&amp;nbsp; So I am wondering if the CLI is overflowing&amp;nbsp; a stack?&amp;nbsp; When the CLI hangs, the board continues to respond to pings.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I kept the debugger up during one of these and it did not show anything bad...&amp;nbsp; but I am not sure where to look.&amp;nbsp; It did not emit any messages in the console, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried putty selecting the serial port and it behaves the same way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The blue light keeps flashing.&amp;nbsp; ( although I think it did stop one time )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any insight as to where to look?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. I am using Comm Echo to echo the UDP messages but am not seeing anything happen.&amp;nbsp; This may be my setup issue, but thought I would mention it.&amp;nbsp; I have Comm Echo allowed in my firewall.&amp;nbsp; Am just now installing Wireshark so I can see if I am receiving the UDP frames.&amp;nbsp; My PC is running 64 bit Win 7.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540745#M12128</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:58Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540746#M12129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Tue Feb 03 08:41:51 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;For the few times task-stats does run does it show any of the stack high water marks getting close to 0?&amp;nbsp; The lower the number the closer it is to overflowing the stack.&amp;nbsp; Do you have stack overflow protection turned on? &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freertos.org%2FStacks-and-stack-overflow-checking.html" rel="nofollow" target="_blank"&gt;http://www.freertos.org/Stacks-and-stack-overflow-checking.html&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also try placing a break point in the CLI task to see if it is receiving the data.&amp;nbsp; If it is, and is generating a reply, you can step through the code to see where it goes wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The task-stats commands it a bit brutal and keeps interrupts disabled for quite a long time, so it not really intended for production code, just as a debugging aid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Please ensure to post your project to the FreeRTOS interactive site: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Finteractive.freertos.org" rel="nofollow" target="_blank"&gt;http://interactive.freertos.org&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:24:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540746#M12129</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:24:59Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540747#M12130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Thu Feb 05 13:40:13 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had stack overflow protection turned ON.&amp;nbsp; ( It is ON as your demo ships )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However I never hit the break point that I placed on the handler so I dont think it is stack overflow.&amp;nbsp; At least not a detected one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw in some of the documentation that stack protection only works on non-segmented memory and since the LPC1837 has four segments, I thought I would turn the feature OFF.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It made no difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I set breaks points before and after the semaphores in the cGetCDCChar() procedure in CDCCommandConsole.c and watched the code execute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For this I typed "ip-config" and pressed ENTER to repeat the command in the CLI window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When it finally failed, the cGetCDCChar() procedure returned normally but the CLI window did not update as it had done on the successful passes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then pressing ENTER in the CLI did take me back into the 1st break point in cGetCDCChar() but when I stepped over the RX semaphore it stayed blocked.&amp;nbsp; No more response from the CLI input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So It seemed to go wrong on the last TX to the CLI but then blocked permanently on the next RX.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting valuable experience with lpcExpresso and the RTOS with this experience but I think I need to get this working reliably.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you be able to take a look at my project?&amp;nbsp; It is essentially the UDP+CLI demo with the changes discussed above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Tony&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:25:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540747#M12130</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:25:00Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540748#M12131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by &lt;A href="https://community.nxp.com/www.FreeRTOS.org" target="test_blank"&gt;www.FreeRTOS.org&lt;/A&gt; on Thu Feb 05 14:12:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;I saw in some of the documentation that stack protection only works on non-segmented memory and since the LPC1837 has four segments&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The comment about segmented memory refers to base/offset architectures such as the 8086 family.&amp;nbsp; Although the LPC1837 has more than one bank of RAM, they are all in the same flat 32-bit memory space, so in this case considered to be in the same segment.&amp;nbsp; In other words - the stack overflow checking should be working fine, but it doesn't sound like that is your problem anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, what I have just realised (remembered!) is the CLI is not using a UDP port for its input and output, but a USB CDC.&amp;nbsp; So it is not the UDP stack that is not responding, but the USB port.&amp;nbsp; I can't remember where the USB stack came from, I seem to recall NGX, but it has a Keil copyright notice in the files.&amp;nbsp; We have some other demos somewhere that use the USB CDC driver that is actually in the ROM of the chip, but that doesn't help here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From your description it sounds like it is attempting to obtain the mutex, but failing, is that correct.&amp;nbsp; The block time is 200m, so if it does not obtain the mutex within that time it should just give up and return to wait for more characters.&amp;nbsp; There isn't a path through that code that would result in the mutex not being returned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If it is not the mutex that is causing what you are seeing maybe it is in the USB driver.&amp;nbsp; I have just looked at the function USB_WriteEP() which has a comment in it saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&amp;nbsp; I can't get the code to post correctly, I think because it has "less than" characters in it, which the forum is taking as a URL tag, even when I escape it.&amp;nbsp; This is just the comment on the line I was referring to, you will see all the code if you look at the function:&amp;nbsp; /*_RB_ Fix for hang here. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I'm RB, by the way) which makes me think I had an issue at some time too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:25:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540748#M12131</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:25:01Z</dc:date>
    </item>
    <item>
      <title>Re:  FreeRTOS+UDP demo and LPCOpen</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540749#M12132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tvink on Thu Feb 05 15:19:10 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I was thinking you might be RB...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont think the problem is actually failing to get the mutex.&amp;nbsp; I think that that is a consequence of an earlier failure.&amp;nbsp; The last time I pressed run at the return point of the procedure, I was expecting the CLI to update with another pass of ip-config. Instead all that displayed was the cursor moving to beginning of the current line.&amp;nbsp; So the fail has already happened by this point.&amp;nbsp; When the procedure is again called, then the code is already doomed and ets stuck blocked in the RX semaphore.&amp;nbsp; I think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another thing.... In the RX part of the function, the xSemaphoreTake() does not have a xSemaphoreGive() following it... like the TX one does.&amp;nbsp; Should there be a Give here too?&amp;nbsp; ( I tried adding one but it did not seem to fix the problem )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:25:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FreeRTOS-UDP-demo-and-LPCOpen/m-p/540749#M12132</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:25:01Z</dc:date>
    </item>
  </channel>
</rss>

