My first hand-written minimal ARM assembly program is finally working as intended:
And yes, it took me many debugging and re-flashing cycles to get it working correctly. Fortunately, step-by-step debugging of single assembly instructions and inspection of registers works really well with openocd and GDB.