Skip to content

Commit e21b4af

Browse files
committed
MicroPython: Makefile cleanup
1 parent e80b3cb commit e21b4af

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

  • advanced/micropython/port-riscv-emu.py

advanced/micropython/port-riscv-emu.py/Makefile

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,10 @@ endif
167167

168168
# Select HAL based on build mode
169169
ifeq ($(MODE),REPL_NEWLIB)
170-
# Mode 1: syscall-based I/O
171170
SRC_C += mphalport.c
172171
else ifeq ($(MODE),HEADLESS)
173-
# Mode 2: headless (no stdio)
174172
SRC_C += mphalport_headless.c
175173
else ifeq ($(MODE),REPL_UART)
176-
# Mode 3: UART MMIO I/O
177174
SRC_C += mphalport_uart.c
178175
endif
179176

@@ -197,7 +194,6 @@ endif
197194
# Print build configuration
198195
$(info Building MicroPython port in MODE=$(MODE))
199196

200-
201197
$(BUILD)/firmware.elf: $(OBJ)
202198
$(ECHO) "LINK $@"
203199
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
@@ -206,23 +202,4 @@ $(BUILD)/firmware.elf: $(OBJ)
206202
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
207203
$(Q)$(OBJCOPY) -O binary $^ $(BUILD)/firmware.bin
208204

209-
$(BUILD)/firmware.dfu: $(BUILD)/firmware.bin
210-
$(ECHO) "Create $@"
211-
$(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware.bin $@
212-
213-
deploy: $(BUILD)/firmware.dfu
214-
$(ECHO) "Writing $< to the board"
215-
$(Q)$(PYTHON) $(PYDFU) -u $<
216-
217-
# Run emulation build on a POSIX system with suitable terminal settings
218-
run:
219-
@saved_=`stty -g`; \
220-
stty raw opost -echo; \
221-
$(BUILD)/firmware.elf; \
222-
echo "Exit status: $$?"; \
223-
stty $$saved_
224-
225-
test: $(BUILD)/firmware.elf
226-
$(Q)/usr/bin/printf "print('hello world!', list(x+1 for x in range(10)), end='eol\\\\n')\\r\\n\\004" | $(BUILD)/firmware.elf | tail -n2 | grep "^hello world! \\[1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\]eol"
227-
228205
include $(TOP)/py/mkrules.mk

0 commit comments

Comments
 (0)