This is a cryptographically signed message in MIME format. --===============6687931727178098== Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms040609070408020904090706" This is a cryptographically signed message in MIME format. --------------ms040609070408020904090706 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit subject=Re:[OT:] I say it is spinach and to hell with it! source= http://www.piclist.com/piclist/2005/08/15/202822a.txt? --- Rich Painter http://www.piclist.com/member/RP-PEI-VC8 PIC/PICList FAQ: http://www.piclist.com I'm new to piclist so try not to pounce on me too hard... An associate of mine advised me to join and in particular suggested I read this thread. So, here I am. I have been programming since 1974, first with FORTRAN for several years, then assemblers off and on for 6 years while doing more FORTRAN and then C. I have been writing C almost exclusively since 1981. Most, if not all, on much larger systems than PICs, the current discussion topic. I don't do C++ or Java and likely never will. I believe that a good C programmer using a good C compiler will outperform in both overall code performance and especially development schedule any assembler. There are a good number of studies that show this and I personally have experienced it a lot. I have all the docs, k&r from day 1, k&r 2nd ed., the ansi and iso specs and the latest "c99" stuff and use them all. Yes, C has changed over time. Some of you say not for the best and others are more or less content. I think a lot of good things have come about in the newer versions and I use what works best and is best for the application. I have worked with many version on many platforms. The core of C is the language spec and this I've seen to be highly adhered to by nearly all the vendors I've used. But what most programmers need are the "supporting" features embodied in all the libraries. Here is where the "interface" to the OS, or bare hardware as in PICs, happens and also many of the differences, major or minor, between vendors and platforms occur. This is how it should be. So, when one moves from one platform or vendor to another one will see differences. My first PIC project has been underway for many months. I selected the Microchip dsPIC 6012. Since I am pretty good at C and there was a C compiler available I decided to try it. I have, since almost from its inception, used the GNU gcc C compiler. It has a good history, strong support, good code and widely available on platforms. Learning that Microchip based their dsPIC C on this compiler offered me some faith and comfort. I have had some problems with Microchip's "system": IDE, ICD2 and C30. Details aside, most are integration issues. I have reported (almost) every one of the things I found "hinky", some were C issues. Because of architecture, just as all of you have already debated here, there are differences that *may* be badly implemented, faulty or simply annoy us. I have needed and used the long long data type and have had problems. Their implementation may not be too good. We have not routed the cause yet. On their behalf I will say that this area has not been optimized like other parts of their floating point and other math functions. Their developers have also been working with me to resolve the issues I have encountered and I thank them for their efforts. One departure I think is not right is the notion that data type "double" is not really double. In fact, even if one uses "double" it will not be a double but rather a float unless a special compiler flag is used. This also affects the sprintf() conversion types because they don't promote the floats to double when using as args to sprintf() and its cousins. This you and I have a bitch about. This I have not yet raised with them, but I will. There "C coded device" library, including source is very weak. I have not used it. I use interrupt-driven interfaces and none of their "samples" do this. I also don't like their departure from using standard "composite ORed single-bit masks". They use "ANDed multi-bit masks" that were so hard to get used to and couldn't be used for bit testing I completely abandoned their include files and use my own. Masks based on single bits can be used for both setting and detecting a given bit's functions in hardware. NOT so with these bizarre multi-bit masks. In fact I have never seen this done before in the 24 years I have been developing C! Your conjecture that "C30" means it is a C variant I say is completely false (excepting the double-float issue). I think it is a name given to indicate it is for the dsPIC line only, differentiating it from their other non-gcc-based C compiler. If you read their C30 User's Guide (51284d) you will see the standards compliance section where they spell out any differences. This is admirable and in line with what gcc does. Do the other vendors do this? I don't know. Even so, on the whole C30 is a good compiler. The code generated for most "normal" stuff is good. Their weak side is the floating and long long types. I currently have about 5000 lines of C (and comments and includes) for my chip code and use just a small amount of floats and a few long long. I have not used any other PIC C compiler so I don't know how others compare to the dsPIC and C30. You can bash C30 all you want but you will only get smidgen of concurrence from me. I suspect any of the other C vendors for PICs will have some warts too. I will continue to use C, Microchip's or not, when programming PICs because I can get much more done with the same schedule, have benefits of HLL without the code penalty, and continue to use long-ago-developed code (reuse) for stuff I have proven reliability for. I'll take your questions now! rich --------------ms040609070408020904090706 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII5TCC As0wggI2oAMCAQICAw24sTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJ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CQUxDxcNMDUwODE3MjIwNTUzWjAjBgkqhkiG9w0BCQQxFgQU2svO eXgwuHoxibu4UFLIlXgKOe4wUgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAOBggqhkiG 9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgweAYJKwYB BAGCNxAEMWswaTBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcg KFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3Vpbmcg Q0ECAw24sTB6BgsqhkiG9w0BCRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRo YXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBG cmVlbWFpbCBJc3N1aW5nIENBAgMNuLEwDQYJKoZIhvcNAQEBBQAEggEAsLpOWfcqQSJjmOL7 eQRvxmG2KfCu+/Pw+lOsJDQMWXTxPbXxXlIddK//2sDw2V3OzEZwmJit1OuFxqrbP5NrtAmw uRPpRtAHjfTaJyfhUnzSCjrvSLIkkaDLGr3g9CT+JkPW7l7zahJNoK3H5R+WONCAlZGYRt1p VN3tK9ZoLefD3G3fb2lOV7BI+FLCgXC20Wx88DhbQ0k0uBzfsO4iKPW/GXvMthF4uXU1dYav eyXi9xIqGsPAr2pzSlIbyDJlBD8v3cvp/VC2dHOe0PW4n1eYL9uXJwXQzEBPqdd/M2HpCIJL J7stFzPReck26Wq2yM4WQWnlppoi/X0d71IZeQAAAAAAAA== --------------ms040609070408020904090706-- --===============6687931727178098== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --===============6687931727178098==--