From engineering at data-acquisition.com.au Wed Mar 4 20:54:20 2009 From: engineering at data-acquisition.com.au (Data Acquisition) Date: Wed Mar 4 22:01:28 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: Message-ID: Hi icc-mot, I have a question regarding c syntax that should probably be posted elsewhere but I thought someone here might know how to handle this situation. I have a structure mystruct for example: typedef struct { int x; const char *dptr; } mystruct; Using this structure I assign dptr to point to const data say strings stored in flash. I can also assign dptr to point to non-const data. I have many functions which use mystruct pointers and read the const data pointed to by dptr. How do I design a graceful (read: no ugly casting) system/structure/whatever that will allow me to assign const data to dptr yet allow me to modify non-const data through dptr. Is there a way to do this? Perhaps even using two structure definitions - one with a const pointer and one with a non-const pointer? Regards, James However I also want to -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of jpdi Sent: Thursday, 31 July 2008 5:04 PM To: 'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.' Subject: RE: [Icc-mot] ImageCraft Blog Hi, Richard, I'm very late in my development, especially under XGate. I agree with the other mails below : I NEED XGate support. Some things about editor : I don't use integrated editor, preferring TextPad, using it with other compilers I use. So it's great to be able to choose the editor I want. Anyway, I use IDE to compile and see errors, and a double-click on an error launch my editor to the line where the compiler doesn't understand. It's great for me, and it's enough. About IDE, I saw than IDE modify the .src file when opening a project file, and delete all path I wrote. ICC12 version 6 didn't that, allowing me to write absolute path or relative path for accessing the files. For me, it was better to be able to write in .scr file (with my usual editor) the absolute or relative path to the files I need in my projects, and to see compiler respecting what I wrote. Why did you change it from V6 to V7 ? Best regards. Joel Petrique > -----Message d'origine----- > De?: icc-mot-bounces@imagecraft.com [mailto:icc-mot- > bounces@imagecraft.com] De la part de Rob Milne > Envoy??: jeudi 31 juillet 2008 03:44 > ??: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Objet?: Re: [Icc-mot] ImageCraft Blog > > Hi Richard, > > I'll second that sentiment. Migrating to xgate is the logical > progression for my projects. > > -rob > > Jim Fiocca wrote: > > Richard, > > > > I spoke with my local Freescale rep about your comment > > " Now the latest S12X may not support XGate either". > > His reply was > > "Xgate is definitely sticking around. The S12X is the most popular > > automotive part we have." > > > > And regarding your comment > > "Freescale ... is effectively killing its third party vendors by giving > > away free compilers." > > The 32K limit for free CodeWarrior use makes it not very well suited for > > S12(X) users - one should probably use an S08 part if using that little > > memory. > > > > Please reconsider adding an XGate assembler to ICC12. > > > > Thanks, > > Jim > > > > > > Richard Man wrote: > >> At 07:24 AM 7/18/2008, Jim Fiocca wrote: > >>> Not sure if you were looking for feedback on what you wrote on the > >>> blog, but I guess I'll give it anyway. > >>> > >>> Speaking from a Freescale processor point of view, we all have the > >>> option to go to CodeWarrior if we want a big, bloated, full-featured > >>> IDE with integrated debugger. We (I) choose Imagecraft because it is > >>> cheaper and less complicated. I disagree with the whole premise of > >>> upgrading the IDE. I'd be happy if the product didn't have an IDE at > >>> all (I only use it from the command line, with a Makefile). > >> > >> Hi JIm, I am always looking for input. Your points are well taken, and > >> our core competence and core focus will always be the compiler > >> support. There is no worry in that regard. > >> > >> Hence the decision not to rewrite the IDE ourselves, that'd really > >> take resources away from our core competence. > >> > >>> I think you should direct your energy into the compiler itself, and > >>> adding support for such things as XGATE, for example. > >> > >> We attempted to add XGate asm support more than a year ago. It's a > >> difficult to understand piece of work, what with the convoluted HC12 > >> expanded addressing and the S12X addition etc. In the end, very few > >> people care. Now the latest S12X may not support XGate either. > >> > >> Business wise, the sad reality with Freescale is that Freescale's main > >> focus is on its automotive customers, and on the other hand, it is > >> effectively killing its third party vendors by giving away free > >> compilers. > >> > >> // richard (This email is for mailing lists. To reach me directly, > >> please use richard at imagecraft.com) > >> _______________________________________________ > >> Icc-mot mailing list > >> Icc-mot@imagecraft.com > >> http://dragonsgate.net/mailman/listinfo/icc-mot > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Icc-mot mailing list > > Icc-mot@imagecraft.com > > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From lance at rapidware.com Wed Mar 4 23:05:22 2009 From: lance at rapidware.com (Lance Smith) Date: Thu Mar 5 00:12:20 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: References: Message-ID: /* How about this: It compiles in ICC12. As far as the cast, (const char *), it lets the compiler and the reader know that you are intentionally overriding the declaration of test2 (non-const) as you declared it. That's just clean programming. */ const char test[] = "123"; // flash char test2[] = "456"; // ram typedef struct { int x; const char *dptr; } mystruct; void func(void) { mystruct my; my.x = 1; my.dptr = test; my.dptr = (const char *)test2; } -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of Data Acquisition Sent: Wednesday, March 04, 2009 11:54 PM To: 'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.' Subject: RE: [Icc-mot] ImageCraft Blog Hi icc-mot, I have a question regarding c syntax that should probably be posted elsewhere but I thought someone here might know how to handle this situation. I have a structure mystruct for example: typedef struct { int x; const char *dptr; } mystruct; Using this structure I assign dptr to point to const data say strings stored in flash. I can also assign dptr to point to non-const data. I have many functions which use mystruct pointers and read the const data pointed to by dptr. How do I design a graceful (read: no ugly casting) system/structure/whatever that will allow me to assign const data to dptr yet allow me to modify non-const data through dptr. Is there a way to do this? Perhaps even using two structure definitions - one with a const pointer and one with a non-const pointer? Regards, James However I also want to -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of jpdi Sent: Thursday, 31 July 2008 5:04 PM To: 'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.' Subject: RE: [Icc-mot] ImageCraft Blog Hi, Richard, I'm very late in my development, especially under XGate. I agree with the other mails below : I NEED XGate support. Some things about editor : I don't use integrated editor, preferring TextPad, using it with other compilers I use. So it's great to be able to choose the editor I want. Anyway, I use IDE to compile and see errors, and a double-click on an error launch my editor to the line where the compiler doesn't understand. It's great for me, and it's enough. About IDE, I saw than IDE modify the .src file when opening a project file, and delete all path I wrote. ICC12 version 6 didn't that, allowing me to write absolute path or relative path for accessing the files. For me, it was better to be able to write in .scr file (with my usual editor) the absolute or relative path to the files I need in my projects, and to see compiler respecting what I wrote. Why did you change it from V6 to V7 ? Best regards. Joel Petrique > -----Message d'origine----- > De?: icc-mot-bounces@imagecraft.com [mailto:icc-mot- > bounces@imagecraft.com] De la part de Rob Milne > Envoy??: jeudi 31 juillet 2008 03:44 > ??: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Objet?: Re: [Icc-mot] ImageCraft Blog > > Hi Richard, > > I'll second that sentiment. Migrating to xgate is the logical > progression for my projects. > > -rob > > Jim Fiocca wrote: > > Richard, > > > > I spoke with my local Freescale rep about your comment > > " Now the latest S12X may not support XGate either". > > His reply was > > "Xgate is definitely sticking around. The S12X is the most popular > > automotive part we have." > > > > And regarding your comment > > "Freescale ... is effectively killing its third party vendors by giving > > away free compilers." > > The 32K limit for free CodeWarrior use makes it not very well suited for > > S12(X) users - one should probably use an S08 part if using that little > > memory. > > > > Please reconsider adding an XGate assembler to ICC12. > > > > Thanks, > > Jim > > > > > > Richard Man wrote: > >> At 07:24 AM 7/18/2008, Jim Fiocca wrote: > >>> Not sure if you were looking for feedback on what you wrote on the > >>> blog, but I guess I'll give it anyway. > >>> > >>> Speaking from a Freescale processor point of view, we all have the > >>> option to go to CodeWarrior if we want a big, bloated, full-featured > >>> IDE with integrated debugger. We (I) choose Imagecraft because it is > >>> cheaper and less complicated. I disagree with the whole premise of > >>> upgrading the IDE. I'd be happy if the product didn't have an IDE at > >>> all (I only use it from the command line, with a Makefile). > >> > >> Hi JIm, I am always looking for input. Your points are well taken, and > >> our core competence and core focus will always be the compiler > >> support. There is no worry in that regard. > >> > >> Hence the decision not to rewrite the IDE ourselves, that'd really > >> take resources away from our core competence. > >> > >>> I think you should direct your energy into the compiler itself, and > >>> adding support for such things as XGATE, for example. > >> > >> We attempted to add XGate asm support more than a year ago. It's a > >> difficult to understand piece of work, what with the convoluted HC12 > >> expanded addressing and the S12X addition etc. In the end, very few > >> people care. Now the latest S12X may not support XGate either. > >> > >> Business wise, the sad reality with Freescale is that Freescale's main > >> focus is on its automotive customers, and on the other hand, it is > >> effectively killing its third party vendors by giving away free > >> compilers. > >> > >> // richard (This email is for mailing lists. To reach me directly, > >> please use richard at imagecraft.com) > >> _______________________________________________ > >> Icc-mot mailing list > >> Icc-mot@imagecraft.com > >> http://dragonsgate.net/mailman/listinfo/icc-mot > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Icc-mot mailing list > > Icc-mot@imagecraft.com > > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From ekarpicz at freemail.lt Wed Mar 4 23:48:51 2009 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Thu Mar 5 00:55:58 2009 Subject: [Icc-mot] ImageCraft Blog References: Message-ID: Since you want to be able to edit data pointed by dptr, I think const qualifier should be removed from dptr declaration. Assigning address of const data to dptr would require (char*) cast then. Maybe it's ugly, but it will attract your attention later. Hey, it's const data and I can't write to it. Edward ----- Original Message ----- From: "Data Acquisition" To: "'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.'" Sent: Thursday, March 05, 2009 06:54 Subject: RE: [Icc-mot] ImageCraft Blog Hi icc-mot, I have a question regarding c syntax that should probably be posted elsewhere but I thought someone here might know how to handle this situation. I have a structure mystruct for example: typedef struct { int x; const char *dptr; } mystruct; Using this structure I assign dptr to point to const data say strings stored in flash. I can also assign dptr to point to non-const data. I have many functions which use mystruct pointers and read the const data pointed to by dptr. How do I design a graceful (read: no ugly casting) system/structure/whatever that will allow me to assign const data to dptr yet allow me to modify non-const data through dptr. Is there a way to do this? Perhaps even using two structure definitions - one with a const pointer and one with a non-const pointer? Regards, James However I also want to -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of jpdi Sent: Thursday, 31 July 2008 5:04 PM To: 'Discussion List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you are a member of this.' Subject: RE: [Icc-mot] ImageCraft Blog Hi, Richard, I'm very late in my development, especially under XGate. I agree with the other mails below : I NEED XGate support. Some things about editor : I don't use integrated editor, preferring TextPad, using it with other compilers I use. So it's great to be able to choose the editor I want. Anyway, I use IDE to compile and see errors, and a double-click on an error launch my editor to the line where the compiler doesn't understand. It's great for me, and it's enough. About IDE, I saw than IDE modify the .src file when opening a project file, and delete all path I wrote. ICC12 version 6 didn't that, allowing me to write absolute path or relative path for accessing the files. For me, it was better to be able to write in .scr file (with my usual editor) the absolute or relative path to the files I need in my projects, and to see compiler respecting what I wrote. Why did you change it from V6 to V7 ? Best regards. Joel Petrique > -----Message d'origine----- > De : icc-mot-bounces@imagecraft.com [mailto:icc-mot- > bounces@imagecraft.com] De la part de Rob Milne > Envoy? : jeudi 31 juillet 2008 03:44 > ? : Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Objet : Re: [Icc-mot] ImageCraft Blog > > Hi Richard, > > I'll second that sentiment. Migrating to xgate is the logical > progression for my projects. > > -rob > > Jim Fiocca wrote: > > Richard, > > > > I spoke with my local Freescale rep about your comment > > " Now the latest S12X may not support XGate either". > > His reply was > > "Xgate is definitely sticking around. The S12X is the most popular > > automotive part we have." > > > > And regarding your comment > > "Freescale ... is effectively killing its third party vendors by giving > > away free compilers." > > The 32K limit for free CodeWarrior use makes it not very well suited for > > S12(X) users - one should probably use an S08 part if using that little > > memory. > > > > Please reconsider adding an XGate assembler to ICC12. > > > > Thanks, > > Jim > > > > > > Richard Man wrote: > >> At 07:24 AM 7/18/2008, Jim Fiocca wrote: > >>> Not sure if you were looking for feedback on what you wrote on the > >>> blog, but I guess I'll give it anyway. > >>> > >>> Speaking from a Freescale processor point of view, we all have the > >>> option to go to CodeWarrior if we want a big, bloated, full-featured > >>> IDE with integrated debugger. We (I) choose Imagecraft because it is > >>> cheaper and less complicated. I disagree with the whole premise of > >>> upgrading the IDE. I'd be happy if the product didn't have an IDE at > >>> all (I only use it from the command line, with a Makefile). > >> > >> Hi JIm, I am always looking for input. Your points are well taken, and > >> our core competence and core focus will always be the compiler > >> support. There is no worry in that regard. > >> > >> Hence the decision not to rewrite the IDE ourselves, that'd really > >> take resources away from our core competence. > >> > >>> I think you should direct your energy into the compiler itself, and > >>> adding support for such things as XGATE, for example. > >> > >> We attempted to add XGate asm support more than a year ago. It's a > >> difficult to understand piece of work, what with the convoluted HC12 > >> expanded addressing and the S12X addition etc. In the end, very few > >> people care. Now the latest S12X may not support XGate either. > >> > >> Business wise, the sad reality with Freescale is that Freescale's main > >> focus is on its automotive customers, and on the other hand, it is > >> effectively killing its third party vendors by giving away free > >> compilers. > >> > >> // richard (This email is for mailing lists. To reach me directly, > >> please use richard at imagecraft.com) > >> _______________________________________________ > >> Icc-mot mailing list > >> Icc-mot@imagecraft.com > >> http://dragonsgate.net/mailman/listinfo/icc-mot > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Icc-mot mailing list > > Icc-mot@imagecraft.com > > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From j_baraclough at zetnet.co.uk Thu Mar 5 01:30:43 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Thu Mar 5 02:37:45 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: References: Message-ID: <49AF9BC3.5020507@zetnet.co.uk> Hi James, The correct way to do this and retain all of the protection that the compiler can give you is to use a union. Since the two structures are the same size no space is wasted. typedef struct { int x; const char *dptr; } myconststruct; typedef struct { int x; char *dptr; } mydatastruct; typedef union { myconststruct; mydatastruct; } mydatablock; HTH All the best for now, John Data Acquisition wrote: > Hi icc-mot, > > I have a question regarding c syntax that should probably be posted > elsewhere but I thought someone here might know how to handle this > situation. > > I have a structure mystruct for example: > > typedef struct { > int x; > const char *dptr; > } mystruct; > > Using this structure I assign dptr to point to const data say strings stored > in flash. I can also assign dptr to point to non-const data. > > I have many functions which use mystruct pointers and read the const data > pointed to by dptr. > > How do I design a graceful (read: no ugly casting) system/structure/whatever > that will allow me to assign const data to dptr yet allow me to modify > non-const data through dptr. > > Is there a way to do this? Perhaps even using two structure definitions - > one with a const pointer and one with a non-const pointer? > > Regards, James > > From robmilne at web.net Thu Mar 5 05:52:54 2009 From: robmilne at web.net (Rob Milne) Date: Thu Mar 5 06:56:54 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: References: Message-ID: <49AFD936.3080409@web.net> One important point to remember is the scope/lifetime of what *dptr points to - you must to know the providence of non-const data, especially if it is being passed back and forth in function args/returns. You cannot safely point dptr to the stack. If it points to heap you better have your housekeeping well managed. Statics are the only safe non-const data source in simple embedded systems (idata is safe too but this is essentially the same as const). -rob Data Acquisition wrote: > Hi icc-mot, > > I have a question regarding c syntax that should probably be posted > elsewhere but I thought someone here might know how to handle this > situation. > > I have a structure mystruct for example: > > typedef struct { > int x; > const char *dptr; > } mystruct; > > Using this structure I assign dptr to point to const data say strings stored > in flash. I can also assign dptr to point to non-const data. > > I have many functions which use mystruct pointers and read the const data > pointed to by dptr. > > How do I design a graceful (read: no ugly casting) system/structure/whatever > that will allow me to assign const data to dptr yet allow me to modify > non-const data through dptr. > > Is there a way to do this? Perhaps even using two structure definitions - > one with a const pointer and one with a non-const pointer? > > Regards, James > > > > > However I also want to > -----Original Message----- > From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] > On Behalf Of jpdi > Sent: Thursday, 31 July 2008 5:04 PM > To: 'Discussion List for ICC08/11/12/16 users. You do NOT need > tosubscribetoicc-announce if you are a member of this.' > Subject: RE: [Icc-mot] ImageCraft Blog > > Hi, Richard, > > I'm very late in my development, especially under XGate. > > I agree with the other mails below : I NEED XGate support. > > Some things about editor : I don't use integrated editor, preferring > TextPad, using it with other compilers I use. > So it's great to be able to choose the editor I want. Anyway, I use IDE to > compile and see errors, and a double-click on an error launch my editor to > the line where the compiler doesn't understand. It's great for me, and it's > enough. > > About IDE, I saw than IDE modify the .src file when opening a project file, > and delete all path I wrote. > ICC12 version 6 didn't that, allowing me to write absolute path or relative > path for accessing the files. > > For me, it was better to be able to write in .scr file (with my usual > editor) the absolute or relative path to the files I need in my projects, > and to see compiler respecting what I wrote. > Why did you change it from V6 to V7 ? > > Best regards. > > Joel Petrique > > > >> -----Message d'origine----- >> De : icc-mot-bounces@imagecraft.com [mailto:icc-mot- >> bounces@imagecraft.com] De la part de Rob Milne >> Envoy? : jeudi 31 juillet 2008 03:44 >> ? : Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe >> toicc-announce if you are a member of this. >> Objet : Re: [Icc-mot] ImageCraft Blog >> >> Hi Richard, >> >> I'll second that sentiment. Migrating to xgate is the logical >> progression for my projects. >> >> -rob >> >> Jim Fiocca wrote: >> >>> Richard, >>> >>> I spoke with my local Freescale rep about your comment >>> " Now the latest S12X may not support XGate either". >>> His reply was >>> "Xgate is definitely sticking around. The S12X is the most popular >>> automotive part we have." >>> >>> And regarding your comment >>> "Freescale ... is effectively killing its third party vendors by giving >>> away free compilers." >>> The 32K limit for free CodeWarrior use makes it not very well suited for >>> S12(X) users - one should probably use an S08 part if using that little >>> memory. >>> >>> Please reconsider adding an XGate assembler to ICC12. >>> >>> Thanks, >>> Jim >>> >>> >>> Richard Man wrote: >>> >>>> At 07:24 AM 7/18/2008, Jim Fiocca wrote: >>>> >>>>> Not sure if you were looking for feedback on what you wrote on the >>>>> blog, but I guess I'll give it anyway. >>>>> >>>>> Speaking from a Freescale processor point of view, we all have the >>>>> option to go to CodeWarrior if we want a big, bloated, full-featured >>>>> IDE with integrated debugger. We (I) choose Imagecraft because it is >>>>> cheaper and less complicated. I disagree with the whole premise of >>>>> upgrading the IDE. I'd be happy if the product didn't have an IDE at >>>>> all (I only use it from the command line, with a Makefile). >>>>> >>>> Hi JIm, I am always looking for input. Your points are well taken, and >>>> our core competence and core focus will always be the compiler >>>> support. There is no worry in that regard. >>>> >>>> Hence the decision not to rewrite the IDE ourselves, that'd really >>>> take resources away from our core competence. >>>> >>>> >>>>> I think you should direct your energy into the compiler itself, and >>>>> adding support for such things as XGATE, for example. >>>>> >>>> We attempted to add XGate asm support more than a year ago. It's a >>>> difficult to understand piece of work, what with the convoluted HC12 >>>> expanded addressing and the S12X addition etc. In the end, very few >>>> people care. Now the latest S12X may not support XGate either. >>>> >>>> Business wise, the sad reality with Freescale is that Freescale's main >>>> focus is on its automotive customers, and on the other hand, it is >>>> effectively killing its third party vendors by giving away free >>>> compilers. >>>> >>>> // richard (This email is for mailing lists. To reach me directly, >>>> please use richard at imagecraft.com) >>>> _______________________________________________ >>>> Icc-mot mailing list >>>> Icc-mot@imagecraft.com >>>> http://dragonsgate.net/mailman/listinfo/icc-mot >>>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Icc-mot mailing list >>> Icc-mot@imagecraft.com >>> http://dragonsgate.net/mailman/listinfo/icc-mot >>> >> _______________________________________________ >> Icc-mot mailing list >> Icc-mot@imagecraft.com >> http://dragonsgate.net/mailman/listinfo/icc-mot >> > > > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > From lance at rapidware.com Thu Mar 5 06:57:36 2009 From: lance at rapidware.com (Lance Smith) Date: Thu Mar 5 08:04:34 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <49AF9BC3.5020507@zetnet.co.uk> References: <49AF9BC3.5020507@zetnet.co.uk> Message-ID: <58869E93A84C447EAF58236BF9FB0550@LBSD820> I agree that this is the right way, but doesn't this fail to fulfill his requirement of backward compatibility with existing code? -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of John Baraclough Sent: Thursday, March 05, 2009 4:31 AM To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe toicc-announce if you are a member of this. Subject: Re: [Icc-mot] ImageCraft Blog Hi James, The correct way to do this and retain all of the protection that the compiler can give you is to use a union. Since the two structures are the same size no space is wasted. typedef struct { int x; const char *dptr; } myconststruct; typedef struct { int x; char *dptr; } mydatastruct; typedef union { myconststruct; mydatastruct; } mydatablock; HTH All the best for now, John Data Acquisition wrote: > Hi icc-mot, > > I have a question regarding c syntax that should probably be posted > elsewhere but I thought someone here might know how to handle this > situation. > > I have a structure mystruct for example: > > typedef struct { > int x; > const char *dptr; > } mystruct; > > Using this structure I assign dptr to point to const data say strings stored > in flash. I can also assign dptr to point to non-const data. > > I have many functions which use mystruct pointers and read the const data > pointed to by dptr. > > How do I design a graceful (read: no ugly casting) system/structure/whatever > that will allow me to assign const data to dptr yet allow me to modify > non-const data through dptr. > > Is there a way to do this? Perhaps even using two structure definitions - > one with a const pointer and one with a non-const pointer? > > Regards, James > > _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From j_baraclough at zetnet.co.uk Thu Mar 5 07:09:46 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Thu Mar 5 08:16:49 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <58869E93A84C447EAF58236BF9FB0550@LBSD820> References: <49AF9BC3.5020507@zetnet.co.uk> <58869E93A84C447EAF58236BF9FB0550@LBSD820> Message-ID: <49AFEB3A.6090802@zetnet.co.uk> Hmmm, yes it does. Perhaps I didn't the original email well enough. All the best for now, John Lance Smith wrote: > I agree that this is the right way, but doesn't this fail to fulfill his > requirement of backward compatibility with existing code? > > -----Original Message----- > From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] > On Behalf Of John Baraclough > Sent: Thursday, March 05, 2009 4:31 AM > To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Subject: Re: [Icc-mot] ImageCraft Blog > > Hi James, > > The correct way to do this and retain all of the protection that the > compiler can give you is to use a union. Since the two structures are > the same size no space is wasted. > > typedef struct { > int x; > const char *dptr; > } myconststruct; > > typedef struct { > int x; > char *dptr; > } mydatastruct; > > typedef union { > myconststruct; > mydatastruct; > } mydatablock; > > > HTH > > All the best for now, > John > > > Data Acquisition wrote: > >> Hi icc-mot, >> >> I have a question regarding c syntax that should probably be posted >> elsewhere but I thought someone here might know how to handle this >> situation. >> >> I have a structure mystruct for example: >> >> typedef struct { >> int x; >> const char *dptr; >> } mystruct; >> >> Using this structure I assign dptr to point to const data say strings >> > stored > >> in flash. I can also assign dptr to point to non-const data. >> >> I have many functions which use mystruct pointers and read the const data >> pointed to by dptr. >> >> How do I design a graceful (read: no ugly casting) >> > system/structure/whatever > >> that will allow me to assign const data to dptr yet allow me to modify >> non-const data through dptr. >> >> Is there a way to do this? Perhaps even using two structure definitions - >> one with a const pointer and one with a non-const pointer? >> >> Regards, James >> >> >> > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > > From lance at rapidware.com Thu Mar 5 08:31:12 2009 From: lance at rapidware.com (Lance Smith) Date: Thu Mar 5 09:38:10 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <49AFEB3A.6090802@zetnet.co.uk> References: <49AF9BC3.5020507@zetnet.co.uk><58869E93A84C447EAF58236BF9FB0550@LBSD820> <49AFEB3A.6090802@zetnet.co.uk> Message-ID: Perhaps I'm wrong or missed something - I thought that he had a lot of existing code that uses mystruct objects. With this, wouldn't we have to add the union syntax in front of each object reference? Best -- Lance -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of John Baraclough Sent: Thursday, March 05, 2009 10:10 AM To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe toicc-announce if you are a member of this. Subject: Re: [Icc-mot] ImageCraft Blog Hmmm, yes it does. Perhaps I didn't the original email well enough. All the best for now, John Lance Smith wrote: > I agree that this is the right way, but doesn't this fail to fulfill his > requirement of backward compatibility with existing code? > > -----Original Message----- > From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] > On Behalf Of John Baraclough > Sent: Thursday, March 05, 2009 4:31 AM > To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Subject: Re: [Icc-mot] ImageCraft Blog > > Hi James, > > The correct way to do this and retain all of the protection that the > compiler can give you is to use a union. Since the two structures are > the same size no space is wasted. > > typedef struct { > int x; > const char *dptr; > } myconststruct; > > typedef struct { > int x; > char *dptr; > } mydatastruct; > > typedef union { > myconststruct; > mydatastruct; > } mydatablock; > > > HTH > > All the best for now, > John > > > Data Acquisition wrote: > >> Hi icc-mot, >> >> I have a question regarding c syntax that should probably be posted >> elsewhere but I thought someone here might know how to handle this >> situation. >> >> I have a structure mystruct for example: >> >> typedef struct { >> int x; >> const char *dptr; >> } mystruct; >> >> Using this structure I assign dptr to point to const data say strings >> > stored > >> in flash. I can also assign dptr to point to non-const data. >> >> I have many functions which use mystruct pointers and read the const data >> pointed to by dptr. >> >> How do I design a graceful (read: no ugly casting) >> > system/structure/whatever > >> that will allow me to assign const data to dptr yet allow me to modify >> non-const data through dptr. >> >> Is there a way to do this? Perhaps even using two structure definitions - >> one with a const pointer and one with a non-const pointer? >> >> Regards, James >> >> >> > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > > _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From j_baraclough at zetnet.co.uk Thu Mar 5 08:52:59 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Thu Mar 5 10:00:00 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: References: <49AF9BC3.5020507@zetnet.co.uk><58869E93A84C447EAF58236BF9FB0550@LBSD820> <49AFEB3A.6090802@zetnet.co.uk> Message-ID: <49B0036B.9060000@zetnet.co.uk> Yes that would be necessary to bring the old code up to the new level. However using a union from this point onwards would mean that all new code would work with the union and existing code could continue to operate with the old method. Old code could then be updated as it was revisited. All the best for now, John Lance Smith wrote: > Perhaps I'm wrong or missed something - I thought that he had a lot of > existing code that uses mystruct objects. With this, wouldn't we have to add > the union syntax in front of each object reference? > Best > -- Lance > > From lance at rapidware.com Thu Mar 5 09:02:43 2009 From: lance at rapidware.com (Lance Smith) Date: Thu Mar 5 10:09:41 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <49B0036B.9060000@zetnet.co.uk> References: <49AF9BC3.5020507@zetnet.co.uk><58869E93A84C447EAF58236BF9FB0550@LBSD820> <49AFEB3A.6090802@zetnet.co.uk> <49B0036B.9060000@zetnet.co.uk> Message-ID: <5A5AC1386F2D498092BB72EBBC9D2CE6@LBSD820> Yes I suppose that would be true if all of the old code operated on only const objects and I guess that this is implied. Thanks -- Lance -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of John Baraclough Sent: Thursday, March 05, 2009 11:53 AM To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe toicc-announce if you are a member of this. Subject: Re: [Icc-mot] ImageCraft Blog Yes that would be necessary to bring the old code up to the new level. However using a union from this point onwards would mean that all new code would work with the union and existing code could continue to operate with the old method. Old code could then be updated as it was revisited. All the best for now, John Lance Smith wrote: > Perhaps I'm wrong or missed something - I thought that he had a lot of > existing code that uses mystruct objects. With this, wouldn't we have to add > the union syntax in front of each object reference? > Best > -- Lance > > _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From engineering at data-acquisition.com.au Thu Mar 5 14:49:38 2009 From: engineering at data-acquisition.com.au (Data Acquisition) Date: Thu Mar 5 15:56:47 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <49AF9BC3.5020507@zetnet.co.uk> Message-ID: <54F87987ED1C4C4ABBCE06B4578D1DBB@ENG5> Thanks a million to every one that replied. Johns answer was exactly what I was looking for. Sorry to those that misunderstood me but modifying existing code will not be too much of a problem in this particular instance because like all good programmers the details are confined to a few small modules. I guess we all realize that the crux of the problem is that in an embedded system we use const to save RAM and not to say that "this object is constant". I've generally tried to avoid unions in the past because the extra layer of indirection is a pain but in this particular case it seems worth it to allow the compiler to do its proper checking. The final structure that I have used is shown below and gives you a more detail about my actual application. 95% of the time I will be accessing constant images from flash but there is one section where I have to dynamically create an image. typedef struct { unsigned char Width; unsigned char Height; ImageDepth Depth_m1:4; unsigned char PAD0:2; unsigned char Palettised:1; unsigned char Transparent:1; unsigned char PAD1:8; union { const TColour *Const; TColour *NonConst; } Palette; union { const TGraphicDataType *Const; TGraphicDataType *NonConst; } Data; } TGraphic; Regards, James Brown -----Original Message----- From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] On Behalf Of John Baraclough Sent: Thursday, 5 March 2009 7:31 PM To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe toicc-announce if you are a member of this. Subject: Re: [Icc-mot] ImageCraft Blog Hi James, The correct way to do this and retain all of the protection that the compiler can give you is to use a union. Since the two structures are the same size no space is wasted. typedef struct { int x; const char *dptr; } myconststruct; typedef struct { int x; char *dptr; } mydatastruct; typedef union { myconststruct; mydatastruct; } mydatablock; HTH All the best for now, John Data Acquisition wrote: > Hi icc-mot, > > I have a question regarding c syntax that should probably be posted > elsewhere but I thought someone here might know how to handle this > situation. > > I have a structure mystruct for example: > > typedef struct { > int x; > const char *dptr; > } mystruct; > > Using this structure I assign dptr to point to const data say strings stored > in flash. I can also assign dptr to point to non-const data. > > I have many functions which use mystruct pointers and read the const data > pointed to by dptr. > > How do I design a graceful (read: no ugly casting) system/structure/whatever > that will allow me to assign const data to dptr yet allow me to modify > non-const data through dptr. > > Is there a way to do this? Perhaps even using two structure definitions - > one with a const pointer and one with a non-const pointer? > > Regards, James > > _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From j_baraclough at zetnet.co.uk Thu Mar 5 15:05:59 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Thu Mar 5 16:13:02 2009 Subject: [Icc-mot] ImageCraft Blog In-Reply-To: <54F87987ED1C4C4ABBCE06B4578D1DBB@ENG5> References: <54F87987ED1C4C4ABBCE06B4578D1DBB@ENG5> Message-ID: <49B05AD7.5080603@zetnet.co.uk> Good to see that you've sorted it out. That's the longest discussion I've seen on this list for a very long time! It's usually the AVR list where most of that happens. I hope we see some more here soon. All the best for now, John Data Acquisition wrote: > Thanks a million to every one that replied. Johns answer was exactly what I > was looking for. Sorry to those that misunderstood me but modifying > existing code will not be too much of a problem in this particular instance > because like all good programmers the details are confined to a few small > modules. > > I guess we all realize that the crux of the problem is that in an embedded > system we use const to save RAM and not to say that "this object is > constant". I've generally tried to avoid unions in the past because the > extra layer of indirection is a pain but in this particular case it seems > worth it to allow the compiler to do its proper checking. > > The final structure that I have used is shown below and gives you a more > detail about my actual application. 95% of the time I will be accessing > constant images from flash but there is one section where I have to > dynamically create an image. > > typedef struct { > unsigned char Width; > unsigned char Height; > ImageDepth Depth_m1:4; > unsigned char PAD0:2; > unsigned char Palettised:1; > unsigned char Transparent:1; > unsigned char PAD1:8; > union { > const TColour *Const; > TColour *NonConst; > } Palette; > union { > const TGraphicDataType *Const; > TGraphicDataType *NonConst; > } Data; > } TGraphic; > > Regards, James Brown > > > > > -----Original Message----- > From: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] > On Behalf Of John Baraclough > Sent: Thursday, 5 March 2009 7:31 PM > To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe > toicc-announce if you are a member of this. > Subject: Re: [Icc-mot] ImageCraft Blog > > Hi James, > > The correct way to do this and retain all of the protection that the > compiler can give you is to use a union. Since the two structures are > the same size no space is wasted. > > typedef struct { > int x; > const char *dptr; > } myconststruct; > > typedef struct { > int x; > char *dptr; > } mydatastruct; > > typedef union { > myconststruct; > mydatastruct; > } mydatablock; > > > HTH > > All the best for now, > John > > > Data Acquisition wrote: > >> Hi icc-mot, >> >> I have a question regarding c syntax that should probably be posted >> elsewhere but I thought someone here might know how to handle this >> situation. >> >> I have a structure mystruct for example: >> >> typedef struct { >> int x; >> const char *dptr; >> } mystruct; >> >> Using this structure I assign dptr to point to const data say strings >> > stored > >> in flash. I can also assign dptr to point to non-const data. >> >> I have many functions which use mystruct pointers and read the const data >> pointed to by dptr. >> >> How do I design a graceful (read: no ugly casting) >> > system/structure/whatever > >> that will allow me to assign const data to dptr yet allow me to modify >> non-const data through dptr. >> >> Is there a way to do this? Perhaps even using two structure definitions - >> one with a const pointer and one with a non-const pointer? >> >> Regards, James >> >> >> > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > > > From j_baraclough at zetnet.co.uk Tue Mar 10 10:34:08 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Tue Mar 10 11:41:17 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps Message-ID: <49B6B2A0.4080008@zetnet.co.uk> Hi All, This is a bit of a stab in the dark, but I hope that one of you guys can solve my problem. Last year I built a DMX controlled flicker box to drive a stage fire effect. It works well but I am now trying to incorporate a 6N137 opto-isolator between the RS485 receiver and the AVR mega8 to try and remove an occasional ground loop problem. I have tried several circuits from a variety DMX websites but can't get anything to work. I do have an isolated 5V supply for the RX485 receiver and input side of the 6N137, so it's not that. Any hints would be welcome. All the best for now, John From jeff at atsi-tester.com Tue Mar 10 10:49:43 2009 From: jeff at atsi-tester.com (Jeff McKnight) Date: Tue Mar 10 11:56:54 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps In-Reply-To: <49B6B2A0.4080008@zetnet.co.uk> References: <49B6B2A0.4080008@zetnet.co.uk> Message-ID: <49B6B647.2080104@atsi-tester.com> Can you give some more details. Have you tried looking at the signals with a scope ? On the logic side, do you have pin 7 pulled high ? Also, the output pin 6 is open collector. Do you have a pull-up resistor on this pin ? Jeff John Baraclough wrote: > Hi All, > > This is a bit of a stab in the dark, but I hope that one of you guys > can solve my problem. Last year I built a DMX controlled flicker box > to drive a stage fire effect. It works well but I am now trying to > incorporate a 6N137 opto-isolator between the RS485 receiver and the > AVR mega8 to try and remove an occasional ground loop problem. I have > tried several circuits from a variety DMX websites but can't get > anything to work. I do have an isolated 5V supply for the RX485 > receiver and input side of the 6N137, so it's not that. > > Any hints would be welcome. > > All the best for now, > John > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > From j_baraclough at zetnet.co.uk Tue Mar 10 11:21:01 2009 From: j_baraclough at zetnet.co.uk (John Baraclough) Date: Tue Mar 10 12:28:08 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps In-Reply-To: <49B6B647.2080104@atsi-tester.com> References: <49B6B2A0.4080008@zetnet.co.uk> <49B6B647.2080104@atsi-tester.com> Message-ID: <49B6BD9D.1040407@zetnet.co.uk> Hi Jeff, Sorry, as I'm retired I no longer have access to a scope. I left pin 7 floating as the spec implied that was OK. I'll try adding a pull-up to it. I have uploaded the relevant section of the schematic and you can find it here: http://img.villagephotos.com/p/2006-5/1185528/DmxReceiver.jpg All the best for now, John Jeff McKnight wrote: > Can you give some more details. Have you tried looking at the signals > with a scope ? > On the logic side, do you have pin 7 pulled high ? Also, the output > pin 6 is open collector. Do you have a pull-up resistor on this pin ? > Jeff > > > From jeff at atsi-tester.com Tue Mar 10 11:42:05 2009 From: jeff at atsi-tester.com (Jeff McKnight) Date: Tue Mar 10 12:49:11 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps In-Reply-To: <49B6BD9D.1040407@zetnet.co.uk> References: <49B6B2A0.4080008@zetnet.co.uk> <49B6B647.2080104@atsi-tester.com> <49B6BD9D.1040407@zetnet.co.uk> Message-ID: <49B6C28D.8070509@atsi-tester.com> I went back and looked at the data sheet again - and I guess it does seem to say that you can leave pin 7 floating, although I always pull it high. I have used the circuit nearly identical to yours many times and it works. The only difference is that I always pull pin 7 high. Jeff John Baraclough wrote: > Hi Jeff, > > Sorry, as I'm retired I no longer have access to a scope. I left pin 7 > floating as the spec implied that was OK. I'll try adding a pull-up to > it. I have uploaded the relevant section of the schematic and you can > find it here: > > http://img.villagephotos.com/p/2006-5/1185528/DmxReceiver.jpg > > > All the best for now, > John > > > Jeff McKnight wrote: >> Can you give some more details. Have you tried looking at the >> signals with a scope ? >> On the logic side, do you have pin 7 pulled high ? Also, the output >> pin 6 is open collector. Do you have a pull-up resistor on this pin ? >> Jeff >> >> >> > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > From jpdi at free.fr Wed Mar 11 00:15:55 2009 From: jpdi at free.fr (jpdi) Date: Wed Mar 11 01:23:05 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps In-Reply-To: <49B6B2A0.4080008@zetnet.co.uk> Message-ID: <20090311081551.F18BB4C8153@smtp4-g21.free.fr> Hi all, 1?) Looking the data sheet of 6N137, it appears you can leave pin 7 "enable" open or connected to +5V, both are OK. 2?) Transfert rate seems to be good (10 MBauds) 3?) Looking on your picture the value of the resistor in the collector, 10 K seems to me very very high : if you want speed, you have to use value as 470 ohms, or less. Data sheet tells maximum output current is 50 mA, so, the minimum value of this resistor is 100 ohms. I hope this will solve your problem. All the best for you Joel Petrique -----Message d'origine----- De?: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] De la part de John Baraclough Envoy??: mardi 10 mars 2009 19:34 ??: Discussion list for ICCAVR and ICCtiny Users. You do NOT need tosubscribe to icc-announce if you are a member of this.; Discussion List for ICC08/11/12/16 users. You do NOT need to subscribeto icc-announce if you are a member of this.; icc-430@imagecraft.com Objet?: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps Hi All, This is a bit of a stab in the dark, but I hope that one of you guys can solve my problem. Last year I built a DMX controlled flicker box to drive a stage fire effect. It works well but I am now trying to incorporate a 6N137 opto-isolator between the RS485 receiver and the AVR mega8 to try and remove an occasional ground loop problem. I have tried several circuits from a variety DMX websites but can't get anything to work. I do have an isolated 5V supply for the RX485 receiver and input side of the 6N137, so it's not that. Any hints would be welcome. All the best for now, John _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From bobsmith5 at verizon.net Wed Mar 11 08:59:55 2009 From: bobsmith5 at verizon.net (Bob Smith) Date: Wed Mar 11 10:07:08 2009 Subject: [Icc-mot] OT: Opto-isolation of RS485 signals at 250kbps References: <49B6B2A0.4080008@zetnet.co.uk> Message-ID: <5F4AB280FB0D4944BCFF2BB0C69618B2@apollo> Hi John, I've used optos in dozen's of applications. "can't get anything to work" doesn't really tell me very much. I will be pleased to look at your problem, just get me some information to get my teeth into. Please include a full schematic and interface details. Bob Smith, John Baraclough wrote: > Hi All, > > This is a bit of a stab in the dark, but I hope that one of you guys > can solve my problem. Last year I built a DMX controlled flicker box > to drive a stage fire effect. It works well but I am now trying to > incorporate a 6N137 opto-isolator between the RS485 receiver and the > AVR mega8 to try and remove an occasional ground loop problem. I have > tried several circuits from a variety DMX websites but can't get > anything to work. I do have an isolated 5V supply for the RX485 > receiver and input side of the 6N137, so it's not that. > Any hints would be welcome. > > All the best for now, > John > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot From richard at imagecraft.com Wed Mar 11 13:57:26 2009 From: richard at imagecraft.com (Richard Man) Date: Thu Mar 12 02:04:09 2009 Subject: [Icc-mot] Competing with "Free" Software Message-ID: <200903121004.n2CA47DF053163@mail.imagecraft.com> I just wrote a blog entry of the subject, and I welcome any comments you may have. http://imagecraft.wordpress.com/2009/03/12/competing-with-free-software/ // richard From robmilne at web.net Thu Mar 12 06:44:15 2009 From: robmilne at web.net (Rob Milne) Date: Thu Mar 12 06:51:16 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog In-Reply-To: <200807312333.m6VNXYHf020265@mail.imagecraft.com> References: <200807180836.m6I8aULF040499@mail.imagecraft.com> <4880A7B3.8020409@fiocca.net> <200807182200.m6IM0dlD053616@mail.imagecraft.com> <4890DF1D.3030904@fiocca.net> <489118F5.9040106@web.net> <200807312333.m6VNXYHf020265@mail.imagecraft.com> Message-ID: <49B91FBF.9000100@web.net> Hi Richard, Just checking in wrt xgate asm. I honestly do not want to succumb to CW but I need to migrate to this chip. I will definitely spend the time to assist testing. -rob Richard Man wrote: > Thank you for all of you folks' suggestions. The main issue with the > XGate asm was that we did not have the right resource to support it so > the implementation was flawed. I will revisit the issues and see how > best we can proceed forward. > > > At 06:44 PM 7/30/2008, Rob Milne wrote: >> Hi Richard, >> >> I'll second that sentiment. Migrating to xgate is the logical >> progression for my projects. >> >> -rob >> >> Jim Fiocca wrote: >>> Richard, >>> I spoke with my local Freescale rep about your comment >>> " Now the latest S12X may not support XGate either". >>> His reply was >>> "Xgate is definitely sticking around. The S12X is the most popular >>> automotive part we have." >>> And regarding your comment >>> "Freescale ... is effectively killing its third party vendors by >>> giving away free compilers." >>> The 32K limit for free CodeWarrior use makes it not very well suited >>> for S12(X) users - one should probably use an S08 part if using that >>> little memory. >>> Please reconsider adding an XGate assembler to ICC12. >>> Thanks, >>> Jim >>> >>> Richard Man wrote: >>>> At 07:24 AM 7/18/2008, Jim Fiocca wrote: >>>>> Not sure if you were looking for feedback on what you wrote on the >>>>> blog, but I guess I'll give it anyway. >>>>> >>>>> Speaking from a Freescale processor point of view, we all have the >>>>> option to go to CodeWarrior if we want a big, bloated, >>>>> full-featured IDE with integrated debugger. We (I) choose >>>>> Imagecraft because it is cheaper and less complicated. I disagree >>>>> with the whole premise of upgrading the IDE. I'd be happy if the >>>>> product didn't have an IDE at all (I only use it from the command >>>>> line, with a Makefile). >>>> >>>> Hi JIm, I am always looking for input. Your points are well taken, >>>> and our core competence and core focus will always be the compiler >>>> support. There is no worry in that regard. >>>> >>>> Hence the decision not to rewrite the IDE ourselves, that'd really >>>> take resources away from our core competence. >>>> >>>>> I think you should direct your energy into the compiler itself, >>>>> and adding support for such things as XGATE, for example. >>>> >>>> We attempted to add XGate asm support more than a year ago. It's a >>>> difficult to understand piece of work, what with the convoluted >>>> HC12 expanded addressing and the S12X addition etc. In the end, >>>> very few people care. Now the latest S12X may not support XGate >>>> either. >>>> >>>> Business wise, the sad reality with Freescale is that Freescale's >>>> main focus is on its automotive customers, and on the other hand, >>>> it is effectively killing its third party vendors by giving away >>>> free compilers. > > // richard (This email is for mailing lists. To reach me directly, > please use richard at imagecraft.com) > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > From richard-lists at imagecraft.com Thu Mar 12 00:01:36 2009 From: richard-lists at imagecraft.com (Richard Man) Date: Thu Mar 12 12:08:22 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog In-Reply-To: <49B91FBF.9000100@web.net> References: <200807180836.m6I8aULF040499@mail.imagecraft.com> <4880A7B3.8020409@fiocca.net> <200807182200.m6IM0dlD053616@mail.imagecraft.com> <4890DF1D.3030904@fiocca.net> <489118F5.9040106@web.net> <200807312333.m6VNXYHf020265@mail.imagecraft.com> <49B91FBF.9000100@web.net> Message-ID: <200903122008.n2CK8Kvt062849@mail.imagecraft.com> Rob, one decision I made was that we cannot compete effectively with too many "hot products" and clearly the CPU12 market is dwindling. So the question becomes how do we support our current customers. In some cases, we scaled down what we planned to do, e.g. for the MSP430, we just released a beta version that supports the 430X's ability to reach over 64K for CALLs and JUMPs. This is about all we will support for the 430X. We will add support for other trivial instructions like PUSHM etc. This should be sufficient for most user's needs. For the CPU12/X, we will support the XGate assembler. As you may know, we have a customer who did heroics to get an CPU12/Xgate program running by using Xgate "macros," and as you may know, we actually did implement a XGate assembler. It was just robust enough for real use. There are some source code merging issues that we were facing (basically, while the mainline asm remained mostly unchanged, one person did the 430X support, and another one did the XGate, and the resulting merge a long while to sort out...). So in fact, the release of the 430X means that now we have a sane merged assembler. I will be looking at the XGate asm issue soon. It was mostly working, so I don't it to take long. Stay tuned. At 06:44 AM 3/12/2009, Rob Milne wrote: >Hi Richard, > >Just checking in wrt xgate asm. I honestly do not want to succumb >to CW but I need to migrate to this chip. I will definitely spend >the time to assist testing. > >-rob > >Richard Man wrote: >>Thank you for all of you folks' suggestions. The main issue with >>the XGate asm was that we did not have the right resource to >>support it so the implementation was flawed. I will revisit the >>issues and see how best we can proceed forward. >> >> >>At 06:44 PM 7/30/2008, Rob Milne wrote: >>>Hi Richard, >>> >>>I'll second that sentiment. Migrating to xgate is the logical >>>progression for my projects. // richard From robmilne at web.net Thu Mar 12 12:16:03 2009 From: robmilne at web.net (Rob Milne) Date: Thu Mar 12 12:23:03 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog In-Reply-To: <200903122008.n2CK8Kvt062849@mail.imagecraft.com> References: <200807180836.m6I8aULF040499@mail.imagecraft.com> <4880A7B3.8020409@fiocca.net> <200807182200.m6IM0dlD053616@mail.imagecraft.com> <4890DF1D.3030904@fiocca.net> <489118F5.9040106@web.net> <200807312333.m6VNXYHf020265@mail.imagecraft.com> <49B91FBF.9000100@web.net> <200903122008.n2CK8Kvt062849@mail.imagecraft.com> Message-ID: <49B96D83.4080700@web.net> Hi Richard, I'd like to think that a pro CPU12 version with xgate asm support will reignite interest for the product. As a previous post stated, the chip is popular in industry (though perhaps not so much amongst hobbyists) and for my own application there is no comparable replacement. -rob Richard Man wrote: > Rob, one decision I made was that we cannot compete effectively with > too many "hot products" and clearly the CPU12 market is dwindling. So > the question becomes how do we support our current customers. In some > cases, we scaled down what we planned to do, e.g. for the MSP430, we > just released a beta version that supports the 430X's ability to reach > over 64K for CALLs and JUMPs. This is about all we will support for > the 430X. We will add support for other trivial instructions like > PUSHM etc. This should be sufficient for most user's needs. > > For the CPU12/X, we will support the XGate assembler. As you may know, > we have a customer who did heroics to get an CPU12/Xgate program > running by using Xgate "macros," and as you may know, we actually did > implement a XGate assembler. It was just robust enough for real use. > There are some source code merging issues that we were facing > (basically, while the mainline asm remained mostly unchanged, one > person did the 430X support, and another one did the XGate, and the > resulting merge a long while to sort out...). So in fact, the release > of the 430X means that now we have a sane merged assembler. > > I will be looking at the XGate asm issue soon. It was mostly working, > so I don't it to take long. Stay tuned. > > > At 06:44 AM 3/12/2009, Rob Milne wrote: >> Hi Richard, >> >> Just checking in wrt xgate asm. I honestly do not want to succumb to >> CW but I need to migrate to this chip. I will definitely spend the >> time to assist testing. >> >> -rob >> >> Richard Man wrote: >>> Thank you for all of you folks' suggestions. The main issue with the >>> XGate asm was that we did not have the right resource to support it >>> so the implementation was flawed. I will revisit the issues and see >>> how best we can proceed forward. >>> >>> >>> At 06:44 PM 7/30/2008, Rob Milne wrote: >>>> Hi Richard, >>>> >>>> I'll second that sentiment. Migrating to xgate is the logical >>>> progression for my projects. > > // richard > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > From dieseinfo at free.fr Thu Mar 12 23:19:33 2009 From: dieseinfo at free.fr (Diese-Info) Date: Fri Mar 13 00:26:43 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog In-Reply-To: <49B96D83.4080700@web.net> Message-ID: <20090313071927.4945FD4814D@smtp5-g21.free.fr> Hi, Richard, Happy to know next issue for XGate asm ! As Rob, I can't work without XGate. All the best for you ! Joel Petrique -----Message d'origine----- De?: icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] De la part de Rob Milne Envoy??: jeudi 12 mars 2009 21:16 ??: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe toicc-announce if you are a member of this. Objet?: Re: XGATE, was: Re: [Icc-mot] ImageCraft Blog Hi Richard, I'd like to think that a pro CPU12 version with xgate asm support will reignite interest for the product. As a previous post stated, the chip is popular in industry (though perhaps not so much amongst hobbyists) and for my own application there is no comparable replacement. -rob Richard Man wrote: > Rob, one decision I made was that we cannot compete effectively with > too many "hot products" and clearly the CPU12 market is dwindling. So > the question becomes how do we support our current customers. In some > cases, we scaled down what we planned to do, e.g. for the MSP430, we > just released a beta version that supports the 430X's ability to reach > over 64K for CALLs and JUMPs. This is about all we will support for > the 430X. We will add support for other trivial instructions like > PUSHM etc. This should be sufficient for most user's needs. > > For the CPU12/X, we will support the XGate assembler. As you may know, > we have a customer who did heroics to get an CPU12/Xgate program > running by using Xgate "macros," and as you may know, we actually did > implement a XGate assembler. It was just robust enough for real use. > There are some source code merging issues that we were facing > (basically, while the mainline asm remained mostly unchanged, one > person did the 430X support, and another one did the XGate, and the > resulting merge a long while to sort out...). So in fact, the release > of the 430X means that now we have a sane merged assembler. > > I will be looking at the XGate asm issue soon. It was mostly working, > so I don't it to take long. Stay tuned. > > > At 06:44 AM 3/12/2009, Rob Milne wrote: >> Hi Richard, >> >> Just checking in wrt xgate asm. I honestly do not want to succumb to >> CW but I need to migrate to this chip. I will definitely spend the >> time to assist testing. >> >> -rob >> >> Richard Man wrote: >>> Thank you for all of you folks' suggestions. The main issue with the >>> XGate asm was that we did not have the right resource to support it >>> so the implementation was flawed. I will revisit the issues and see >>> how best we can proceed forward. >>> >>> >>> At 06:44 PM 7/30/2008, Rob Milne wrote: >>>> Hi Richard, >>>> >>>> I'll second that sentiment. Migrating to xgate is the logical >>>> progression for my projects. > > // richard > > _______________________________________________ > Icc-mot mailing list > Icc-mot@imagecraft.com > http://dragonsgate.net/mailman/listinfo/icc-mot > _______________________________________________ Icc-mot mailing list Icc-mot@imagecraft.com http://dragonsgate.net/mailman/listinfo/icc-mot From werner.e at terra.com.br Fri Mar 13 03:34:30 2009 From: werner.e at terra.com.br (Werner Einhardt) Date: Fri Mar 13 04:48:15 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog In-Reply-To: <20090313071927.4945FD4814D@smtp5-g21.free.fr> References: <49B96D83.4080700@web.net> <20090313071927.4945FD4814D@smtp5-g21.free.fr> Message-ID: <20090313114102.B5ADA680000C1@tisdale.hst.terra.com.br> >As Rob, I can't work without XGate. Me too! Werner. At 04:19 13/03/09, you wrote: >Hi, Richard, > >Happy to know next issue for XGate asm ! >As Rob, I can't work without XGate. > >All the best for you ! > >Joel Petrique > > >-----Message d'origine----- >De : icc-mot-bounces@imagecraft.com [mailto:icc-mot-bounces@imagecraft.com] >De la part de Rob Milne >Envoy? : jeudi 12 mars 2009 21:16 >? : Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe >toicc-announce if you are a member of this. >Objet : Re: XGATE, was: Re: [Icc-mot] ImageCraft Blog > >Hi Richard, > >I'd like to think that a pro CPU12 version with xgate asm support will >reignite interest for the product. As a previous post stated, the chip >is popular in industry (though perhaps not so much amongst hobbyists) >and for my own application there is no comparable replacement. > >-rob > >Richard Man wrote: > > Rob, one decision I made was that we cannot compete effectively with > > too many "hot products" and clearly the CPU12 market is dwindling. So > > the question becomes how do we support our current customers. In some > > cases, we scaled down what we planned to do, e.g. for the MSP430, we > > just released a beta version that supports the 430X's ability to reach > > over 64K for CALLs and JUMPs. This is about all we will support for > > the 430X. We will add support for other trivial instructions like > > PUSHM etc. This should be sufficient for most user's needs. > > > > For the CPU12/X, we will support the XGate assembler. As you may know, > > we have a customer who did heroics to get an CPU12/Xgate program > > running by using Xgate "macros," and as you may know, we actually did > > implement a XGate assembler. It was just robust enough for real use. > > There are some source code merging issues that we were facing > > (basically, while the mainline asm remained mostly unchanged, one > > person did the 430X support, and another one did the XGate, and the > > resulting merge a long while to sort out...). So in fact, the release > > of the 430X means that now we have a sane merged assembler. > > > > I will be looking at the XGate asm issue soon. It was mostly working, > > so I don't it to take long. Stay tuned. > > > > > > At 06:44 AM 3/12/2009, Rob Milne wrote: > >> Hi Richard, > >> > >> Just checking in wrt xgate asm. I honestly do not want to succumb to > >> CW but I need to migrate to this chip. I will definitely spend the > >> time to assist testing. > >> > >> -rob > >> > >> Richard Man wrote: > >>> Thank you for all of you folks' suggestions. The main issue with the > >>> XGate asm was that we did not have the right resource to support it > >>> so the implementation was flawed. I will revisit the issues and see > >>> how best we can proceed forward. > >>> > >>> > >>> At 06:44 PM 7/30/2008, Rob Milne wrote: > >>>> Hi Richard, > >>>> > >>>> I'll second that sentiment. Migrating to xgate is the logical > >>>> progression for my projects. > > > > // richard > > > > _______________________________________________ > > Icc-mot mailing list > > Icc-mot@imagecraft.com > > http://dragonsgate.net/mailman/listinfo/icc-mot > > >_______________________________________________ >Icc-mot mailing list >Icc-mot@imagecraft.com >http://dragonsgate.net/mailman/listinfo/icc-mot > > > >_______________________________________________ >Icc-mot mailing list >Icc-mot@imagecraft.com >http://dragonsgate.net/mailman/listinfo/icc-mot > > > >-- >No virus found in this incoming message. >Checked by AVG. >Version: 7.5.557 / Virus Database: >270.11.10/1996 - Release Date: 3/11/aaaa 20:42 > > > > >-- >No virus found in this incoming message. >Checked by AVG. >Version: 7.5.557 / Virus Database: >270.11.10/1996 - Release Date: 11/03/09 20:42 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://dragonsgate.net/pipermail/icc-mot/attachments/20090313/17125e21/attachment.html From ekarpicz at freemail.lt Fri Mar 13 08:36:00 2009 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Fri Mar 13 09:43:27 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog References: <200807180836.m6I8aULF040499@mail.imagecraft.com> <4880A7B3.8020409@fiocca.net> <200807182200.m6IM0dlD053616@mail.imagecraft.com> <4890DF1D.3030904@fiocca.net><489118F5.9040106@web.net><200807312333.m6VNXYHf020265@mail.imagecraft.com> <49B91FBF.9000100@web.net> Message-ID: <4E5E8CF5B2464F7AA8D0902CE3EE4F29@REKS> >>> Jim Fiocca wrote: >>>> Richard, >>>> I spoke with my local Freescale rep about your comment >>>> " Now the latest S12X may not support XGate either". >>>> His reply was >>>> "Xgate is definitely sticking around. The S12X is the most popular >>>> automotive part we have." Interesting CW TN found on Freescale forums: http://forums.freescale.com/freescale/attachments/freescale/CW816COMM/5243/1/TN243.PDF Looks like Freescale put XGATE and S08 into single chip. Who knows, maybe these custom parts will go one day to mass production. Edward >>>> And regarding your comment >>>> "Freescale ... is effectively killing its third party vendors by >>>> giving away free compilers." >>>> The 32K limit for free CodeWarrior use makes it not very well suited >>>> for S12(X) users - one should probably use an S08 part if using that >>>> little memory. >>>> Please reconsider adding an XGate assembler to ICC12. >>>> Thanks, >>>> Jim From ekarpicz at freemail.lt Fri Mar 13 08:44:17 2009 From: ekarpicz at freemail.lt (Edward Karpicz) Date: Fri Mar 13 09:51:29 2009 Subject: XGATE, was: Re: [Icc-mot] ImageCraft Blog References: <200807180836.m6I8aULF040499@mail.imagecraft.com><4880A7B3.8020409@fiocca.net><200807182200.m6IM0dlD053616@mail.imagecraft.com><4890DF1D.3030904@fiocca.net> <489118F5.9040106@web.net><200807312333.m6VNXYHf020265@mail.imagecraft.com><49B91FBF.9000100@web.net> <200903122008.n2CK8Kvt062849@mail.imagecraft.com> Message-ID: <758D7213188046199E3556C13AA391A6@REKS> Hi Richard, > > For the CPU12/X, we will support the XGate assembler. As you may know, we > have a customer who did heroics to get an CPU12/Xgate program running by > using Xgate "macros," and as you may know, we actually did implement a > XGate assembler. It was just robust enough for real use. There are some > source code merging issues that we were facing (basically, while the > mainline asm remained mostly unchanged, one person did the 430X support, > and another one did the XGate, and the resulting merge a long while to > sort out...). So in fact, the release of the 430X means that now we have a > sane merged assembler. > Could you clarify please, what assembler you implemented was robust enough? Xgate assembler or 430X assmebler? Last time I tried some beta ias6812.exe, it was producing not linkable *.o files. Was it fixed? Thanks Edward From richard at imagecraft.com Sun Mar 22 07:58:10 2009 From: richard at imagecraft.com (Richard Man) Date: Sun Mar 22 20:05:24 2009 Subject: [Icc-mot] RIP: Everett Greene, ICC Consultant Message-ID: <200903230405.n2N45MuX038093@mail.imagecraft.com> It's with a heavy heart that I am reporting the passing of a friend and a consultant to ImageCraft. Besides being a personal friend, Everett wrote all the command line simulators for the ImageCraft products, allowing fast testing of the compilers and he wrote all products' low level floating point libraries except for ARM and the Propeller. He will be missed. If you wish to send his family (addressing Ms. Greene is fine) a card, you can send it to me and I will forward it to the family. Richard Man ImageCraft 706 Colorado Ave Palo Alto, CA 94303 // richard blog: On-line orders, support, and listservers available on web site. [ For technical support on ImageCraft products, please include all previous replies in your msgs. ]