• Week 325

    1 April 2019

    At the beginning of the week, I made headway at Highrigg with a code integration. I don’t normally go in for code generation, but for a quiuck prototype, feeding someone else’s Swagger-based api into swagger-codegen feels like exactly the right thing to do (and, of course, just what Swagger is designed for. And: it largely worked! By which I mean, we had a command-line Typescript demo in around an hour. That means I can take a stab at prototyping something else in due course, and perhaps move to something more bespoke in time. But it’s a starting point, and nice to see all the moving pieces working.

    I also continued to work on wrapping up the workshop from the week before with some review work, as well as pushing a web project a little further forward.

    Thursday was first non-client day in the studio in around a month. I put together some new boards of an internal electronics project that’s been going on for ever. for the first time, I managed to solder QFP packages without a hitch (mainly thanks to a good magnifier and a lake of flux).

    The QFP package in question is a SAMD21. I’m making a board that has a microcontroller on it, but also a USB port. Thanks to Microsoft’s UF2 bootloader (which is a brilliant bit of engineering), it should then be possible – once i’ve correctly flahsed the bootloader to the chip – to either program the board from inside the Arduino IDE… or to just drag a .uf2 file over to it and let it flash itself automatically. The idea is that hobbyists can hack on the object, but people uninterested in code can patch firmware with a usb cable and drag/drop – a nice way of doing post-launch patching.

    After a few hours of soldering in the morning, I then spent an afternoon working on trying to get UF2 bootloader onto the board. SAMD21 For Dummies has been a useful port of call but it was Tod Kurt’s notes that got me over the hump (along with remembering a key detail from an earlier error message). I spent ages with no avail trying to flash it with an STLink debugger; a Segger JLink proved to be just the ticket. And then, having flashed it with the debugger… it appeared on my desktop and behaved over USB.

    Like this:

    NewImage

    A good victory to end the week on.

    Week 326 is a vacation. I’m actually writing this from a sofa in the Lake District, where I can say I did a first: I climbed the hill an active project is named for! Yesterday, I took myself to the top of High Rigg. I wonder if that coincidence will ever a happen again.