<?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>MQX Software SolutionsのトピックRe: Flash X Not Working... I have proof!</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362239#M11903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tested your code under MQX4.1.1 and CW10.6.&lt;/P&gt;&lt;P&gt;It runs until num_segments=90. After that it blocks because command “ptrs = _lwmem_alloc_zero(allocsz);” failed and ptrs is now NULL.&lt;/P&gt;&lt;P&gt;It never returns message that flash write fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see problem in that situation where you don’t check result of memory allocation and memory freeing.&lt;/P&gt;&lt;P&gt;In case of dynamically allocated memory, it can simply happen that allocation fail. In that case you have to manage appropriate action (try once again/wait/cancel upper layer command/error message…).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally I don’t understood principle of your Releasing loop.&lt;/P&gt;&lt;P&gt;As first you allocates field of pointers (ptrs). After that you allocate 15 bytes for every pointer in that field.&lt;/P&gt;&lt;P&gt;In release loop you first erase every pointer in field (ptrs[i] = NULL;) and after that you trying release this NULL pointer.&lt;/P&gt;&lt;P&gt;It returns error code 1 (MQX_INVALID_POINTER), but you didn’t check it.&lt;/P&gt;&lt;P&gt;Therefore I suppose that this is root cause of this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This quickly leads to memory leak, because you don’t freeing memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I comment out this line (ptrs[i] = NULL;), it runs up to 11932 allocsz loops, where _lwmem_alloc_zero() for ptrs [2982] failure. Total allocation is now 44745 bytes and I suppose that we simply reach end of available memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I would like to recommend do not use _lwmem commands directly. Please use _mem_alloc commands instead of _lwmem. Otherwise macros like MQX_USE_LWMEM_ALLOCATOR has no sense and you have to keep in mind which set of allocators you use in your application…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In attachment you can find your code with my modifications/fixes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;RadekS&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>Thu, 29 Jan 2015 17:43:31 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2015-01-29T17:43:31Z</dc:date>
    <item>
      <title>Flash X Not Working... I have proof!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362238#M11902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've finally managed to capture a failing FlashX driver.&lt;/P&gt;&lt;P&gt;This is using the TWR-K60D100M with MK60DN512VMD10-4N22D and associated 4.1 BSP from the cloning wizard.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue appears to be related to memory allocation.&lt;/P&gt;&lt;P&gt;The test code allocates an increasing number of memory segments, each 15 bytes, then tries to write 512 bytes to flashx:swap1.&lt;/P&gt;&lt;P&gt;The contents of the flash write have nothing to do with the memory allocated.&amp;nbsp; They are separate buffers.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a number of cycles, the write fails.&lt;/P&gt;&lt;P&gt;Specifically when it hits 57 segments (@ 15 bytes each this is 855 bytes).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I start the loop at 57 segments, the write doesn't fail here.&amp;nbsp; It counts up to some larger number of segments to fail.&lt;/P&gt;&lt;P&gt;So it seems deallocating memory doesn't put the system back in the same state.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, here is the main.c file.&amp;nbsp; Also attached.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;// MQX headers #include &amp;lt;mqx.h&amp;gt; #include &amp;lt;bsp.h&amp;gt; #include &amp;lt;fio.h&amp;gt;&amp;nbsp;&amp;nbsp; #ifdef _DEBUG&amp;nbsp;&amp;nbsp; // Allows you to do an action after the handler, such as return, print something, block, etc. #define ASSERT(cond,action,...) \ do { \ &amp;nbsp; if(!(cond)) {\ &amp;nbsp; assert_handler("[ASSERT]", #cond, __FILE__, __LINE__, ##__VA_ARGS__);\ &amp;nbsp; do {\ &amp;nbsp; action;\ &amp;nbsp; } while(0);\ &amp;nbsp; }\ } while(0)&amp;nbsp;&amp;nbsp; // Stops MQX #define ASSERT_FAIL(cond,...) ((!(cond) &amp;amp;&amp;amp; \ &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;&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;&amp;nbsp;&amp;nbsp; assert_handler("[FATAL]", #cond, __FILE__, __LINE__, ##__VA_ARGS__) &amp;amp;&amp;amp;\ &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;&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;&amp;nbsp;&amp;nbsp; (_mqx_fatal_error(-1),1)))&amp;nbsp;&amp;nbsp; #define ASSERT_WARN(cond,...) ((!(cond) &amp;amp;&amp;amp; \ &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;&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;&amp;nbsp;&amp;nbsp; assert_handler("[WARNING]", #cond, __FILE__, __LINE__, ##__VA_ARGS__)))&amp;nbsp;&amp;nbsp; #define ASSERT_MSG(cond,...) ((!(cond) &amp;amp;&amp;amp; \ &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;&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;&amp;nbsp; assert_handler("[MESSAGE]", #cond, __FILE__, __LINE__, ##__VA_ARGS__)))&amp;nbsp;&amp;nbsp; #else #define ASSERT(cond,action,...)&amp;nbsp; do {(void)sizeof(cond);} while(0) #define ASSERT_FAIL(cond,...) #define ASSERT_WARN(cond,...) #define ASSERT_MSG(cond,...) #endif&amp;nbsp;&amp;nbsp; /* Task IDs */ enum {MAIN_TASK = 1};&amp;nbsp;&amp;nbsp; // Local function declarations void main_task(uint32_t);&amp;nbsp;&amp;nbsp; const TASK_TEMPLATE_STRUCT&amp;nbsp; MQX_template_list[] = { &amp;nbsp; /* Task Index,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Function,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stack,&amp;nbsp; Priority,&amp;nbsp; Name,&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;&amp;nbsp;&amp;nbsp; Attributes,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Param, Time Slice */ &amp;nbsp; { MAIN_TASK,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; main_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4096,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10,&amp;nbsp;&amp;nbsp; "main",&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; MQX_AUTO_START_TASK, 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 }, &amp;nbsp; { 0 } };&amp;nbsp;&amp;nbsp;&amp;nbsp; static bool assert_handler(char *category, char *arg, char *file, int line, ...) { &amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%s: (%s) at line %d in %s\n", category, arg, line, file);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; va_list args; &amp;nbsp;&amp;nbsp;&amp;nbsp; va_start(args, line); &amp;nbsp;&amp;nbsp;&amp;nbsp; vprintf(va_arg(args, char *), args); &amp;nbsp;&amp;nbsp;&amp;nbsp; va_end(args);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\n"); &amp;nbsp; fflush(stdout); &amp;nbsp;&amp;nbsp;&amp;nbsp; return true; }&amp;nbsp;&amp;nbsp; static uint32_t min(uint32_t a, uint32_t b) { &amp;nbsp; return a&amp;lt;b?a:b; }&amp;nbsp;&amp;nbsp; int32_t flash_write_bytes(const char *name, const uint32_t addr, const uint8_t *vals, const uint32_t num_bytes) { &amp;nbsp; MQX_FILE_PTR flash = fopen(name, 0); &amp;nbsp; ASSERT_FAIL(flash != NULL, "Can't open flash file"); &amp;nbsp; //ioctl(flash, FLASH_IOCTL_ENABLE_SECTOR_CACHE, 0); &amp;nbsp; //ioctl(flash, FLASH_IOCTL_ENABLE_BUFFERING, 0); &amp;nbsp; fseek(flash, addr, IO_SEEK_SET); &amp;nbsp; uint32_t result = write(flash, (uint8_t&amp;nbsp; *)vals, num_bytes); &amp;nbsp; if (result != num_bytes) { &amp;nbsp; fclose(flash); &amp;nbsp; return 0; &amp;nbsp; } else { // Yes we were able to write everything &amp;nbsp; fclose(flash); &amp;nbsp; return result; &amp;nbsp; } }&amp;nbsp;&amp;nbsp; static uint8_t static_buff[2048]; uint32_t test_flash(const char *name, uint32_t addr, uint8_t *vals, uint32_t num_bytes) { &amp;nbsp; // Test flash for any region, any address. &amp;nbsp; // This is destructive to content of vals, and obviously &amp;nbsp; // destructive to contents of flash &amp;nbsp; static uint8_t val = 1; &amp;nbsp; memset(static_buff, val++, 2048);&amp;nbsp;&amp;nbsp; &amp;nbsp; // Use local buffer and 2048 if buffer arg and sz are null and zero, respectively &amp;nbsp; uint8_t *buff =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vals == NULL ? static_buff : vals; &amp;nbsp; uint32_t&amp;nbsp;&amp;nbsp; sz = num_bytes ==&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2048 : num_bytes; &amp;nbsp; uint32_t result; &amp;nbsp; result = flash_write_bytes(name, addr, buff, sz); &amp;nbsp; printf("Test flash result is: %d\n", result); &amp;nbsp; fflush(stdout); &amp;nbsp; return result; }&amp;nbsp;&amp;nbsp; static void main_task(uint32_t initial_data) { &amp;nbsp; uint32_t num_segments = 1; &amp;nbsp; uint32_t seg_size = 15; &amp;nbsp; uint32_t *sizes; &amp;nbsp; uint32_t **ptrs; &amp;nbsp; uint32_t totalsz = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp; while(1) { &amp;nbsp; //printf("\nAt least %d bytes available at start\n", find_max_memory()); &amp;nbsp; uint32_t allocsz = num_segments * sizeof(uint32_t *); &amp;nbsp; printf("\nAllocating %d bytes to hold %d sizes\n", allocsz, num_segments); &amp;nbsp; sizes = _lwmem_alloc_zero(allocsz); &amp;nbsp; ASSERT(sizes, "Could not allocate %d bytes", allocsz); &amp;nbsp; fflush(stdout);&amp;nbsp;&amp;nbsp; &amp;nbsp; printf("Allocating %d bytes to hold %d ptrs\n", allocsz, num_segments); &amp;nbsp; ptrs = _lwmem_alloc_zero(allocsz); &amp;nbsp; ASSERT(ptrs, "Could not allocate %d bytes", allocsz); &amp;nbsp; fflush(stdout);&amp;nbsp;&amp;nbsp; &amp;nbsp; printf("Allocating %d times\n", num_segments); &amp;nbsp; for(uint32_t i = 0; i &amp;lt; num_segments; i++) { &amp;nbsp; uint32_t sz = seg_size; &amp;nbsp; //printf("\t%d\t Allocating %d bytes\n", i, sz); &amp;nbsp; //fflush(stdout); &amp;nbsp; ptrs[i] = _lwmem_alloc_zero(sz); &amp;nbsp; ASSERT_FAIL(ptrs[i], "Could not allocate %d bytes", sz); &amp;nbsp; sizes[i] = sz; &amp;nbsp; totalsz += sz; &amp;nbsp; }&amp;nbsp;&amp;nbsp; &amp;nbsp; printf("Total allocation: %d bytes\n", totalsz); &amp;nbsp; bool test_result = test_flash("flashx:swap1", 0x00000000, NULL, 512); &amp;nbsp; ASSERT_FAIL(test_result, "Failed flash test"); &amp;nbsp; printf("Flash test passed\n"); &amp;nbsp; fflush(stdout);&amp;nbsp;&amp;nbsp; &amp;nbsp; // Release before starting over &amp;nbsp; printf("Releasing everything\n"); &amp;nbsp; for(uint32_t i = 0; i &amp;lt; num_segments; i++) { &amp;nbsp; sizes[i] = 0; &amp;nbsp; ptrs[i] = NULL; &amp;nbsp; _lwmem_free(ptrs[i]); &amp;nbsp; } &amp;nbsp; _lwmem_free(ptrs); &amp;nbsp; _lwmem_free(sizes); &amp;nbsp; totalsz = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp; num_segments += 1; &amp;nbsp; } }&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&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-339093" rel="nofollow noopener noreferrer" target="_blank"&gt;main.c.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 00:05:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362238#M11902</guid>
      <dc:creator>michaelschwager</dc:creator>
      <dc:date>2015-01-21T00:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flash X Not Working... I have proof!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362239#M11903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I tested your code under MQX4.1.1 and CW10.6.&lt;/P&gt;&lt;P&gt;It runs until num_segments=90. After that it blocks because command “ptrs = _lwmem_alloc_zero(allocsz);” failed and ptrs is now NULL.&lt;/P&gt;&lt;P&gt;It never returns message that flash write fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see problem in that situation where you don’t check result of memory allocation and memory freeing.&lt;/P&gt;&lt;P&gt;In case of dynamically allocated memory, it can simply happen that allocation fail. In that case you have to manage appropriate action (try once again/wait/cancel upper layer command/error message…).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally I don’t understood principle of your Releasing loop.&lt;/P&gt;&lt;P&gt;As first you allocates field of pointers (ptrs). After that you allocate 15 bytes for every pointer in that field.&lt;/P&gt;&lt;P&gt;In release loop you first erase every pointer in field (ptrs[i] = NULL;) and after that you trying release this NULL pointer.&lt;/P&gt;&lt;P&gt;It returns error code 1 (MQX_INVALID_POINTER), but you didn’t check it.&lt;/P&gt;&lt;P&gt;Therefore I suppose that this is root cause of this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This quickly leads to memory leak, because you don’t freeing memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I comment out this line (ptrs[i] = NULL;), it runs up to 11932 allocsz loops, where _lwmem_alloc_zero() for ptrs [2982] failure. Total allocation is now 44745 bytes and I suppose that we simply reach end of available memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I would like to recommend do not use _lwmem commands directly. Please use _mem_alloc commands instead of _lwmem. Otherwise macros like MQX_USE_LWMEM_ALLOCATOR has no sense and you have to keep in mind which set of allocators you use in your application…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In attachment you can find your code with my modifications/fixes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;RadekS&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>Thu, 29 Jan 2015 17:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362239#M11903</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-01-29T17:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Flash X Not Working... I have proof!</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362240#M11904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Radek.  Yes after posting that code I realized the memory bug.  I simplified it and still got the failures after allocating only ~300 bytes (multiple allocations and release of 2-3 bytes each).  Also I verified that there is around 100k free memory in that test code, so it stops well before memory runs out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also in my full application I removed &lt;STRONG&gt;all&lt;/STRONG&gt; dynamic allocations and hand out pointers to a statically allocated chunk of memory (uint_08 ) instead.  The failure still occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll update the simple application and see if I can replicate the errors again without the allocation scheme you saw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for taking a look.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 00:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Flash-X-Not-Working-I-have-proof/m-p/362240#M11904</guid>
      <dc:creator>michaelschwager</dc:creator>
      <dc:date>2015-01-30T00:28:39Z</dc:date>
    </item>
  </channel>
</rss>

