Gas station without pumps

2015 July 30

Getting KL25Z bootloader to work without Windows 7

Filed under: Circuits course — gasstationwithoutpumps @ 20:26
Tags: , , , , ,

The one thing I hate about the Freedom KL25Z boards is that they are shipped with a bootloader that doesn’t work.  More precisely, they are shipped with a bootloader that works only with Windows 7, not Mac OS X, not Linux, and not even Windows 8.  (Note: never get P&E Micro to do any software work for you—they are responsible for this crappy bootloader.)  There is a newer bootloader from P&E Micro, but you need a Windows 7 computer to download it, so that does no good at all (it’s worse than that: see below).

I bought a new KL25Z board recently, to replace one that my son borrowed for Futuristic Lights, and soldered up the headers today, and was ready to test it out. I was hoping that they were now using one of the newer P&E bootloaders, that supposedly works on Macs (I’ve never seen a P&E bootloader that works with Macs, but I was willing to believe that P&E got enough complaints that they eventually fixed their bugs). Unfortunately, what I got is

MicroBoot Kernel Version is: 1.05
Bootloader Version is: 1.09

but P&E Micro reports

Bootloader versions 1.10 and earlier are not allowing firmware update and MSD FLASH programming on my OpenSDA board, with the Linux, MacOS, or Windows 8/8.1 operating systems.

I understand that on some of their newer boards, Freescale is using the mbed.org bootloader, which is the one I want to install on my KL25Z board. My choices at this point seem to be:

  • Take the 6.5-mile bicycle ride round-trip to campus to use an ancient Windows 7 machine from the circuits lab (this is what I’ve done in the past).
  • Buy a Windows 7 laptop to use at home, for initializing KL25Z boards and for testing PteroDAQ multi-platform support.
  • Look on the web for a workaround.
  • Ask my son if he found a workaround for his Linux laptop.

I’m too lazy to bike to campus (I did that cycle ride 4 times in the last 6 days), and I can’t get a laptop delivered instantly (and it will take quite a bit to put aside my aversion to Windows enough to buy even an $85 used laptop with Windows). That leave the web search and asking my son.

I did find a workaround on the web for Windows 8 [https://community.freescale.com/message/440982#440982]:

Configure “Do not allow locations on removable drives to be added to libraries”  as discussed here: http://answers.microsoft.com/en-us/windows/forum/windows8_1-hardware/how-do-i-prevent-system-volume-information-files/815b0046-d631-4419-a43e-44083a3733f5 and you should be able to do updates from Windows 8.1.

I don’t know whether this workaround works, as I don’t have access to a Windows 8 machine to test it on.

My son pointed me to a workaround that has been posted for Linux systems [http://karibe.co.ke/2014/04/changing-the-firmware-on-freescale-freedom-boards-in-linux/], and that he has used successfully. I tried that on Mac OS X, but the utilities for manipulating mounting of disks is different—you need to use ‘diskutil unmount’ and there is no “modprobe”.

I tried doing the closest corresponding actions on Mac OS X, but they did not work.  I could unmount and mount the disk easily enough (it showed up as /dev/disk1, which can be most easily discovered with ‘diskutil list’), but copying the mbed sda file to the disk still had no effect.

We tried the original script from karibe.co.ke on my son’s Linux laptop, and it worked ok.  We could install the mbed.org firmware (from https://developer.mbed.org/handbook/Firmware-FRDM-KL25Z) using the Linux script with the unmount/mount trick. The mbed software worked as usual to download PteroDAQ to the board.

I think tried some more experimenting. We updated the Bootloader to v1.11, using the latest download from P&E Micro, as pointed to by their OpenSDA page. The update worked, to the extent that the Bootloader reported being v1.11, instead of 1.09, but despite P&E’s claims, it still did not work with Mac OS X. I could not download P&E micro .SDA files nor  the 20140530_k20dx128_kl25z_if_opensda.s19 file from mbed.org.

So we used my son’s Linux laptop again to put the mbed software on the KL25Z board, and I’ll have to be carefully not to get into Bootloader mode unless either he’s around with his laptop or I’m willing to cycle to campus.  (Or I break down and get a junky Windows laptop just for rebooting KL25Z boards.)

My son has been suggesting that we get a junky Windows box, so that he can test out the multi-platform features of PteroDAQ without having to cycle to campus with me.  I might do that while he is away at Ashland next week, if I can find a cheap enough laptop that I believe will actually function.

2013 August 15

Laptop for senior year

Filed under: Uncategorized — gasstationwithoutpumps @ 21:25
Tags: , , , ,

My son bought himself a computer this week, for his senior year in high school.  He’s been trying to decide whether he wants to go with a MacBook or a cheaper Linux-based laptop in college, and decided it made sense to try out a Linux machine for a while first, to see whether it will meet his needs.  (He’s gotten rather used to some of the Mac software over the past decade.)  Windows is not an option he is willing to consider—he has picked up that prejudice from me, I think, though he has had more experience with Windows machines than I have, so he may have come by it naturally.

I told him that I would buy his college computer, but that he had a choice of getting one very good laptop at the beginning of college, or somewhat less expensive ones that were replaced more often.  Basically, I’ll be buying him about $2000 worth of computer, either all at once or spread out over the 4 years of college. We spent some time discussing the tradeoffs—the good one at the beginning would be great for freshman year, but by senior year he’d probably do better with a cheap laptop every year or two, as computers lose value pretty rapidly.

He decided to try a very cheap Linux netbook this year, to see how well he got on with Linux, so that he could make a good decision next year about what I should buy him.  He spent a lot of time looking at prices and features, and finally settled on an Acer C710-2487 11.6-Inch Chromebook for $240 from Amazon.  This was the cheapest netbook that had reasonable features:

  • Intel Celeron 847 Processor – 1.1 GHz (2 MB Cache)
  • 4 GB DDR3 RAM
  • 320 GB 5400 rpm Hard Drive
  • 11.6-Inch Screen, Intel HD Graphics
  • Built-in HD Webcam
  • Two built-in stereo speakers
  • 3- USB 2.0 Ports
  • 1- HDMI™ Port
  • Multi-Gesture Touchpad

He’s not a gamer, so the lack of graphics acceleration is not likely to bother him.  The processor is a bit slow, but moving up to a faster processor adds a lot to the price.  The USB ports are only USB2, not USB3, which he agonized over for a while, since he already has a USB3 flash drive, but he decided that the cost of moving up to USB3 was too high. At 3.05 lbs (1.38kg), his netbook is fairly heavy, but lighter than my 15″ MacBook Pro at 5.5 pounds (2.49 kg)

One of the first things he did with the Chromebook was to download Ubuntu and reconfigure the machine to be an Ubuntu laptop rather than a Chromebook.  Buying similar hardware with Ubuntu already installed actually costs more than getting a Chromebook and discarding the Chrome OS. I suspect that he’ll spend much of next week downloading and testing software he’ll want on the netbook: Skype, various Python modules, Arduino software, KL25 development software, gnuplot, GIMP, Eagle PC Board layout software, LibreOffice, Inkscape, … .  Some of those may come with Ubuntu—I’ve not checked, as I’ve never installed Ubuntu. He’ll have to get used to the tiny keyboard and using a touchpad instead of a mouse (or he’ll have to buy himself a mouse).

He has not bought himself a backup drive, but I’ll think I’ll give him the old 500GB Seagate drive that I used to use to back up my laptop.  (I had to switch to a 3TB backup drive, since I now have more than 500GB of junk on my laptop: photos and the HD videos from my video camera take up a lot of disk!)  I’m not sure what backup utility he’ll use—Chromebooks are intended to keep everything on the web, so backup is usually not a major consideration.  There is a nice list of Ubuntu backup options at http://www.thegeekstuff.com/2012/05/backup-ubuntu-desktop/, but none of them seem as simple as the Time Machine on the Mac.  The simplest approach is probably to use rsync or rsnapshot to copy from the internal drive to the external one.

I think that spending a year deciding whether Ubuntu on a cheap laptop will work for him (while he still has access to the big screen of the household iMac) is an excellent idea, and spending his own money encouraged him to think hard about what features he really wanted and which ones were nice, but overpriced.  Next year, when he selects the computer that I will buy him, he’ll have a much better idea what he really needs to be productive on a computer (and he’ll be used to installing Linux packages—a very handy skill for a CS major).

 

2012 March 7

Raspberry Pi

Filed under: Raspberry Pi — gasstationwithoutpumps @ 12:28
Tags: , ,

Thanks to Mark Guzdial’s Computing Education blog, specifically this post, I recently found out about the Raspberry Pi, a Linux board that is retailing for $35, with 256Mb RAM, 2 USB ports, an Ethernet port, and both RCA and HDMI video output (no VGA though an adapter can be had for ).  The system on a chip they are using

is a Broadcom BCM2835. This contains an ARM1176JZFS, with floating point, running at 700Mhz, and a Videocore 4 GPU. The GPU is capable of BluRay quality playback, using H.264 at 40MBits/s. It has a fast 3D core accessed using the supplied OpenGL ES2.0 and OpenVG libraries.

The GPU provides Open GL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode.

The GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24 GFLOPs of general purpose compute and features a bunch of texture filtering and DMA infrastructure.

That is, graphics capabilities are roughly equivalent to Xbox 1 level of performance. Overall real world performance is something like a 300MHz Pentium 2, only with much, much swankier graphics.

This board seems to be at least 50 times as much processing and 8000 times as much memory as an Arduino for a similar price.  You need to add an SD card to boot off of (I presume with a Linux system on the card), which raises the price by another $15–35 depending on how big a flash card you get (I’m assuming that 16gB or 32gB is about the right size—a smaller drive would be much cheaper).

There appear to be 26 general-purpose I/O pins, so I can see this processor becoming quite popular for higher-end robotics.  With the ethernet connection, it may become popular for providing small LAMP (Linux-Apache-MySQL-PhP) servers, as long as everything can fit on the SD drive.  It has an audio-out port, but you’d have to use a USB microphone to get audio in.  The board can be powered over the USB line, or through a separate power port.

The default Linux is Fedora, but Debian and ArchLinux will also be supported.  The Linux can be downloaded and put on an SD, or the SD flash cards can be bought preloaded.

This looks like a potentially very useful educational toy—cheap enough to mess around with and easy to start over from scratch (just write a new copy of the Linux onto an SD card).  The only problem I can see is that Linux makes getting access to the I/O ports much harder than it needs to be, but I suspect that the developers have already written drivers and Python modules for accessing the I/O pins, so this may not be a problem.  They plan to make Python the main development language for the Raspberry Pi (Python is slow, but even with interpreter overhead the chip would still be faster than an Arduino), but any language that has a compiler for the ARMv6 should work.  I assume that Pyrex would be available for speeding up inner loops.

I may have to look into designing a motor shield for the Raspberry Pi, so that we can do robotics with Python programming!

%d bloggers like this: