mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
41 lines
1.2 KiB
Makefile
41 lines
1.2 KiB
Makefile
SKETCH = flix
|
|
BOARD = esp32:esp32:d1_mini32
|
|
PORT := $(wildcard /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_* /dev/cu.usbserial-*) # TODO: CH9102X?
|
|
PORT := $(strip $(PORT))
|
|
|
|
build:
|
|
# arduino-cli compile --fqbn $(BOARD) --build-path $(SKETCH)/build --build-cache-path $(SKETCH)/cache $(SKETCH)
|
|
arduino-cli compile --fqbn $(BOARD) $(SKETCH)
|
|
|
|
upload: build
|
|
arduino-cli upload --fqbn $(BOARD) -p '$(PORT)' $(SKETCH)
|
|
|
|
monitor:
|
|
arduino-cli monitor -p '$(PORT)' -c baudrate=115200
|
|
|
|
dependencies:
|
|
arduino-cli core update-index
|
|
arduino-cli core install esp32:esp32
|
|
arduino-cli lib install 'Bolder Flight Systems SBUS'@1.0.1
|
|
arduino-cli lib install --git-url https://github.com/okalachev/MPU9250.git
|
|
|
|
gazebo/build cmake: gazebo/CMakeLists.txt
|
|
mkdir -p gazebo/build
|
|
cd gazebo/build && cmake ..
|
|
|
|
build_simulator: gazebo/build
|
|
make -C gazebo/build
|
|
|
|
simulator: build_simulator
|
|
GAZEBO_MODEL_PATH=$$GAZEBO_MODEL_PATH:${CURDIR}/gazebo/models \
|
|
GAZEBO_PLUGIN_PATH=$$GAZEBO_PLUGIN_PATH:${CURDIR}/gazebo/build \
|
|
gazebo --verbose ${CURDIR}/gazebo/flix.world
|
|
|
|
grab_log:
|
|
tools/grab_log.py
|
|
|
|
clean:
|
|
rm -rf gazebo/plugin/build $(SKETCH)/build $(SKETCH)/cache
|
|
|
|
.PHONY: build upload monitor dependencies cmake build_simulator simulator grab_log clean
|