On Tue, 06 May 2014 23:57:41 +0200, David Brown wrote:> On 06/05/14 22:59, Tim Wescott wrote: >> On Tue, 06 May 2014 01:03:41 +0200, David Brown wrote: >> >>> On 05/05/14 18:46, Tim Wescott wrote: >>>> Is anyone in the group doing PIC development on Linux? >>>> >>>> I've got a project that really demands a sort of turbocharged 555, >>>> for which a PIC 10xxx or 12xxx would be perfect. I'm pretty sure >>>> it's small enough that it's sensible to write it entirely in >>>> assembly, or possibly in just a few lines of C. >>>> >>>> This is for a short-run product, so I not only need to know how to do >>>> development, but information on device programmers that do a >>>> "production ready" job would be nice, too. >>>> >>>> TIA. >>>> >>>> >>> I never really thought of PIC's as being "perfect" for any job - it's >>> a great many years since I happily said goodbye to them. There are >>> lots of small micros for incredibly low prices - you can even get a >>> Cortex M0+ device for under half a dollar, or AVR ATTINY devices at >>> even less. >>> So unless you are using tens of thousands of these devices, PIC's >>> don't make any sort of economic sense. >>> >>> If you are looking for something more fun, try "greenpak" devices from >>> <http://www.silego.com/>. They should fit the bill for a >>> "turbocharged 555", and are very cheap. I haven't tried them myself - >>> I'm still looking for an excuse to play with them. >> >> I understand that DigiKey is an expensive place to buy electronics (but >> oh, the convenience!). The cheapest Cortex M0 part they have in qty 10 >> is $1.05 (a Freescale MKL02Z8VFG4), going down to $0.80 in qty 500, >> while the cheapest microcontroller they have (PIC10F200T-I/OT) is $0.40 >> in qty 10, going down to $0.35 in qty 100. >> >> Maybe if I were buying 10000 at a time, straight from the factory, I >> could get a half-dollar M0+. But I'm not, and I don't think I can. >> >> (I may go with the M0 part anyway, if I can still meet my BOM-cost >> goals.) >> >> > The point is, if you are buying in quantities of 10, who cares if it is > $1 or $0.50 per part? Why do you care if it is $20 per part? The time > you spend looking up different prices on digikey and reading the > datasheets of the different chips is worth far more than all the > microcontrollers put together - even if they are $20 each. > > If you can sell your time at $100 per hour, and using a real > microcontroller rather than a PIC saves you 2 days work, then you are > better off buying $1 Cortex M0 rather than $0.40 PIC's even if you are > making 2500 boards. > > Do the maths, and figure this out. Quibbling about cents for the > critical component does not make economic sense unless you are a > starving student or making hundreds of thousands of devices. Even if > you are doing this for fun and not getting paid, your time is still > worth more than these chips.OK. FINE. Be that way. The board is laid out using an LPC811M001JDH16. My BOM cost goal, in qty 10, was $5. It's below that, even if I buy boards at $1.66 per square inch from OshPark (it's a little circuit, both in schematic and in actual size). As soon as I verify that OpenOCD works with the part (it doesn't look like version 0.7 does, but I have high hopes for version 0.8), I'll send stuff off to the board house. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
PIC development on Linux
Started by ●May 5, 2014
Reply by ●May 7, 20142014-05-07
Reply by ●May 7, 20142014-05-07
On 5/7/2014 3:22 PM, Tim Wescott wrote:> > OK. FINE. Be that way. > > The board is laid out using an LPC811M001JDH16. My BOM cost goal, in qty > 10, was $5. It's below that, even if I buy boards at $1.66 per square > inch from OshPark (it's a little circuit, both in schematic and in actual > size). > > As soon as I verify that OpenOCD works with the part (it doesn't lookI would like to see OpenOCD work at all. Please share your results. hamilton> like version 0.7 does, but I have high hopes for version 0.8), I'll send > stuff off to the board house. >
Reply by ●May 7, 20142014-05-07
On Wed, 07 May 2014 15:29:56 -0600, hamilton wrote:> On 5/7/2014 3:22 PM, Tim Wescott wrote: >> >> OK. FINE. Be that way. >> >> The board is laid out using an LPC811M001JDH16. My BOM cost goal, in >> qty 10, was $5. It's below that, even if I buy boards at $1.66 per >> square inch from OshPark (it's a little circuit, both in schematic and >> in actual size). >> >> As soon as I verify that OpenOCD works with the part (it doesn't look > > I would like to see OpenOCD work at all. > > Please share your results. > > hamiltonI've been using it since at least 2008 for my projects, and 2011 on behalf of my customers. There's always been the usual underlying irritation with development tools of getting everything to play nice together, but I've never failed to get it to work. I'm using OpenOCD with ARM Cortex cored processors (M0, M3 & M4) from ST and Luminary, using Eclipse as my IDE talking to GDB for integrated debugging, all under Linux. One of my current customers takes the code that I develop on this Linux machine, compiles it under Cygwin on Windows, and loads it using OpenOCD, again on Windows. I love it. It has tried to let me down once or twice, but I've been stern with it, and it has relented every time. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●May 7, 20142014-05-07
On 07/05/14 21:30, Andrew Smallshaw wrote:> On 2014-05-06, David Brown <david.brown@hesbynett.no> wrote: >> >> The point is, if you are buying in quantities of 10, who cares if it is >> $1 or $0.50 per part? Why do you care if it is $20 per part? The time >> you spend looking up different prices on digikey and reading the >> datasheets of the different chips is worth far more than all the >> microcontrollers put together - even if they are $20 each. >> >> If you can sell your time at $100 per hour, and using a real >> microcontroller rather than a PIC saves you 2 days work, then you are >> better off buying $1 Cortex M0 rather than $0.40 PIC's even if you are >> making 2500 boards. > > But design effort cuts both ways in short runs. If you're making > three of a circuit that has a low chip count then the ability to > put it on stripboard can save a decent of board design work as well > as time and/or expense getting those boards fabricated. 5V and 0.1" > pitch through hole are still very desirable for that kind of > situation. PICs are very amenable in that regard since they're > available in DIP from PIC10 all the way up to the more capable PIC18 > units. ARM isn't anywhere near as convenient. >That's fair enough - for some people, and for some uses, a PIC will be more convenient and easier to use than a Cortex device. So you use it because it saves you time and effort. My argument is against picking a PIC to save a few cents on the chip - not against picking a PIC because you know it is the best device for the job, or because you know it will save you time, effort and money. (I also particularly dislike the PIC as a processor, and I dislike the tools and being unable to program them in normal C - but that's a personal bias rather than a sound economic argument.)
Reply by ●May 7, 20142014-05-07
On 08/05/14 00:15, Tim Wescott wrote:> On Wed, 07 May 2014 15:29:56 -0600, hamilton wrote: > >> On 5/7/2014 3:22 PM, Tim Wescott wrote: >>> >>> OK. FINE. Be that way. >>> >>> The board is laid out using an LPC811M001JDH16. My BOM cost goal, in >>> qty 10, was $5. It's below that, even if I buy boards at $1.66 per >>> square inch from OshPark (it's a little circuit, both in schematic and >>> in actual size). >>> >>> As soon as I verify that OpenOCD works with the part (it doesn't look >> >> I would like to see OpenOCD work at all. >> >> Please share your results. >> >> hamilton >OpenOCD 0.8.0 has a number of new features, and of course supports even more devices. There are also good Windows builds, and the it's easy to install the Windows drivers (at least for FTDI-based dongles - I haven't tried any others). No cygwin in sight. The only trouble I have with it is that currently mass erase is not working on Kinetis Kxx chips, but I hope that will get sorted soon. I haven't used OpenOCD much for debugging yet, but I use it to program some K10's.> I've been using it since at least 2008 for my projects, and 2011 on > behalf of my customers. There's always been the usual underlying > irritation with development tools of getting everything to play nice > together, but I've never failed to get it to work. > > I'm using OpenOCD with ARM Cortex cored processors (M0, M3 & M4) from ST > and Luminary, using Eclipse as my IDE talking to GDB for integrated > debugging, all under Linux. > > One of my current customers takes the code that I develop on this Linux > machine, compiles it under Cygwin on Windows, and loads it using OpenOCD, > again on Windows. > > I love it. It has tried to let me down once or twice, but I've been > stern with it, and it has relented every time. >I avoid cygwin like the plague - ming based toolchains (and other software) are faster, avoid the cygwin1.dll pains, and work better with windows-style filenames. Have you tried clang for compilation, or just gcc? I gather ARM has dropped Keil as the compiler for the ADS and is moving to clang.
Reply by ●May 8, 20142014-05-08
On Thu, 08 May 2014 01:46:50 +0200, David Brown wrote:> On 08/05/14 00:15, Tim Wescott wrote: >> On Wed, 07 May 2014 15:29:56 -0600, hamilton wrote: >> >>> On 5/7/2014 3:22 PM, Tim Wescott wrote: >>>> >>>> OK. FINE. Be that way. >>>> >>>> The board is laid out using an LPC811M001JDH16. My BOM cost goal, in >>>> qty 10, was $5. It's below that, even if I buy boards at $1.66 per >>>> square inch from OshPark (it's a little circuit, both in schematic >>>> and in actual size). >>>> >>>> As soon as I verify that OpenOCD works with the part (it doesn't look >>> >>> I would like to see OpenOCD work at all. >>> >>> Please share your results. >>> >>> hamilton >> >> > OpenOCD 0.8.0 has a number of new features, and of course supports even > more devices. There are also good Windows builds, and the it's easy to > install the Windows drivers (at least for FTDI-based dongles - I haven't > tried any others). No cygwin in sight. > > The only trouble I have with it is that currently mass erase is not > working on Kinetis Kxx chips, but I hope that will get sorted soon. > > I haven't used OpenOCD much for debugging yet, but I use it to program > some K10's. > >> I've been using it since at least 2008 for my projects, and 2011 on >> behalf of my customers. There's always been the usual underlying >> irritation with development tools of getting everything to play nice >> together, but I've never failed to get it to work. >> >> I'm using OpenOCD with ARM Cortex cored processors (M0, M3 & M4) from >> ST and Luminary, using Eclipse as my IDE talking to GDB for integrated >> debugging, all under Linux. >> >> One of my current customers takes the code that I develop on this Linux >> machine, compiles it under Cygwin on Windows, and loads it using >> OpenOCD, >> again on Windows. >> >> I love it. It has tried to let me down once or twice, but I've been >> stern with it, and it has relented every time. >> >> > I avoid cygwin like the plague - ming based toolchains (and other > software) are faster, avoid the cygwin1.dll pains, and work better with > windows-style filenames.Cygwin is just there so that the makefiles will work right.> Have you tried clang for compilation, or just gcc? I gather ARM has > dropped Keil as the compiler for the ADS and is moving to clang.Never heard of it. gcc works fine for me. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Reply by ●May 8, 20142014-05-08
On 08/05/14 08:17, Tim Wescott wrote:> On Thu, 08 May 2014 01:46:50 +0200, David Brown wrote: > >> On 08/05/14 00:15, Tim Wescott wrote:<snip>>> I avoid cygwin like the plague - ming based toolchains (and other >> software) are faster, avoid the cygwin1.dll pains, and work better with >> windows-style filenames. > > Cygwin is just there so that the makefiles will work right.(This is getting a bit off topic...) I left cygwin behind many years ago, for the mingw version of gcc and msys to provide the basic command-line utilities needed to make Windows look more like a real system. It is not quite as posix-compliant as cygwin, but the utilities like sed, cp, rm, touch, etc., are /much/ faster than those in cygwin - making your makefiles faster.> >> Have you tried clang for compilation, or just gcc? I gather ARM has >> dropped Keil as the compiler for the ADS and is moving to clang. > > Never heard of it. gcc works fine for me. >clang is the C (and C++) compiler part of LLVM, which is the other big open source compiler suite. I haven't used clang myself - I haven't had time - but I always like to keep track of these things. Certainly the competition, cooperation and comparisons between gcc and clang have lead to a number of big improvements in both tools (the success of llvm has pushed gcc to get link-time optimisation into mainstream usage, improved its error and warning handling especially for C++, and encouraged plugins). <http://www.arm.com/about/newsroom/arm-compiler-builds-on-open-source-llvm-technology.php>
Reply by ●May 8, 20142014-05-08
On 2014-05-07, David Brown <david.brown@hesbynett.no> wrote:> (I also particularly dislike the PIC as a processor, and I dislike > the tools and being unable to program them in normal C - but that's a > personal bias rather than a sound economic argument.)No, that's just good common sense. ;) -- Grant Edwards grant.b.edwards Yow! I feel like I am at sharing a ``CORN-DOG'' gmail.com with NIKITA KHRUSCHEV ...
Reply by ●May 10, 20142014-05-10
On Thu, 08 May 2014 01:39:21 +0200, David Brown wrote:> (I also particularly dislike the PIC as a processor, and I dislike the > tools and being unable to program them in normal C - but that's a > personal bias rather than a sound economic argument.)I'm amused, because when I have my "Software Engineer" hat on, that's exactly my attitude. When I have my "Circuit Designer" hat on, my response to the PIC is "Hot Damn!". Ditto when I have my "buyer" hat on. It can be interesting to sit there alone in a quiet room and listen to the inter-departmental wars going on inside my head. I used to get involved with these when I worked in industry, and was just disgusted all around because it all seemed like pointless turf battles. Now that I've had more than a few of these struggles happen internally, I have more sympathy for all the participants when it happens in a big company. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Reply by ●May 11, 20142014-05-11
On 10/05/14 21:13, Tim Wescott wrote:> On Thu, 08 May 2014 01:39:21 +0200, David Brown wrote: > >> (I also particularly dislike the PIC as a processor, and I dislike the >> tools and being unable to program them in normal C - but that's a >> personal bias rather than a sound economic argument.) > > I'm amused, because when I have my "Software Engineer" hat on, that's > exactly my attitude. When I have my "Circuit Designer" hat on, my > response to the PIC is "Hot Damn!". Ditto when I have my "buyer" hat on. >I usually have my "software engineer" hat on, and sometimes my "IT manager" hat. My "circuit engineer" hat sits on the shelf most of the time, and I don't think I have a "buyer" hat at all. Of course, sometimes I have to were my "salesman" hat and listen to customers who really want an 8051 device...> It can be interesting to sit there alone in a quiet room and listen to > the inter-departmental wars going on inside my head. I used to get > involved with these when I worked in industry, and was just disgusted all > around because it all seemed like pointless turf battles. Now that I've > had more than a few of these struggles happen internally, I have more > sympathy for all the participants when it happens in a big company. >I can appreciate that. And I understand that the popularity of PICs is not just down to DIP packages and good marketing. But I like my "software engineer" hat, and don't like PICs :-)







