summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-12 15:58:36 +0300
committerPaul Buetow <paul@buetow.org>2026-04-12 15:58:36 +0300
commitf778af609857a7f5eb3115f66eafb7436dae3bdf (patch)
tree171218946b37902095a2e468fe599c27ded872d8 /wscript
parentdbbed4451b2ef4b8095798a4894c86247b099372 (diff)
52: implement debug menu and fake time controls
Diffstat (limited to 'wscript')
-rw-r--r--wscript9
1 files changed, 8 insertions, 1 deletions
diff --git a/wscript b/wscript
index 5238bc8..6de2123 100644
--- a/wscript
+++ b/wscript
@@ -3,6 +3,7 @@
#
# Feel free to customize this to your needs.
#
+import os
import os.path
top = '.'
@@ -30,8 +31,14 @@ def build(ctx):
binaries = []
cached_env = ctx.env
- for platform in ctx.env.TARGET_PLATFORMS:
+ target_platforms = ctx.env.TARGET_PLATFORMS
+ if os.environ.get('DEBUG') == '1':
+ target_platforms = ['basalt']
+
+ for platform in target_platforms:
ctx.env = ctx.all_envs[platform]
+ if os.environ.get('DEBUG') == '1':
+ ctx.env.append_value('DEFINES', ['DEBUG'])
ctx.set_group(ctx.env.PLATFORM_NAME)
app_elf = '{}/pebble-app.elf'.format(ctx.env.BUILD_DIR)
ctx.pbl_build(source=ctx.path.ant_glob('src/c/**/*.c'), target=app_elf, bin_type='app')