fce0dfb70a
Bluedroid cannot initialize beside the Lua runtime on this heap, so the provider is NimBLE-Arduino. Scans keep the six strongest devices in a fixed buffer rather than growing one. The standalone BLE app is gone: it was a screen of toggles that belongs next to the other device settings.
53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
# Run inside `nix develop`, which provides pio, lua and a compiler.
|
|
# LUA is pinned to 5.4 to match the interpreter vendored into the firmware.
|
|
|
|
LUA ?= lua
|
|
CXX ?= c++
|
|
CXXFLAGS ?= -std=c++11 -Wall -Wextra
|
|
BUILD_DIR := .pio/build/esp32-32e
|
|
SHARED_LUA := lib/esp32-lua-api/lua/lib
|
|
LUA_TESTS := test/keyboard.lua test/settings_calibration.lua test/statusbar_dirty.lua test/settings_busy.lua test/ble.lua
|
|
|
|
.PHONY: test test-lua test-cpp test-shared sdcard compiledb build upload monitor clean
|
|
|
|
# The shared modules ship from the submodule rather than a copy in this repo, so an app
|
|
# on the card and an app on the host resolve the same ui.lua. Run before flashing or
|
|
# booting the emulator, both of which read sdcard/ directly.
|
|
sdcard:
|
|
@cp $(SHARED_LUA)/*.lua sdcard/.lua/lib/
|
|
@echo "sdcard/.lua/lib <- $(SHARED_LUA)"
|
|
|
|
# The layout engine, the shared modules and the API declarations are tested in
|
|
# lib/esp32-lua-api; what is left here is this firmware's own Lua and gfx.
|
|
test: test-cpp test-lua test-shared
|
|
|
|
test-shared:
|
|
@$(MAKE) -C lib/esp32-lua-api test
|
|
|
|
test-lua:
|
|
@$(LUA) -e 'assert(_VERSION == "Lua 5.4", "tests need Lua 5.4 to match the firmware, got " .. _VERSION)'
|
|
@for t in $(LUA_TESTS); do printf '%-32s ' "$$t"; $(LUA) "$$t" || exit 1; done
|
|
|
|
test-cpp: $(BUILD_DIR)/round_rect_test
|
|
@printf '%-32s ' test/round_rect_test.cpp; $(BUILD_DIR)/round_rect_test
|
|
|
|
$(BUILD_DIR)/round_rect_test: test/round_rect_test.cpp src/gfx/round_rect.h
|
|
@mkdir -p $(@D)
|
|
@$(CXX) $(CXXFLAGS) $< -o $@
|
|
|
|
compiledb:
|
|
pio run -t compiledb
|
|
|
|
build:
|
|
pio run
|
|
|
|
upload:
|
|
pio run -t upload
|
|
|
|
monitor:
|
|
pio device monitor
|
|
|
|
clean:
|
|
pio run -t clean
|
|
rm -f $(BUILD_DIR)/round_rect_test
|