fix: support clean SDK builds and portable C6 compiler flags

Create the SDK source directory before pioarduino populates it so its
project generator supplies app_main when Arduino autostart is disabled.

Skip TinyUSB setup for S2 clean targets before accessing SDK packages.
Move C6 constexpr attributes into a forced include header to preserve the
size optimizations across SDK metadata parsing and POSIX shell execution.
This commit is contained in:
Yurii committed 2026-11-23 08:41:21 +03:00
1 parent 435b2fe1c5
commit 558d52fa9b
4 files changed
+16 -3

No files matched your search

+4
View File
@@ -5,6 +5,10 @@ import re
Import("env")
# HybridCompile generates app_main when the SDK source directory is empty.
dummy = Path(env.subst("$PROJECT_DIR")) / ".dummy"
dummy.mkdir(exist_ok=True)
build_frameworks = env.BuildFrameworks
+5
View File
@@ -4,8 +4,13 @@ from pathlib import Path
import shutil
import subprocess
from SCons.Script import Return
Import("env")
if env.IsCleanTarget():
Return()
def checkout(repository, revision, directory):
if not (directory / ".git").is_dir():