<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: M52235EVB issues and questions</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M52235EVB-issues-and-questions/m-p/202287#M9359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not sure exactly which version of the stack you have, but in the one I have, you need to change the default number of BIG and LIL bufs in ipport.h, to both not run out of memory and not run into deadlocks.&amp;nbsp; I use:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#define NUMBIGBUFS&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //FSL stack not work for &amp;lt;4&lt;BR /&gt;#define NUMLILBUFS&amp;nbsp;&amp;nbsp; 14&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;I also sent the following to FSL when they requested feedback.&amp;nbsp; Maybe it will help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;--------&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Hi Eric,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;If you are still looking for feedback on what could be fixed in the ColdFire TCP/IP stack, I have a few comments regarding the source code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Depending on the calling conventions specified by the user, the existing code can break.&amp;nbsp; For example, if I compile with "Register" parameter passing, then the assembly language functions break because they expect "Compact" calling conventions.&amp;nbsp; These bugs can easily be fixed by adding a compact_abi declaration to the function declarations, such as:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./h/ip.h ########&lt;BR /&gt;428c428&lt;BR /&gt;&amp;lt; unsigned short cksum(void*, unsigned);&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; __declspec(compact_abi) unsigned short cksum(void*, unsigned);&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./h/task.h ########&lt;BR /&gt;90,92c90,92&lt;BR /&gt;&amp;lt; stack_t * tk_frame(task *, int(*)(int), unsigned);&lt;BR /&gt;&amp;lt; void&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tk_switch(task *);&amp;nbsp; /* run the next task */&lt;BR /&gt;&amp;lt; stack_t * tk_getsp(void);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* get current stack pointer */&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; __declspec(compact_abi) stack_t * tk_frame(task *, int(*)(int), unsigned);&lt;BR /&gt;&amp;gt; __declspec(compact_abi) void&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tk_switch(task *);&amp;nbsp; /* run the next task */&lt;BR /&gt;&amp;gt; __declspec(compact_abi) stack_t * tk_getsp(void);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* get current stack pointer */&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Also, if I enable the use sdata and sbss, the tasking system gets confused because it forgets to load A5 (the sdata/sbss base register) for the "other " tasks.&amp;nbsp; This can be easily fixed to propagate A5 at task creation time, such as:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./cf_specific/tk_util.s ########&lt;BR /&gt;113a114&lt;BR /&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; move.l&amp;nbsp; A5,40(A0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // _SDA_BASE&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;These were the only places I was forced to change the existing code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Thank you!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;-- Rich&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;&lt;FONT face="Arial" size="2"&gt;rich@testardi.com&lt;/FONT&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Nov 2008 07:43:09 GMT</pubDate>
    <dc:creator>RichTestardi</dc:creator>
    <dc:date>2008-11-15T07:43:09Z</dc:date>
    <item>
      <title>M52235EVB issues and questions</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M52235EVB-issues-and-questions/m-p/202286#M9358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;First of all, I just started playing with the M52235EVB in light of an upcoming project that will be using hte 52235 and ethernet.&amp;nbsp; My previous experince with Freescale is with HCS08/HCS12 devices.&amp;nbsp; I was playing around with the EVB and noticed some issues as soon as I tried to use the RTOS example project that comes with the EVB.&amp;nbsp; The LEDs were blinking quiet slowly and the console was very unresponsive while running the ColdFire_Lite_RTOS target.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It quickly became clear something was wrong with the tasking system and it was a very simple basic problem.&amp;nbsp; After a quick debug session it shows that cticks was not being checked properly in the section of tk_block that looks for tasks to run.&amp;nbsp; The problem is&amp;nbsp;cticks was declared as a&amp;nbsp; simple unsigned long, while it was still being modified in an ISR and checked in the main flow of the program.&amp;nbsp; It seems the compiler optimized&amp;nbsp;some accesses to cticks and as such it doesn't check it properly.&amp;nbsp; The simple solution is declaring cticks as volatile in main.c and &amp;nbsp;ipport.h.&amp;nbsp;&amp;nbsp;Does anyone know if there are similiar problems with these projects that I should look at before proceeding?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 06:29:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M52235EVB-issues-and-questions/m-p/202286#M9358</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-11-15T06:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: M52235EVB issues and questions</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M52235EVB-issues-and-questions/m-p/202287#M9359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not sure exactly which version of the stack you have, but in the one I have, you need to change the default number of BIG and LIL bufs in ipport.h, to both not run out of memory and not run into deadlocks.&amp;nbsp; I use:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#define NUMBIGBUFS&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //FSL stack not work for &amp;lt;4&lt;BR /&gt;#define NUMLILBUFS&amp;nbsp;&amp;nbsp; 14&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;I also sent the following to FSL when they requested feedback.&amp;nbsp; Maybe it will help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;--------&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Hi Eric,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;If you are still looking for feedback on what could be fixed in the ColdFire TCP/IP stack, I have a few comments regarding the source code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Depending on the calling conventions specified by the user, the existing code can break.&amp;nbsp; For example, if I compile with "Register" parameter passing, then the assembly language functions break because they expect "Compact" calling conventions.&amp;nbsp; These bugs can easily be fixed by adding a compact_abi declaration to the function declarations, such as:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./h/ip.h ########&lt;BR /&gt;428c428&lt;BR /&gt;&amp;lt; unsigned short cksum(void*, unsigned);&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; __declspec(compact_abi) unsigned short cksum(void*, unsigned);&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./h/task.h ########&lt;BR /&gt;90,92c90,92&lt;BR /&gt;&amp;lt; stack_t * tk_frame(task *, int(*)(int), unsigned);&lt;BR /&gt;&amp;lt; void&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tk_switch(task *);&amp;nbsp; /* run the next task */&lt;BR /&gt;&amp;lt; stack_t * tk_getsp(void);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* get current stack pointer */&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; __declspec(compact_abi) stack_t * tk_frame(task *, int(*)(int), unsigned);&lt;BR /&gt;&amp;gt; __declspec(compact_abi) void&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tk_switch(task *);&amp;nbsp; /* run the next task */&lt;BR /&gt;&amp;gt; __declspec(compact_abi) stack_t * tk_getsp(void);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* get current stack pointer */&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Also, if I enable the use sdata and sbss, the tasking system gets confused because it forgets to load A5 (the sdata/sbss base register) for the "other " tasks.&amp;nbsp; This can be easily fixed to propagate A5 at task creation time, such as:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE dir="ltr"&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;######## ./cf_specific/tk_util.s ########&lt;BR /&gt;113a114&lt;BR /&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; move.l&amp;nbsp; A5,40(A0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // _SDA_BASE&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;These were the only places I was forced to change the existing code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Thank you!&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;-- Rich&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;&lt;FONT face="Arial" size="2"&gt;rich@testardi.com&lt;/FONT&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Nov 2008 07:43:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/M52235EVB-issues-and-questions/m-p/202287#M9359</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-11-15T07:43:09Z</dc:date>
    </item>
  </channel>
</rss>

