EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Cortex M3/M4 with bootloader ROM

Started by David Brown October 4, 2013
On 07/10/13 16:51, Dave Nadler wrote:
> On Monday, October 7, 2013 7:20:46 AM UTC-4, David Brown wrote: >> When you plug a USB memory stick into windows, you get a few seconds >> pause, then Windows picks a drive letter for the new drive, and opens an >> explorer window for the device. If you are working manually, that's >> fine - you can just drag-and-drop the update file into this window. >> Then you select "safe eject" from the right-mouse menu for the drive. >> >> But for automated parallel programming of multiple cards at a time, this >> cannot work - there is no person looking at windows, and doing >> drag-and-drop. For automated programming, you need to know which card >> corresponds to which "drive", you need to be able to see when they are >> attached, start and track the copy, and then unmount the drive - all >> without any windows popping up or user intervention. It is conceivable >> that this /can/ be done with Windows - but it would be a long, difficult >> and inelegant process. > > Um, unless I'm missing something, that should be a pretty easy script > even in Windows, or a C# program... > > Hope that helps, > Best Regards, Dave >
You are the second person to say that, so maybe you are right! I can certainly say that these things are a lot easier for /me/ to do in Linux, but perhaps that is just my lack of experience at such programming in Windows (it has been mainly application programming, guis, etc.). Lets take an example that I /have/ tried on Windows. I had a card that had an FTDI USB serial chip on it. For programming, you connected that into a PC to download the code over the serial port. To avoid user interaction, the PC program polled the registry entry HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM key regularly - any change in that indicated a new serial port, and started programming. This worked okay, and could probably have worked with more than one device at a time with a little effort, though I don't know in general how I would identify which port each card was on (imagine a set of test bench slots, with a USB cable from each going into a hub on the PC - you need to know which card slot corresponds to the serial port, so that you know which ones are finished and can be removed). It is possible to build your own version of FTDI's drivers (changing the "inf" file) to make comms port numbers depend on the physical address rather than being assigned automatically. That would also solve the problem of continuously increasing comms port numbers. The application note contains the warning "Note that setting LocIds will radically alter the behaviour of the driver; please contact FTDI if you think you have to change LocIds." In particular, this will cause trouble for "normal" FTDI devices on the same machine. This particular programming run was quite small, so we never got that far. On Linux, I can set up a simple "udev" rule to identify FTDI devices on particular hub ports. The rule would give the device a clear, identifiable name based on the port, then start the script that handles the programming. There is no need to think about polling. There are no concerns about the effect on anything else - the same machine could be configured to have different types of software triggered on different hub ports. There is no need to think about supporting multiple cards in parallel - that is handled automatically by the udev system. Perhaps there are easier ways to handle this in Windows - and I freely admit that much of the effort of getting the Windows version in place was because I had to find out about the registry keys involved. Someone more familiar with such programming could have done it faster. But I have no doubt that for me, such programming systems can be made faster, easier and more flexible with Linux.
David Brown  wrote:
> ... I use Linux for most of my work and play.
Just curious - Which Linux distribution do you use? I used Ubuntu for several years, but I'm not sure I want to follow Canonical in whatever path they want to take it. Thinking of switching to Scientific Linux (Fedora) when I get back to "work and play." (Crunchbang Linux is also in the run.) -- Roberto Waltman [ Please reply to the group, return address is invalid ]
Cross posting to sci.electronics.design

What linux distros do techies like?

R.


Roberto Waltman wrote:
>David Brown wrote: >> ... I use Linux for most of my work and play. > >Just curious - Which Linux distribution do you use? > >I used Ubuntu for several years, but I'm not sure I want to follow >Canonical in whatever path they want to take it. > >Thinking of switching to Scientific Linux (Fedora) when I get back to >"work and play." (Crunchbang Linux is also in the run.)
On 10/8/2013 9:32 AM, Roberto Waltman wrote:
> Cross posting to sci.electronics.design > > What linux distros do techies like? > > R. > > > Roberto Waltman wrote: >> David Brown wrote: >>> ... I use Linux for most of my work and play. >> >> Just curious - Which Linux distribution do you use? >> >> I used Ubuntu for several years, but I'm not sure I want to follow >> Canonical in whatever path they want to take it. >> >> Thinking of switching to Scientific Linux (Fedora) when I get back to >> "work and play." (Crunchbang Linux is also in the run.)
Being a vanilla sort of guy, I mostly use CentOS 6. I'm more of a KDE fan, though, so there are occasional curiosities that I haven't invested the time in fixing--for instance, clicking on a link in kmail doesn't open it correctly in Firefox. I have an old P4 box that's running Kubuntu. The main thing I disliked about Ubuntu when I used it last is that it doesn't play nicely with the other children--if I set up disk partitions on cylinder boundaries for other OSes, and tell it to use the existing partitions, it nevertheless insists on futzing with the partition table to save a quarter of a cylinder. I like computers that do as they're bloody well told. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 USA +1 845 480 2058 hobbs at electrooptical dot net http://electrooptical.net
Roberto Waltman <usenet@rwaltman.com> writes:

> Cross posting to sci.electronics.design > > What linux distros do techies like? >
Debian on my main machine (since 1999 or so). kubuntu on my laptop, but I don't really like the way Ubuntu is going either... -- John Devereux
On 2013-10-08, Roberto Waltman <usenet@rwaltman.com> wrote:
> Cross posting to sci.electronics.design > > What linux distros do techies like?
Genoo. -- Grant Edwards grant.b.edwards Yow! ... If I had heart at failure right now, gmail.com I couldn't be a more fortunate man!!
On 10/8/2013 7:00 AM, John Devereux wrote:
> Roberto Waltman <usenet@rwaltman.com> writes: > >> Cross posting to sci.electronics.design >> >> What linux distros do techies like? >> > > Debian on my main machine (since 1999 or so). > > kubuntu on my laptop, but I don't really like the way Ubuntu is going > either... > >
It's like the weather. Wait and it will be all different anyway. Just pick the one with the least overlap between what you need and what's busted. If you're experienced with Ubuntu and like the way it works, why change anything at all? Don't fix it if it ain't broke.
On a sunny day (Tue, 08 Oct 2013 09:32:46 -0400) it happened Roberto Waltman
<usenet@rwaltman.com> wrote in <v52859h5kcsqa3c466jebec7mbsdp2flc7@4ax.com>:

>Cross posting to sci.electronics.design > >What linux distros do techies like? > >R.
Not sure there is such thing as a 'techie'. I started with Linux in 1998 with SLS Linux, (Soft Landing Systems). that no longer exists. Then Slackware, was enlighting, as it had a documentation on a techie level I could read and understand. Then tried RatHead, that sucks, they are in if for the money and use incompatibility (at that time libc) as 'customer binding'. Then Suse, that was nice until 7.6 ?? or something until it got bought out and taken over and went RatHead's way. Then I used grml (www.grml.org) as it was simple and worked, but last time I looked it changed into some live CD that you cannot install. Then I went Debian (and grml is Debian based so not any big surprises and changes), and still use that. The Ubuntu you mention is also Debian based, I have it on a PC and a laptop. On the same PC and laptop I run now by default (multi boot) Slackware. I do not recommend Slackware as it has its own quirks, not all soft has been ported, and updates are sometimes very hard to do even if you have a lot of experience, and the 32 / 64 bit problems come into play too. but I use it every day, call me die-hard. Then there are my Raspberry Pis that run Debian on ARM processor, and are a pleasure to 'upgrade', everything works, but that is also due to the good work of the Raspberry foundation? So, anyways, Debian is the only distro I have ever financially supported, and maybe the cleanest most stable and best maintained. Canonical is in it for the dollars so do not know where that goes, but to start on new hardware it is cool, as everything works, they have decent support. A 'techie' will likely run wine emulator and LTspice... some more programs that need windows emulator. So maybe stick with some form of Debian for now? Buy a good book on Unix, get to learn the commands, the file structure, the X server, do not get fooled by all that mousing that is done in window managers to copy-cat sort of a MS desktop. Imitating idiots does not bring you anything useful. The command line, scripting, xterm is the user interface. Do not be afraid to be root, just think before you hit enter.... I once dropped a full harddisk, oh well. gone... So make backups, then if you screw up simply restore everything, get your work back from your backups and be happy.
On 08/10/13 15:32, Roberto Waltman wrote:
> Cross posting to sci.electronics.design >
Always a risk - you are going to get some very non-technical replies from there!
> What linux distros do techies like? > > R. > > > Roberto Waltman wrote: >> David Brown wrote: >>> ... I use Linux for most of my work and play. >> >> Just curious - Which Linux distribution do you use? >> >> I used Ubuntu for several years, but I'm not sure I want to follow >> Canonical in whatever path they want to take it. >> >> Thinking of switching to Scientific Linux (Fedora) when I get back to >> "work and play." (Crunchbang Linux is also in the run.)
I use Ubuntu a little a number of years ago, but I also didn't like some of Canonical's moves (or Unity), so I quickly dropped it. Mostly I use Mint on desktops and laptops, which gives you most of the advantages of Debian and Ubuntu (i.e., compatibility with these systems) without the disadvantages of Ubuntu (no secret deals sending your data to Amazon, no "we know best and you don't need to know" attitude to development), along with easy support for useful stuff that Debian doesn't like (such "evils" as binary graphics drivers or media codecs). I have Fedora on my wok PC, but it is getting out of date - and I think I will move it over to Mint rather than update the Fedora. For servers or other small or headless systems, I use Debian stable. This is perhaps a matter of habit - I have used it on servers for over ten years. But I've seen no reason to change that habit. For a workstation, there are a few things to consider. One of them is compatibility with software and guides. Typically, binary-only software is either in "rpm" format for Redhat-style systems, "deb" format for Ubuntu-style systems (being more popular than the parent Debian distro), or system-independent binaries. The same applies to recipes and guides. Usually it is possible to get everything working on alternative systems, but you may need to do some "translation" of things like additional packages to be installed. So if you know up-front that you want to run software with particular requirements, that will make your choice easier. If you want to run FPGA design tools, then Redhat systems (such as RHEL, Scientific Linux, CentOS, and perhaps Fedora) will be easiest. If you want to build embedded Linux systems, then most recipes are given for Ubuntu and related distros. For some software there is /no/ good distribution. If you want to build Android for embedded systems, then you can't do it using a modern distribution - the requirements are so weird and specific, such as requiring an old version of make and particular versions of Java that are no longer distributed by Oracle (but available on the net, of course). I find VirtualBox comes in very handy for such cases. If you've got the time, you can try out different systems - there is no monetary cost (except for things like RHEL where you pay for the support and services - if you need these, then RHEL will be good value for money).
On Tue, 08 Oct 2013 09:32:46 -0400, Roberto Waltman wrote:

> Cross posting to sci.electronics.design > > What linux distros do techies like? > > R. > > > Roberto Waltman wrote: >>David Brown wrote: >>> ... I use Linux for most of my work and play. >> >>Just curious - Which Linux distribution do you use? >> >>I used Ubuntu for several years, but I'm not sure I want to follow >>Canonical in whatever path they want to take it. >> >>Thinking of switching to Scientific Linux (Fedora) when I get back to >>"work and play." (Crunchbang Linux is also in the run.)
Mostly CentOS 6 but I have Linux Mint on my laptop. Mint is Ubuntu with the traditional desktop. -- Chisolm Republic of Texas

The 2024 Embedded Online Conference