diff --git a/Makefile b/Makefile index 4770dc05..4ca17c20 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ else ifeq ($(TARGET),pca10040) OBJCOPY = arm-none-eabi-objcopy TGOFLAGS += -target $(TARGET) +else ifeq ($(TARGET),microbit) +# BBC micro:bit +OBJCOPY = arm-none-eabi-objcopy +TGOFLAGS += -target $(TARGET) + else ifeq ($(TARGET),bluepill) # "blue pill" development board # See: https://wiki.stm32duino.com/index.php?title=Blue_Pill @@ -42,6 +47,9 @@ run-blinky2: build/blinky2 ifeq ($(TARGET),pca10040) flash-%: build/%.hex nrfjprog -f nrf52 --sectorerase --program $< --reset +else ifeq ($(TARGET),microbit) +flash-%: build/%.hex + openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c 'program $< reset exit' else ifeq ($(TARGET),arduino) flash-%: build/%.hex avrdude -c arduino -p atmega328p -P /dev/ttyACM0 -U flash:w:$<