This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 89a8da0d3c672840c582df7894c8ce4af6417123 Author: Wojciech Pietraszewski <wojciech.pietraszew...@codecoup.pl> AuthorDate: Mon May 29 11:13:44 2023 +0200 hw/bsp: p-nucleo-wb55-usbdongle add syscfg selectable download script --- hw/bsp/p-nucleo-wb55-usbdongle/bsp.yml | 2 +- .../p-nucleo-wb55_download.sh | 41 ---------------------- hw/bsp/p-nucleo-wb55-usbdongle/pkg.yml | 1 + hw/bsp/p-nucleo-wb55-usbdongle/syscfg.yml | 5 +++ 4 files changed, 7 insertions(+), 42 deletions(-) diff --git a/hw/bsp/p-nucleo-wb55-usbdongle/bsp.yml b/hw/bsp/p-nucleo-wb55-usbdongle/bsp.yml index 0dfd8993e..6f4871030 100644 --- a/hw/bsp/p-nucleo-wb55-usbdongle/bsp.yml +++ b/hw/bsp/p-nucleo-wb55-usbdongle/bsp.yml @@ -28,7 +28,7 @@ bsp.linkerscript: bsp.linkerscript.BOOT_LOADER.OVERWRITE: - "hw/bsp/p-nucleo-wb55-usbdongle/boot-p-nucleo-wb55.ld" - "@apache-mynewt-core/hw/mcu/stm/stm32wbxx/stm32wb55.ld" -bsp.downloadscript: "hw/bsp/p-nucleo-wb55-usbdongle/p-nucleo-wb55_download.sh" +bsp.downloadscript: "hw/scripts/download.sh" bsp.debugscript: "hw/bsp/p-nucleo-wb55-usbdongle/p-nucleo-wb55_debug.sh" bsp.flash_map: diff --git a/hw/bsp/p-nucleo-wb55-usbdongle/p-nucleo-wb55_download.sh b/hw/bsp/p-nucleo-wb55-usbdongle/p-nucleo-wb55_download.sh deleted file mode 100755 index 44124fa7a..000000000 --- a/hw/bsp/p-nucleo-wb55-usbdongle/p-nucleo-wb55_download.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Called with following variables set: -# - CORE_PATH is absolute path to @apache-mynewt-core -# - BSP_PATH is absolute path to hw/bsp/bsp_name -# - BIN_BASENAME is the path to prefix to target binary, -# .elf appended to name is the ELF file -# - IMAGE_SLOT is the image slot to download to (for non-mfg-image, non-boot) -# - FEATURES holds the target features string -# - EXTRA_JTAG_CMD holds extra parameters to pass to jtag software -# - MFG_IMAGE is "1" if this is a manufacturing image -# - FLASH_OFFSET contains the flash offset to download to -# - BOOT_LOADER is set if downloading a bootloader - -. $CORE_PATH/hw/scripts/common.sh -common_file_to_load - -if [ "$BOOT_LOADER" -o "$MFG_IMAGE" ]; then - STM32_Programmer_CLI -c port=usb1 -d $FILE_NAME $FLASH_OFFSET -else - cp $FILE_NAME $FILE_NAME.bin - STM32_Programmer_CLI -c port=usb1 -d $FILE_NAME.bin $FLASH_OFFSET - rm $FILE_NAME.bin -fi diff --git a/hw/bsp/p-nucleo-wb55-usbdongle/pkg.yml b/hw/bsp/p-nucleo-wb55-usbdongle/pkg.yml index 1be11962a..8ec45722f 100644 --- a/hw/bsp/p-nucleo-wb55-usbdongle/pkg.yml +++ b/hw/bsp/p-nucleo-wb55-usbdongle/pkg.yml @@ -36,3 +36,4 @@ pkg.cflags.HARDFLOAT: pkg.deps: - "@apache-mynewt-core/hw/mcu/stm/stm32wbxx" - "@apache-mynewt-core/libc/baselibc" + - "@apache-mynewt-core/hw/scripts" diff --git a/hw/bsp/p-nucleo-wb55-usbdongle/syscfg.yml b/hw/bsp/p-nucleo-wb55-usbdongle/syscfg.yml index ba409fd84..c3ec05121 100644 --- a/hw/bsp/p-nucleo-wb55-usbdongle/syscfg.yml +++ b/hw/bsp/p-nucleo-wb55-usbdongle/syscfg.yml @@ -80,3 +80,8 @@ syscfg.vals: TIMER_0_TIM: 'TIM2' TIMER_1_TIM: 'TIM16' TIMER_2_TIM: 'TIM17' + + # Flasher parameters + MYNEWT_DOWNLOADER: stflash + MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x08000000 + JLINK_TARGET: STM32WB55RG