diff --git a/board/msba2/tools/Makefile b/board/msba2/tools/Makefile
index 91d44fdf7837de321013f0a4c27b5fa48a984d08..e98492a3097dc2e6337431511b54b6d0febe68fa 100644
--- a/board/msba2/tools/Makefile
+++ b/board/msba2/tools/Makefile
@@ -12,9 +12,11 @@ PSEUDOTERM_OBJS = ${addprefix obj/,${patsubst %.c,%.o,$(PSEUDOTERM_SRC)}}
 TARGETDIR = bin
 
 lpc2k_pgm: $(OBJS)
+	mkdir -p $(TARGETDIR)
 	$(CC) -o $(TARGETDIR)/lpc2k_pgm $(OBJS)
 
 pseudoterm: $(PSEUDOTERM_OBJS)
+	mkdir -p $(TARGETDIR)
 	$(CC) -lpthread -o $(TARGETDIR)/pseudoterm $(PSEUDOTERM_OBJS)
 
 chipinfo.o: boot_2xxx.h boot_23xx.h