Saturday, February 9, 2013

Migrating to Linux, Day 6

Flashing STM32F4 Discovery

I almost gave up. Trying to flash my STM32F4 Discovery has been a nightmare. The stlink code I found didn't seem to work reliably for me. At long last I discovered OpenOCD does work. Then realized that it was mass-erasing the chip before flashing. Trying that with stlink works better. But I'd rather erase only what's needed. So, still struggling but at least there's hope of developing on STM32 on Linux.

Time Machine

Meanwhile I discovered something that would be painful to do in Windows (I think), emulating a TimeCapsule. Using netatalk 2.2 (apt-get install netatalk) I followed this guide but ignore the bit on Avahi and use the tm option on your volume.

The network backup disk does not support the required AFP features

After attempting to backup on OS X Lion or later, you get the "does not support the required AFP features" error. You may find in your Mac's /var/log/system.log that your Time Machine volume doesn't support TM Lock stealing.

  • Make sure you're running netatalk 2.2 or higher which supports the required AFP 3.3
  • If it's enabled, disable the afpd service in avahi by removing /etc/avahi/services/afpd.service (whatever it may be called) so that netatalk can advertise the volume; restart avahi-daemon.
  • Add tm to the options in AppleVolumes.default and restart netatalk
  • Unmount /Volumes/TimeMachine (or whatever the volume is called) on your Mac or it won't see the changes you made on Linux.


  1. Migrating to Linux
    So many linux !

  2. I realize this is an old post, but if you're still struggling to flash the STM32F4 Discovery under Linux, shoot me an email. I've got it working and I'm going to publish a tutorial on my blog someday, it's just not ready yet.

    1. Thanks! I haven't actually played with STM32 in awhile. The good news is that I finally migrated to Linux as my primary platform. I'll shoot you a note when I get back to STM32 fun. Thanks!


Note: Only a member of this blog may post a comment.