diff --git a/.gitignore b/.gitignore index 53a2144bc..2c2e2269f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /firmwares/* /venv/ /boards.local.txt +/platform.local.txt llext-edk/ cflags.txt diff --git a/boards.txt b/boards.txt index e7b6325a1..8368217d6 100644 --- a/boards.txt +++ b/boards.txt @@ -484,14 +484,18 @@ portentac33.upload.interface=1 portentac33.upload.use_1200bps_touch=true portentac33.upload.wait_for_upload_port=false portentac33.upload.native_usb=true -portentac33.upload.dfuse=-Q -w +portentac33.upload.dfuse=-w portentac33.bootloader.tool=dfu-util portentac33.bootloader.tool.default=dfu-util portentac33.bootloader.file=zephyr-{build.variant}.bin portentac33.bootloader.interface=0 portentac33.bootloader.address=0x10000 -portentac33.bootloader.dfuse=-Q +portentac33.bootloader.dfuse= + +# the space before -Q is important +portentac33.empty= +portentac33.leave.dfuse={empty} -Q ########################################################################################## diff --git a/cores/arduino/usb_device_descriptor.c b/cores/arduino/usb_device_descriptor.c index 646bd84d7..0643c69ca 100644 --- a/cores/arduino/usb_device_descriptor.c +++ b/cores/arduino/usb_device_descriptor.c @@ -11,6 +11,7 @@ #include #include +#include #ifdef CONFIG_USB_DEVICE_STACK_NEXT @@ -32,8 +33,8 @@ USBD_DESC_PRODUCT_DEFINE(sample_product, CONFIG_USB_DEVICE_PRODUCT); USBD_DESC_SERIAL_NUMBER_DEFINE(sample_sn); /* doc string instantiation end */ -USBD_DESC_CONFIG_DEFINE(fs_cfg_desc, "FS Configuration"); -USBD_DESC_CONFIG_DEFINE(hs_cfg_desc, "HS Configuration"); +USBD_DESC_CONFIG_DEFINE(fs_cfg_desc, APP_VERSION_EXTENDED_STRING); +USBD_DESC_CONFIG_DEFINE(hs_cfg_desc, APP_VERSION_EXTENDED_STRING); /* doc configuration instantiation start */ static const uint8_t attributes = 0; diff --git a/extra/build.sh b/extra/build.sh index 72396c924..3ab542027 100755 --- a/extra/build.sh +++ b/extra/build.sh @@ -68,7 +68,11 @@ else fi fi +# Save the build version to loader/VERSION and for later use in local files +build_version=$(extra/get_core_version.sh loader/VERSION) + echo +echo "Build version: $build_version" echo "Build target: $target $args" # Get the variant name (NORMALIZED_BOARD_TARGET in Zephyr) @@ -138,40 +142,54 @@ update_local_field() { local field=$1 local value="$2" local comment="$3" - local full_field_name="${board}.${field}" + + if [ -z "$board" ]; then + local file="platform.local.txt" + local full_field_name="${field}" + else + local file="boards.local.txt" + local full_field_name="${board}.${field}" + fi local match_regexp="${full_field_name//./\\.}" # escape dots + if [ ! -f $file ] ; then + cat << EOF > $file +######################################################################################### +# +# AUTO GENERATED FILE - DO NOT EDIT +# This file is manipulated by extra/build.sh; manual changes may be overwritten. +# +######################################################################################### + +EOF + fi + if [ -n "$comment" ]; then # if there's a comment, add/update it as a commented-out line above the actual field - if grep -qE "^# ${match_regexp}:" boards.local.txt; then - sed -i -e "s/^# ${match_regexp}:.*/# ${full_field_name}: ${comment}/" boards.local.txt + if grep -qE "^# ${match_regexp}:" $file; then + sed -i -e "s/^# ${match_regexp}:.*/# ${full_field_name}: ${comment}/" $file else - echo "# ${full_field_name}: ${comment}" >> boards.local.txt + echo "# ${full_field_name}: ${comment}" >> $file fi fi # update the actual field line - if grep -qE "^${match_regexp}" boards.local.txt; then - sed -i -e "s/^${match_regexp}=.*/${full_field_name}=${value}/" boards.local.txt + if grep -qE "^${match_regexp}" $file; then + sed -i -e "s/^${match_regexp}=.*/${full_field_name}=${value}/" $file else - echo "${full_field_name}=${value}" >> boards.local.txt + echo "${full_field_name}=${value}" >> $file fi } # update properties on boards.local.txt from the generated files if [ ! -z "$board" ]; then - if [ ! -f boards.local.txt ] ; then - cat << EOF > boards.local.txt -######################################################################################### -# -# AUTO GENERATED FILE - DO NOT EDIT -# This file is manipulated by extra/build.sh; manual changes may be overwritten. -# -######################################################################################### - -EOF - fi + # save version to both platform.local.txt and boards.local.txt: + # - the platform one is reported by the IDE as _the_ core version; + # - the board-specific one is used by the auto-update-loader feature + # (when developing, each board build should be tracked separately). + board="" update_local_field "version" "$build_version" + update_local_field "version" "$build_version" # sketch load address: start of sketch partition, hex (exact) CODE_ADDR=$(get_value_from_text_file variants/${variant}/syms-static.ld '_sketch_start') diff --git a/extra/build_all.sh b/extra/build_all.sh index 38c4174e1..70ddf5c1f 100755 --- a/extra/build_all.sh +++ b/extra/build_all.sh @@ -27,6 +27,9 @@ if [ ! -z "$GITHUB_STEP_SUMMARY" ] ; then echo "### Variant build results:" >> "$GITHUB_STEP_SUMMARY" fi +# This will force all boards to share the same build version +export PINNED_CORE_VERSION=$(extra/get_core_version.sh) + final_result=0 while read -r item; do board=$(jq -cr '.board' <<< "$item") diff --git a/extra/get_board_details.sh b/extra/get_board_details.sh index cbe1a1178..a70d8b8b0 100755 --- a/extra/get_board_details.sh +++ b/extra/get_board_details.sh @@ -6,13 +6,13 @@ set -e get_boards() { - cat boards.txt | sed -e 's/\s*#.*//' | grep -E '^.*\.build\.variant=' | sed -e 's/\.build\.variant=.*//' + cat boards.txt | sed -e 's/\s*#.*//' | grep -E '^.*\.build\.variant=' | sed -e 's/\.build\.variant=.*//' -e 's/["\\]/\\&/g' } get_board_field() { board=$1 field=$2 - cat boards.txt | sed -e 's/\s*#.*//' | grep -E "^$board\\.$field=" | cut -d '=' -f2- | sed -e 's/"/\"/g' + cat boards.txt | sed -e 's/\s*#.*//' | grep -E "^$board\\.$field=" | cut -d '=' -f2- | sed -e 's/["\\]/\\&/g' } for BOARD in $(get_boards); do diff --git a/extra/get_core_version.sh b/extra/get_core_version.sh index 51171cee6..5c2b2e913 100755 --- a/extra/get_core_version.sh +++ b/extra/get_core_version.sh @@ -47,6 +47,9 @@ # environments the correct commit is used, even in pull requests where HEAD # might be a temporary detached commit. +# The computed version is also written to a file in the Zephyr-compatible +# VERSION format if a filename is provided as the first argument. + # Determine pre-release label based on build context if [ -z "$GITHUB_ACTIONS" ]; then # local build, highest precedence @@ -66,36 +69,85 @@ else exit 1 fi -VERSION=$(git describe --tags --exact-match --exclude '*/*' 2>/dev/null) -if [ -z "$VERSION" ]; then - DESCRIBE=$(git describe --tags --exclude '*/*' 2>/dev/null) - if [[ "$DESCRIBE" =~ ^([0-9]+\.[0-9]+\.)([0-9]+)(-.*)?-([0-9]+)-g ]]; then - maj_min="${BASH_REMATCH[1]}" - patch="${BASH_REMATCH[2]}" - prerel="${BASH_REMATCH[3]}" # optional - count="${BASH_REMATCH[4]}" -# echo "Git describe: maj_min='$maj_min' patch='$patch' prerel='$prerel' count='$count'" >&2 - if [ "$KIND" == "tag" ] ; then - # number of commits since tag is irrelevant for a tag push - label="${KIND}.${NAME}" +if [ -n "$PINNED_CORE_VERSION" ] ; then + # If PINNED_CORE_VERSION is set, use it as the version (extract fields) + # must match ..(-)(+) + pattern='^([0-9]+)\.([0-9]+)\.([0-9]+)(-[^+]*)?(\+.*)?' + if [[ $PINNED_CORE_VERSION =~ $pattern ]]; then + v_maj="${BASH_REMATCH[1]}" + v_min="${BASH_REMATCH[2]}" + v_patch="${BASH_REMATCH[3]}" + v_extra="${BASH_REMATCH[4]}" # optional, lead - + v_tweak="${BASH_REMATCH[5]}" # optional, lead + + else + echo "Error: unexpected pinned ver '$PINNED_CORE_VERSION'" >&2 + exit 1 + fi +else + exact_version=$(git describe --tags --exact-match --exclude '*/*' 2>/dev/null) + if [ -n "$exact_version" ] ; then + # this is a tagged build, extract the version components from the tag + # must match ..(-) + pattern='^([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?' + if [[ $exact_version =~ $pattern ]]; then + v_maj="${BASH_REMATCH[1]}" + v_min="${BASH_REMATCH[2]}" + v_patch="${BASH_REMATCH[3]}" + v_extra="${BASH_REMATCH[4]}" # optional, lead - else - label="${KIND}.${NAME}.${count}" + echo "Error: unexpected tag '$exact_version'" >&2 + exit 1 fi - if [ -z "$prerel" ]; then - STEM="${maj_min}$((patch+1))-0.${label}" + + # no additional information + v_tweak="" + else + version_from_git=$(git describe --tags --long --exclude '*/*' 2>/dev/null) + # must match ..(-)--g + pattern='^([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?-([0-9]+)-g.*' + if [[ $version_from_git =~ $pattern ]]; then + v_maj="${BASH_REMATCH[1]}" + v_min="${BASH_REMATCH[2]}" + v_patch="${BASH_REMATCH[3]}" + v_extra="${BASH_REMATCH[4]}" # optional, lead - + count="${BASH_REMATCH[5]}" else - STEM="${maj_min}${patch}${prerel}.${label}" + echo "Error: unexpected git describe output '$version_from_git'" >&2 + exit 1 fi - else - echo "Warning: unexpected git describe output '$DESCRIBE'" >&2 - fi - if [ -z "$STEM" ]; then - # no tags: build in a fork or locally, use a maxed out version with date+hash - STEM="9.9.9-$(date '+%Y%m%d-%H%M%S')" - fi - # If HEAD_REF is not set, we're not in CI but in a local clone. Use the - # implicit HEAD and include --dirty to test for uncommitted changes. - VERSION="${STEM}+$(git describe --always ${HEAD_REF:---dirty})" + if [ -z "${v_extra}" ]; then + v_patch=$((v_patch+1)) + v_extra="-0" + fi + + if [ "$KIND" == "tag" ] ; then + # number of commits since tag is irrelevant for a tag push + v_extra="${v_extra}.${KIND}.${NAME}" + else + v_extra="${v_extra}.${KIND}.${NAME}.${count}" + fi + + # If HEAD_REF is not set, we're not in CI but in a local clone. Use the + # implicit HEAD and include --dirty to test for uncommitted changes. + v_tweak="+$(git describe --always ${HEAD_REF:---dirty})" + fi fi + +VERSION="${v_maj}.${v_min}.${v_patch}${v_extra}${v_tweak}" echo $VERSION + +if [ -n "$1" ]; then + # Write the version components to a file in Zephyr-compatible format, + # removing leading separators from EXTRAVERSION and VERSION_TWEAK. + cat > $1 << EOF +# This file is auto-generated by get_core_version.sh. Do not edit. +# Generated from version string: ${VERSION} + +VERSION_MAJOR = ${v_maj} +VERSION_MINOR = ${v_min} +PATCHLEVEL = ${v_patch} +EXTRAVERSION = ${v_extra#-} +VERSION_TWEAK = ${v_tweak#+} +EOF +fi diff --git a/extra/package_core.sh b/extra/package_core.sh index d1c4179d8..77b431480 100755 --- a/extra/package_core.sh +++ b/extra/package_core.sh @@ -54,6 +54,8 @@ for board in $EXCLUDED_BOARDS ; do # remove (even commented) lines for excluded boards sed -i "/^\(\s*#\s*\)\?${board}\./d" $TEMP_BOARDS done +# remove any per-board version lines +sed -i '/^\S*\.version=/d' $TEMP_BOARDS # remove multiple empty lines sed -i '/^$/N;/^\n$/D' $TEMP_BOARDS diff --git a/loader/Kconfig b/loader/Kconfig index 216d0d959..9965f3757 100644 --- a/loader/Kconfig +++ b/loader/Kconfig @@ -7,6 +7,9 @@ config PINCTRL select PINCTRL_NON_STATIC +config USB_CONFIGURATION_STRING_DESC + default "$(APP_VERSION_EXTENDED_STRING)" + source "Kconfig.zephyr" config LLEXT_HEAP_REGION diff --git a/loader/blobs/c33_bl.bin b/loader/blobs/c33_bl.bin index 40688c78d..f93f1a565 100755 Binary files a/loader/blobs/c33_bl.bin and b/loader/blobs/c33_bl.bin differ diff --git a/loader/fixups.c b/loader/fixups.c index 5903c20e7..a9335ae6f 100644 --- a/loader/fixups.c +++ b/loader/fixups.c @@ -6,6 +6,7 @@ #include #include +#include #ifndef CONFIG_CPP void __cxa_pure_virtual() { @@ -189,6 +190,13 @@ int maybe_flash_bootloader(void) { printk("Failed to write flash area, rc %d\n", rc); return rc; } + struct led_dt_spec ledb = LED_DT_SPEC_GET(DT_NODELABEL(led3)); + while (1) { + led_on_dt(&ledb); + k_msleep(100); + led_off_dt(&ledb); + k_msleep(100); + } } return 0; } diff --git a/loader/prj.conf b/loader/prj.conf index 0b48b8ca1..ce28c9433 100644 --- a/loader/prj.conf +++ b/loader/prj.conf @@ -51,3 +51,5 @@ CONFIG_RTC_UPDATE=y CONFIG_RTC_CALIBRATION=y CONFIG_DEVICE_DEPS=y + +CONFIG_USB_CONFIGURATION_STRING_DESC_ENABLE=y diff --git a/platform.txt b/platform.txt index 9c541554c..5773d2a74 100644 --- a/platform.txt +++ b/platform.txt @@ -164,102 +164,101 @@ pluggable_monitor.required.serial=builtin:serial-monitor # Uploader tools # -------------- +# No erase command is needed for Zephyr targets +erase.pattern= + +# Generated files used at upload time +upload.artifacts.loader={runtime.platform.path}/firmwares/{bootloader.file} +upload.artifacts.sketch={build.path}/{build.project_name}.{upload.extension} + +# Expects a {loader.cmd} and a {sketch.cmd} to be defined in the tool's +# section. The loader is flashed if it does not match the current (maybe +# board-specific) core version. The sketch is then flashed in any case. +tools.patterns.upload-loader-and-sketch="{runtime.tools.scripting-tools.path}/scripting-tools" if not eq "v{upload.port.properties.configuration}" "v{version}" {loader.cmd} :: run {sketch.cmd} + # # OpenOCD # + +# Special handling of loader and sketch via cfg file + tools.openocd.path={runtime.tools.openocd-0.12.0-arduino1-static.path} tools.openocd.cmd=bin/openocd tools.openocd.cmd.windows=bin/openocd.exe tools.openocd.upload.params.verbose=-d2 tools.openocd.upload.params.quiet=-d0 -tools.openocd.upload.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{runtime.platform.path}/firmwares/{bootloader.file}"" -c "set filename1 "{build.path}/{build.project_name}.{upload.extension}"" -c "set offset {upload.address}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" +tools.openocd.upload.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{upload.artifacts.loader}"" -c "set filename1 "{upload.artifacts.sketch}"" -c "set offset {upload.address}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" tools.openocd.program.params.verbose=-d2 tools.openocd.program.params.quiet=-d0 -tools.openocd.upload.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{runtime.platform.path}/firmwares/{bootloader.file}"" -c "set filename1 "{build.path}/{build.project_name}.{upload.extension}"" -c "set offset {upload.address}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" - -tools.openocd.erase.params.verbose=-d2 -tools.openocd.erase.params.quiet=-d0 -tools.openocd.erase.pattern= +tools.openocd.program.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{upload.artifacts.loader}"" -c "set filename1 "{upload.artifacts.sketch}"" -c "set offset {upload.address}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" tools.openocd.bootloader.params.verbose=-d2 tools.openocd.bootloader.params.quiet=-d0 -tools.openocd.bootloader.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{runtime.platform.path}/firmwares/{bootloader.file}"" -f "{build.variant.path}/flash_bootloader.cfg" "{upload.verbose}" +tools.openocd.bootloader.pattern="{path}/{cmd}" -s "{path}/share/openocd/scripts/" {upload.programmer} {upload.config} -c "set filename0 "{upload.artifacts.loader}"" -f "{build.variant.path}/flash_bootloader.cfg" "{upload.verbose}" + # # BOSSA # + tools.bossac.path={runtime.tools.bossac-1.9.1-arduino2.path} tools.bossac.cmd=bossac tools.bossac.cmd.windows=bossac.exe +tools.bossac.sketch.cmd="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i -e -w "{upload.artifacts.sketch}" --offset {upload.address} -R +tools.bossac.loader.cmd="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i -e -w "{upload.artifacts.loader}" --offset {bootloader.address} + tools.bossac.upload.params.verbose=-d tools.bossac.upload.params.quiet= -tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i -e -w "{build.path}/{build.project_name}.{upload.extension}" --offset {upload.address} -R +tools.bossac.upload.pattern={tools.patterns.upload-loader-and-sketch} tools.bossac.bootloader.params.verbose=-d tools.bossac.bootloader.params.quiet= -tools.bossac.bootloader.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i -e -w "{runtime.platform.path}/firmwares/{bootloader.file}" --offset {bootloader.address} -R +tools.bossac.bootloader.pattern={loader.cmd} -R -tools.bossac.erase.params.verbose= -tools.bossac.erase.params.quiet= -tools.bossac.erase.pattern= - -# -# STM32FLASH -# -tools.stm32flash.cmd=stm32flash -tools.stm32flash.path={runtime.platform.path}/tools/windows -tools.stm32flash.path.macosx={runtime.platform.path}/tools/macosx -tools.stm32flash.path.linux={runtime.platform.path}/tools/linux -tools.stm32flash.upload.params.verbose=-v -tools.stm32flash.upload.params.quiet= -tools.stm32flash.upload.pattern="{path}/{cmd}" {serial.port} -e 1024 -b 2400 -w "{build.path}/{build.project_name}.bin" -tools.stm32flash.program.params.verbose=-v -tools.stm32flash.program.params.quiet= -tools.stm32flash.program.pattern="{path}/{cmd}" {serial.port} -e 1024 -b 2400 -w "{build.path}/{build.project_name}.bin" -tools.stm32flash.erase.params.verbose=-v -tools.stm32flash.erase.params.quiet= -tools.stm32flash.erase.pattern="{path}/{cmd}" {serial.port} -e 1024 -b 2400 # # DFU_UTIL # -upload.dfuse=--dfuse-address={upload.address}:leave -bootloader.dfuse=--dfuse-address={bootloader.address}:leave +# overridable by boards.txt +leave.dfuse=:leave +upload.dfuse=--dfuse-address={upload.address} +bootloader.dfuse=--dfuse-address={bootloader.address} tools.dfu-util.path={runtime.tools.dfu-util.path} tools.dfu-util.cmd=dfu-util +tools.dfu-util.sketch.cmd="{path}/{cmd}" --device ,{upload.vid}:{upload.pid} -D "{upload.artifacts.sketch}" -a{upload.interface} {upload.dfuse}{leave.dfuse} +tools.dfu-util.loader.cmd="{path}/{cmd}" --device ,{bootloader.vid}:{bootloader.pid} -D "{upload.artifacts.loader}" -a{bootloader.interface} {bootloader.dfuse} + tools.dfu-util.upload.params.verbose=-d tools.dfu-util.upload.params.quiet= -tools.dfu-util.upload.pattern="{path}/{cmd}" --device ,{upload.vid}:{upload.pid} -D "{build.path}/{build.project_name}.{upload.extension}" -a{upload.interface} {upload.dfuse} +tools.dfu-util.upload.pattern={tools.patterns.upload-loader-and-sketch} tools.dfu-util.bootloader.params.verbose=-d tools.dfu-util.bootloader.params.quiet= -tools.dfu-util.bootloader.pattern="{path}/{cmd}" --device ,{bootloader.vid}:{bootloader.pid} -D "{runtime.platform.path}/firmwares/{bootloader.file}" -a{bootloader.interface} {bootloader.dfuse} +tools.dfu-util.bootloader.pattern={loader.cmd}{leave.dfuse} -tools.dfu-util.erase.params.verbose= -tools.dfu-util.erase.params.quiet= -tools.dfu-util.erase.pattern= # # PICOTOOL # + +tools.picotool.sketch.cmd="{path}/{cmd}" {upload.verbose} -D "{upload.artifacts.sketch}" +tools.picotool.loader.cmd="{path}/{cmd}" {upload.verbose} -D "{upload.artifacts.loader}" + tools.picotool.path={runtime.tools.rp2040tools.path} tools.picotool.cmd=rp2040load tools.picotool.upload.params.verbose=-v tools.picotool.upload.params.quiet= -tools.picotool.upload.pattern="{path}/{cmd}" {upload.verbose} -D "{build.path}/{build.project_name}" - -tools.picotool.erase.params.verbose= -tools.picotool.erase.params.quiet= -tools.picotool.erase.pattern= +tools.picotool.upload.pattern={tools.patterns.upload-loader-and-sketch} tools.picotool.bootloader.params.verbose=-v tools.picotool.bootloader.params.quiet= -tools.picotool.bootloader.pattern="{path}/{cmd}" {upload.verbose} -D "{runtime.platform.path}/firmwares/{bootloader.file}" +tools.picotool.bootloader.pattern={loader.cmd} + # # IMGTOOL @@ -269,29 +268,22 @@ tools.imgtool.path={runtime.tools.imgtool.path} tools.imgtool.cmd=imgtool tools.imgtool.flags=sign --key "{build.keys.keychain}/{build.keys.sign_key}" --encrypt "{build.keys.keychain}/{build.keys.encrypt_key}" "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.bin" --align {build.alignment} --max-align {build.alignment} --version {build.version} --header-size {build.header_size} --pad-header --slot-size {build.slot_size} -# -# ADB WRAPPER -# - -tools.adb.path={runtime.tools.adb.path} -tools.adb.cmd=adb -tools.adb.upload.params.verbose=-v -tools.adb.upload.params.quiet= -tools.adb.upload.pattern="{path}/{cmd}" push "{build.path}/{build.project_name}.elf" "/tmp/arduino/m4-user-sketch.elf" # # REMOTEOCD # + +# Special handling of loader and sketch via upload command + tools.remoteocd.path={runtime.tools.remoteocd.path} tools.remoteocd.cmd=remoteocd tools.remoteocd.upload.params.verbose=--verbose tools.remoteocd.upload.params.quiet= -tools.remoteocd.upload.pattern="{path}/{cmd}" upload --adb-path "{runtime.tools.adb.path}/adb" -s "{upload.port.properties.serialNumber}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" "{runtime.platform.path}/firmwares/{bootloader.file}" "{build.path}/{build.project_name}.{upload.extension}" +tools.remoteocd.upload.pattern="{path}/{cmd}" upload --adb-path "{runtime.tools.adb.path}/adb" -s "{upload.port.properties.serialNumber}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" "{upload.artifacts.loader}" "{upload.artifacts.sketch}" tools.remoteocd.bootloader.params.verbose=--verbose tools.remoteocd.bootloader.params.quiet= -tools.remoteocd.erase.pattern= -tools.remoteocd.bootloader.pattern="{path}/{cmd}" upload --adb-path "{runtime.tools.adb.path}/adb" -s "{upload.port.properties.serialNumber}" -f "{build.variant.path}/flash_bootloader.cfg" "{upload.verbose}" "{runtime.platform.path}/firmwares/{bootloader.file}" +tools.remoteocd.bootloader.pattern="{path}/{cmd}" upload --adb-path "{runtime.tools.adb.path}/adb" -s "{upload.port.properties.serialNumber}" -f "{build.variant.path}/flash_bootloader.cfg" "{upload.verbose}" "{upload.artifacts.loader}" tools.remoteocd_network.upload.protocol=network tools.remoteocd_network.upload.field.password=Password @@ -300,7 +292,8 @@ tools.remoteocd_network.path={runtime.tools.remoteocd.path} tools.remoteocd_network.cmd=remoteocd tools.remoteocd_network.upload.params.verbose=--verbose tools.remoteocd_network.upload.params.quiet= -tools.remoteocd_network.upload.pattern="{path}/{cmd}" upload -a "{upload.port.address}" --password "{upload.field.password}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" "{runtime.platform.path}/firmwares/{bootloader.file}" "{build.path}/{build.project_name}.{upload.extension}" +tools.remoteocd_network.upload.pattern="{path}/{cmd}" upload -a "{upload.port.address}" --password "{upload.field.password}" -f "{build.variant.path}/{openocd_cfg}" "{upload.verbose}" "{upload.artifacts.loader}" "{upload.artifacts.sketch}" + # # PYOCD WRAPPER @@ -312,15 +305,11 @@ tools.pyocd.path= tools.pyocd.cmd=pyocd tools.pyocd.upload.params.verbose= tools.pyocd.upload.params.quiet= -tools.pyocd.upload.pattern="{cmd}" load --target {upload.target} {build.path}/{build.project_name}.{upload.extension}@{upload.address} +tools.pyocd.upload.pattern="{cmd}" load --target {upload.target} {upload.artifacts.sketch}@{upload.address} tools.pyocd.bootloader.params.verbose= tools.pyocd.bootloader.params.quiet= -tools.pyocd.bootloader.pattern="{cmd}" load --target {bootloader.target} "{runtime.platform.path}/firmwares/{bootloader.file}" - -tools.pyocd.erase.params.verbose= -tools.pyocd.erase.params.quiet= -tools.pyocd.erase.pattern= +tools.pyocd.bootloader.pattern="{cmd}" load --target {bootloader.target} "{upload.artifacts.loader}" # diff --git a/variants/arduino_portenta_c33_r7fa6m5bh3cfc/arduino_portenta_c33_r7fa6m5bh3cfc.conf b/variants/arduino_portenta_c33_r7fa6m5bh3cfc/arduino_portenta_c33_r7fa6m5bh3cfc.conf index c8dd6b230..248bf700e 100644 --- a/variants/arduino_portenta_c33_r7fa6m5bh3cfc/arduino_portenta_c33_r7fa6m5bh3cfc.conf +++ b/variants/arduino_portenta_c33_r7fa6m5bh3cfc/arduino_portenta_c33_r7fa6m5bh3cfc.conf @@ -140,3 +140,5 @@ CONFIG_FS_FATFS_CUSTOM_MOUNT_POINT_COUNT=3 CONFIG_FS_FATFS_CUSTOM_MOUNT_POINTS="wlan,ota,SD" CONFIG_DYNAMIC_INTERRUPTS=n + +CONFIG_LED=y \ No newline at end of file