Skip to content

Commit

Permalink
fix: disable print messages
Browse files Browse the repository at this point in the history
  • Loading branch information
DeimosHall committed Nov 30, 2023
1 parent 3779bf6 commit c6ec5e5
Show file tree
Hide file tree
Showing 4 changed files with 844 additions and 751 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# macOS finder files
**/.DS_Store

\.DS_Store
# Firmware binaries
examples/**/build/
32 changes: 32 additions & 0 deletions examples/IMU_Zero/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# BOARD_TAG = arduino:mbed_rp2040:pico
BOARD_TAG = rp2040:rp2040:rpipico
MONITOR_PORT = /dev/cu.usbmodem11401
ARDUINO_CLI_PATH := arduino-cli

help:
@echo "Usage: make [target] [BOARD=rp2040|esp32|esp32s3]"
@echo "Targets:"
@echo " compile: compile the firmware"
@echo " upload: upload the firmware to the board"
@echo " monitor: monitor the serial port"
@echo " clean: clean the cache"
@echo " all: compile, upload, monitor"
@echo "Examples:"
@echo " make compile BOARD=rp2040"
@echo " make upload BOARD=rp2040"
@echo " make all BOARD=esp32s3"

compile:
$(ARDUINO_CLI_PATH) compile --fqbn $(BOARD_TAG) --export-binaries

upload:
@$(ARDUINO_CLI_PATH) upload -p $(MONITOR_PORT) --fqbn $(BOARD_TAG) --verbose

monitor:
@$(ARDUINO_CLI_PATH) monitor -p $(MONITOR_PORT) --config baudrate=9600
# screen $(MONITOR_PORT) 9600

clean:
@$(ARDUINO_CLI_PATH) cache clean

all: compile upload monitor
32 changes: 32 additions & 0 deletions examples/MPU6050_raw/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# BOARD_TAG = arduino:mbed_rp2040:pico
BOARD_TAG = rp2040:rp2040:rpipico
MONITOR_PORT = /dev/cu.usbmodem11401
ARDUINO_CLI_PATH := arduino-cli

help:
@echo "Usage: make [target] [BOARD=rp2040|esp32|esp32s3]"
@echo "Targets:"
@echo " compile: compile the firmware"
@echo " upload: upload the firmware to the board"
@echo " monitor: monitor the serial port"
@echo " clean: clean the cache"
@echo " all: compile, upload, monitor"
@echo "Examples:"
@echo " make compile BOARD=rp2040"
@echo " make upload BOARD=rp2040"
@echo " make all BOARD=esp32s3"

compile:
$(ARDUINO_CLI_PATH) compile --fqbn $(BOARD_TAG) --export-binaries

upload:
@$(ARDUINO_CLI_PATH) upload -p $(MONITOR_PORT) --fqbn $(BOARD_TAG) --verbose

monitor:
@$(ARDUINO_CLI_PATH) monitor -p $(MONITOR_PORT) --config baudrate=38400
# screen $(MONITOR_PORT) 9600

clean:
@$(ARDUINO_CLI_PATH) cache clean

all: compile upload monitor
Loading

0 comments on commit c6ec5e5

Please sign in to comment.