I have always had a windows installation on one of my computers in the lab, just for (oh well) changing firmware on the freedom boards from say the PE Micro MSD to Keil CMSIS-DAP, USBDM and so on…
Rick Bronson, a friend I met on the Internet through this blog, let me in on the fact that you could unmount the auto-mounted BOOTLOADER devices(if automounted), mount it using msdos type, copy the replacement firmware and finally cylce-power the board. I put his instructions into a shell script:
#!/bin/bash DEVICE=$1 #1st command line argument, e.g /dev/sdb FIRMWARE="$2" #2nd command line argument, e.g /path/to/CMSIS-DAP_OpenSDA.S19 MNTPOINT="$3" #3rd command line argument, e.g /mnt/myfolder created with 'sudo mkdir /mnt/myfolder sudo mkdir -p $MNTPOINT #create a mount point, dont complain if it exists if [ ! -e $DEVICE ]; then echo "Can't find device"; exit 1; fi # check if device exists sudo umount $DEVICE #unmount automounted device sudo modprobe msdos # wake msdos module sudo mount -t msdos $DEVICE $MNTPOINT # mount device with msdos type sudo cp "$FIRMWARE" "$MNTPOINT" # copy the firmware sync # write any data buffered in memory out to disk sleep 1 # we have to wait (experiment :)) sudo umount $DEVICE # i need not explain :)
Just to expound further, I save this in a file at my home folder called changefirmware.sh and use it like so:
./changefirmware.sh /dev/sdb Documents/USBDM_OpenSDA/USBDM_OpenSDA.sx /mnt/dest/
Avoiding windows, one step at a time.