|
@@ -22,10 +22,9 @@ def add_cpu_freq():
|
22
|
22
|
#
|
23
|
23
|
# It will separe release and debug build folders.
|
24
|
24
|
# It useful when we need keep two live versions: one debug, for debugging,
|
25
|
|
-# other release, for flashing.
|
|
25
|
+# other release, for flashing (when upload is not done automatically by jlink/stlink).
|
26
|
26
|
# Without this, PIO will recompile everything twice for any small change.
|
27
|
|
-#
|
28
|
|
-if env.GetBuildType() == "debug":
|
|
27
|
+if env.GetBuildType() == "debug" and env.get('UPLOAD_PROTOCOL') not in ['jlink', 'stlink']:
|
29
|
28
|
env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug'
|
30
|
29
|
|
31
|
30
|
# On some platform, F_CPU is a runtime variable. Since it's used to convert from ns
|