<?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: mxli-3.0 released</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553366#M14550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Wed Jun 25 07:04:46 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Pacman&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;You can also divide sizeof by sizeof...&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define ARRAY_SIZE(a) ((sizeof((a)) / sizeof((a)[0])))&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't like macros, but this is definitely one of the few exceptions&amp;nbsp; :bigsmile: , see 'macros.h' (ELEMENTS). There's no replacement for it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I'm sloppy about the parentheses, partly because I suggest to use it on top-level arrays only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Today, I'm tempted to remove even more of the remaining #defines in that header, because inline static functions can replace most of them. In a little less generic way, though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:53:58 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:53:58Z</dc:date>
    <item>
      <title>mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553358#M14542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Apr 28 18:17:12 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I finally finished a re-write of the open source LPC ISP flash utility mxli.&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the moment it's Linux only. It supports nearly every LPC microcontroller from built-in tables and should support virtually every (future) LPC ARM microcontroller by command-line definition. mxli is made for the command line and designed specifically for use in scripts.&amp;nbsp; As an example: you can dump mxli's full device database (in mxli command line syntax) with a one-line shell loop&amp;nbsp; :bigsmile: :&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
$ mxli -Q --deviceList | while read d; do mxli --deviceDefinition -Qu"$d" ; done
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A comprehensive manual is provided (PDF and Unix man page). Only by reading this manual you can get an idea of the possibilities offered by mxli. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Most testing was performed on LPC4357, LPC176x and LPC81x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxli can be found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://http://www.windscooting.com/softy/mxli.html#Latest" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.windscooting.com/softy/mxli.html#Latest&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you compile mxli on any other platform than Linux, I'd like to know. In fact, I expect porting to a new platform to be an effort of half a day. The Linux-specific part of mxli is concentrated into the first 105 lines of code - that's it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553358#M14542</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553359#M14543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pacman on Sat Jun 14 11:06:23 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just tried to see if it would build out-of-the-box on a PPC Mac.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I got this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ../c-any/integers.h:48:2: error: #error "Invalid pointer size in the author's opinion."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that the size of a pointer on a PPC Mac is 32-bit (4 bytes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that '__SIZEOF_POINTER__' is not set by my gcc; perhaps it's a post gcc-4.2 feature ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553359#M14543</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553360#M14544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Jun 16 05:43:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Pity! I should have used something more backward compatible for this test. I clearly remember, the conditional and the Int/Uint types were a quick-hack, when first porting to a 64-bit system. I should clean that mess up, soon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'startpage.com' revealed, __SIZEOF_POINTER__ was introduced in gcc-4.3&amp;nbsp; :O &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553360#M14544</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553361#M14545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pacman on Mon Jun 16 07:31:13 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, that's why. Thank you for the information on that. :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Too bad that I can't just switch to 4.3 (gcc-4.2 is Apple-modified and integrated with distributed builds, etc.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Making things portable can be painful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yesterday I had to modify my Makefile (for LPC1788), so that it would be possible to build on a Windows platform. In short: I just had to translate slashes to backslashes. Turned out after a couple of hours, that it would build without errors, but... the startup code and the entire program was missing (I only got a warning that Reset_Handler wasn't found). [Oh, and to make matters worse, I don't have Windows myself; I have to ask a fellow to do the builds].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why you need the __SIZEOF_POINTER__, perhaps it's for va_arg somewhere ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes I typecast between pointers and integers, but after a while, I find a better solution and can clean up any typecasts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553361#M14545</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553362#M14546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Fri Jun 20 11:36:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the __SIZEOF_POINTER because to me, that's only a piece of text that happens to look like a number. That fits better to the preprocessor's text/symbol-oriented functionality. sizeof(void*) on the other hand is something the C compiler knows, not the preprocessor and it's really a number.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use __SIZEOF_POINTER at 'preprocessing time' for conditional #define .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553362#M14546</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553363#M14547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pacman on Fri Jun 20 13:58:15 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry for not being clear. &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-What I meant was the code that relies on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My guess is that you would need the pointer size, because you need to convert a pointer to an integer or an integer to a pointer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For instance, imagining that you have a uint32_t * that needs to have the value &lt;/SPAN&gt;&lt;I&gt;distance&lt;/I&gt;&lt;SPAN&gt; added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A few years ago, I would typecast it to a uint32_t and then add the value, and typecast it back to uint32_t *:&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t temp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t *p;

&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = (uint32_t) p;
&amp;nbsp;&amp;nbsp;&amp;nbsp; temp += distance;
&amp;nbsp;&amp;nbsp;&amp;nbsp; p = (uint32_t *) temp;
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...But I never do that anymore. Instead, if really necessary, I would typecast it to a uint8_t *...&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; p = (uint32_t *) &amp;amp;((uint8_t *)p)[distance];
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Ignoring any alignment problems completely in this post).&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553363#M14547</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553364#M14548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Sat Jun 21 03:41:55 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Pacman&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;-What I meant was the code that relies on it.&lt;BR /&gt;&lt;BR /&gt;My guess is that you would need the pointer size, because you need to convert a pointer to an integer or an integer to a pointer.&lt;BR /&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently I try to avoid casting between pointers and integers. Especially strict aliasing awareness changed my way of dealing with pointers. Nowadays I prefer that 'array access' style. Or else the 'pointer+index' (or ++), with index not beeing byte offset but rather an element count.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IIRC the very origin of the code was the wish to display some pointer values for debugging, which involved passing a suitable integer type to a hexadecimal output function. Casting to Uint32 wasn't suitable any more on my first 64bit machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another part is seqio.h - the abstract workhorse for my I2C drivers. There, I needed some integer type that can hold data but sometimes a pointer instead. I could/should have used a union instead, maybe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is very, very little code dependend on the pointer size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some parts of the library are rather old (6+ years) and sometimes I wonder, what that guy (me, really ??? :~ ) had been thinking at that time....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But for one thing, I stick to single byte calculation: Initialization of buffer size fields of structures. I mean, if I will ever implement a (object-oriented like) Stack of 8-byte pointers in C, then the initialization will most probably set the allocated buffer size measured in bytes, not as the total number of pointers. Just because passing 'sizeof buffer' is so handy&amp;nbsp; :) &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553364#M14548</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553365#M14549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Pacman on Sat Jun 21 10:09:39 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote:&amp;nbsp; MarcVonWindscooting&lt;/STRONG&gt;&lt;BR /&gt;I could/should have used a union instead, maybe.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I second that. I've done this myself, when I had an address-pointer in a 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;typedef struct MyStruct MyStruct;
struct MyStruct
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; union{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void *address;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t *address8;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t *address16;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t *address32;
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t length;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ... other stuff ...
};
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's been very handy, because if you have a screen address, you don't always know if the pixels are 8-bit, 16-bit or 32-bit. So setting the address, you'd just use myPointer-&amp;gt;address = 0xa0000000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But if you have a specific routine, that sets a 16-bit pixel, you'd read myPointer-&amp;gt;address16;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;There is very, very little code dependend on the pointer size.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I expected that. &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;I wonder, what that guy had been thinking at that time.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...You're not alone; when I look back on my old code, I too feel my better knowledge. &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember that you can always subtract two pointers. Pointer - Pointer = integer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also divide sizeof by sizeof...&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define ARRAY_SIZE(a) ((sizeof((a)) / sizeof((a)[0])))&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...I hope I placed the parantheses correctly. The above should give you the number of elements in an array; no matter what type of array it is; eg. an array of any kind of structure can be used as well. &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553365#M14549</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553366#M14550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Wed Jun 25 07:04:46 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Pacman&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;You can also divide sizeof by sizeof...&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define ARRAY_SIZE(a) ((sizeof((a)) / sizeof((a)[0])))&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't like macros, but this is definitely one of the few exceptions&amp;nbsp; :bigsmile: , see 'macros.h' (ELEMENTS). There's no replacement for it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I'm sloppy about the parentheses, partly because I suggest to use it on top-level arrays only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Today, I'm tempted to remove even more of the remaining #defines in that header, because inline static functions can replace most of them. In a little less generic way, though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553366#M14550</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553367#M14551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Thu Oct 16 19:59:50 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I finally made available an update of the program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It should now support LPC1500 from the internal table and the 'floating point exception'-bug fixed (caused by invalid data of some devices).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone used it on LPC1500 or any other 'unsupported' device so far? I mean: is there a human on this planet, who ever used mxli's command-line device definition feature (besides myself)??&amp;nbsp; ;-)&amp;nbsp; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553367#M14551</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553368#M14552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Thu Oct 16 23:19:16 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you mean by "caused by invalid data of some devices"? Can you give examples?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you seen this one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://http://www.lpcware.com/content/forum/lpc11u67-isp-serial"&gt;http://www.lpcware.com/content/forum/lpc11u67-isp-serial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553368#M14552</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553369#M14553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Oct 20 10:25:36 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Examples: No, I said it in a misleading way. Not the devices cause the invalid data. My table contained the invalid data!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I mean invalid data I'm responsible for. LPC17 has been my main controller for a while an right within this family I failed to update the device data correctly, after adding new features :(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems to become increasingly difficult to support all the devices because of their number and differences in protocol and speeds....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Some work fine without echo, some work fine only with echo turned on (LPC21xx IIRC). And I wished, NXP could just use \r or \n as a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;separator ALWAYS...&amp;nbsp; ;-)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marc&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:53:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553369#M14553</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553370#M14554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lollobrigido on Wed Jul 01 06:48:07 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi guy, I'm attempting to use the last mxli with a lpc1517.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[luca@localhost mxli3]$ ./mxli -c 12 -g -v sc8c.hex &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Loading images.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Image=sc8c.hex (bank) offset 0x00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Image details:segment 0: addr=0x00000000, size=0x4C80, data=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;entryPoint=0x000001B5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Executable32:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; segment: address=0x00000000, size=0x00004C80&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Writing image(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Segmentation fault (core dumped)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can help me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luca&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:54:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553370#M14554</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: mxli-3.0 released</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553371#M14555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Mon Jul 13 04:52:31 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Luca,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxli-3.0 seems to have problems with hex-images. Try plain bin instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the hex file format very rarely, that's why I don't have much testing of this part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not very happy with my hex file implementation, to be honest. That was a rush job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marc&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: I know it's time to provide an update, but I'm a very busy guy&amp;nbsp; 0:) &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:54:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/553371#M14555</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:54:01Z</dc:date>
    </item>
    <item>
      <title>Unable to use mxli</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/1300224#M45691</link>
      <description>&lt;P&gt;I am getting&amp;nbsp;&lt;/P&gt;&lt;P&gt;bash: mxli: command not found&lt;/P&gt;&lt;P&gt;please help..&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 07:41:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/mxli-3-0-released/m-p/1300224#M45691</guid>
      <dc:creator>ashinde555</dc:creator>
      <dc:date>2021-06-30T07:41:27Z</dc:date>
    </item>
  </channel>
</rss>

