Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a deploy config option #139

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/kitty/client/deploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2024, UNSW
# SPDX-License-Identifier: BSD-2-Clause

import kitty

print("We are starting kitty.")

kitty.run("fridge.keg.cse.unsw.edu.au")
11 changes: 9 additions & 2 deletions examples/kitty/kitty.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ else
$(error Unsupported MICROKIT_BOARD given)
endif

# If the KITTY_CONFIG is in deploy, then we will set the exec module
# of Micropython to be the "deploy.py" file resident in the client directory.
ifeq ($(strip $(KITTY_CONFIG)), deploy)
export EXEC_FILE := deploy.py
export EXEC_MODULE := EXEC_MODULE=$(EXEC_FILE)
endif

VMM_IMAGE_DIR := ${KITTY_DIR}/board/$(MICROKIT_BOARD)/framebuffer_vmm_images
VMM_SRC_DIR := ${KITTY_DIR}/src/vmm
DTS := $(VMM_IMAGE_DIR)/linux.dts
Expand Down Expand Up @@ -145,9 +152,8 @@ vmm.elf: ${VMM_OBJS} libvmm.a
# Build with two threads in parallel
nproc=2


micropython.elf: mpy-cross libsddf_util_debug.a libco.a config.py manifest.py \
kitty.py pn532.py font_height50.py font_height35.py writer.py \
kitty.py pn532.py font_height50.py font_height35.py writer.py deploy.py\
$(LIONSOS)/dep/libmicrokitco/Makefile
make -C $(LIONSOS)/components/micropython -j$(nproc) \
MICROKIT_SDK=$(MICROKIT_SDK) \
Expand All @@ -161,6 +167,7 @@ micropython.elf: mpy-cross libsddf_util_debug.a libco.a config.py manifest.py \
CONFIG_INCLUDE=$(abspath $(CONFIG_INCLUDE)) \
ENABLE_I2C=1 \
ENABLE_FRAMEBUFFER=1 \
$(EXEC_MODULE) \
V=1

config.py: ${KITTY_DIR}/board/$(MICROKIT_BOARD)/config.py
Expand Down
3 changes: 2 additions & 1 deletion examples/kitty/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
module("font_height35.py")
module("font_height50.py")
module("writer.py")
module("config.py")
module("config.py")
module("deploy.py")