mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
CI waveform flavour select (#7715)
* every other ci builder uses waveform phase lock * fix indentation * same defaults for PIO as in IDE * CI: force logging without error/warning * remove forced logging
This commit is contained in:
parent
4c7a20868a
commit
27b54f57bd
@ -66,6 +66,8 @@ function build_sketches()
|
|||||||
local sketches=$(find $srcpath -name *.ino | sort)
|
local sketches=$(find $srcpath -name *.ino | sort)
|
||||||
print_size_info >size.log
|
print_size_info >size.log
|
||||||
export ARDUINO_IDE_PATH=$arduino
|
export ARDUINO_IDE_PATH=$arduino
|
||||||
|
local pwm_phase=""
|
||||||
|
[ $(( $build_rem % 2 )) -eq 0 ] && pwm_phase="--waveform_phase"
|
||||||
local testcnt=0
|
local testcnt=0
|
||||||
for sketch in $sketches; do
|
for sketch in $sketches; do
|
||||||
testcnt=$(( ($testcnt + 1) % $build_mod ))
|
testcnt=$(( ($testcnt + 1) % $build_mod ))
|
||||||
@ -112,8 +114,8 @@ function build_sketches()
|
|||||||
export MSYS2_ARG_CONV_EXC="*"
|
export MSYS2_ARG_CONV_EXC="*"
|
||||||
export MSYS_NO_PATHCONV=1
|
export MSYS_NO_PATHCONV=1
|
||||||
fi
|
fi
|
||||||
echo "$build_cmd $sketch"
|
echo "$build_cmd $pwm_phase $sketch"
|
||||||
time ($build_cmd $sketch >build.log)
|
time ($build_cmd $pwm_phase $sketch >build.log)
|
||||||
local result=$?
|
local result=$?
|
||||||
if [ $result -ne 0 ]; then
|
if [ $result -ne 0 ]; then
|
||||||
echo "Build failed ($1)"
|
echo "Build failed ($1)"
|
||||||
|
@ -69,6 +69,8 @@ def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
|
|||||||
'ResetMethod=nodemcu'.format(**vars(args))
|
'ResetMethod=nodemcu'.format(**vars(args))
|
||||||
if args.debug_port and args.debug_level:
|
if args.debug_port and args.debug_level:
|
||||||
fqbn += 'dbg={debug_port},lvl={debug_level}'.format(**vars(args))
|
fqbn += 'dbg={debug_port},lvl={debug_level}'.format(**vars(args))
|
||||||
|
if args.waveform_phase:
|
||||||
|
fqbn += ',waveform=phase'
|
||||||
cmd += [fqbn]
|
cmd += [fqbn]
|
||||||
cmd += ['-built-in-libraries', ide_path + '/libraries']
|
cmd += ['-built-in-libraries', ide_path + '/libraries']
|
||||||
cmd += ['-ide-version=10607']
|
cmd += ['-ide-version=10607']
|
||||||
@ -115,6 +117,8 @@ def parse_args():
|
|||||||
type=int, choices=[40, 80])
|
type=int, choices=[40, 80])
|
||||||
parser.add_argument('--debug_port', help='Debug port',
|
parser.add_argument('--debug_port', help='Debug port',
|
||||||
choices=['Serial', 'Serial1'])
|
choices=['Serial', 'Serial1'])
|
||||||
|
parser.add_argument('--waveform_phase', action='store_true',
|
||||||
|
help='Select waveform locked on phase')
|
||||||
parser.add_argument('--debug_level', help='Debug level')
|
parser.add_argument('--debug_level', help='Debug level')
|
||||||
parser.add_argument('--build_cache', help='Build directory to cache core.a', default='')
|
parser.add_argument('--build_cache', help='Build directory to cache core.a', default='')
|
||||||
parser.add_argument('sketch_path', help='Sketch file path')
|
parser.add_argument('sketch_path', help='Sketch file path')
|
||||||
|
@ -240,9 +240,9 @@ else:
|
|||||||
#
|
#
|
||||||
# Waveform
|
# Waveform
|
||||||
#
|
#
|
||||||
if "PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PWM" in flatten_cppdefines:
|
if "PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PHASE" in flatten_cppdefines:
|
||||||
env.Append(CPPDEFINES=[("WAVEFORM_LOCKED_PWM", 1)])
|
env.Append(CPPDEFINES=[("WAVEFORM_LOCKED_PHASE", 1)])
|
||||||
# PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PHASE will be used by default
|
# PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PWM will be used by default
|
||||||
|
|
||||||
#
|
#
|
||||||
# VTables
|
# VTables
|
||||||
|
Loading…
x
Reference in New Issue
Block a user