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 748d060e1ed10dcf89bcdfb184f8d338890bea6c Author: Wojciech Pietraszewski <[email protected]> AuthorDate: Fri May 26 16:24:29 2023 +0200 hw/bsp: nucleo-l073rz add syscfg selectable download script --- hw/bsp/nucleo-l073rz/bsp.yml | 2 +- hw/bsp/nucleo-l073rz/nucleo-l073rz_download.sh | 39 -------------------------- hw/bsp/nucleo-l073rz/pkg.yml | 1 + hw/bsp/nucleo-l073rz/syscfg.yml | 5 ++++ 4 files changed, 7 insertions(+), 40 deletions(-) diff --git a/hw/bsp/nucleo-l073rz/bsp.yml b/hw/bsp/nucleo-l073rz/bsp.yml index 1facf525b..1c0852cb6 100644 --- a/hw/bsp/nucleo-l073rz/bsp.yml +++ b/hw/bsp/nucleo-l073rz/bsp.yml @@ -28,7 +28,7 @@ bsp.linkerscript: bsp.linkerscript.BOOT_LOADER.OVERWRITE: - "hw/bsp/nucleo-l073rz/boot-nucleo-l073rz.ld" - "@apache-mynewt-core/hw/mcu/stm/stm32l0xx/stm32l073.ld" -bsp.downloadscript: "hw/bsp/nucleo-l073rz/nucleo-l073rz_download.sh" +bsp.downloadscript: "hw/scripts/download.sh" bsp.debugscript: "hw/bsp/nucleo-l073rz/nucleo-l073rz_debug.sh" bsp.flash_map: diff --git a/hw/bsp/nucleo-l073rz/nucleo-l073rz_download.sh b/hw/bsp/nucleo-l073rz/nucleo-l073rz_download.sh deleted file mode 100755 index 5d6d649ab..000000000 --- a/hw/bsp/nucleo-l073rz/nucleo-l073rz_download.sh +++ /dev/null @@ -1,39 +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/stlink.sh - -if [ "$MFG_IMAGE" ]; then - FLASH_OFFSET=0x08000000 -fi - -common_file_to_load -stlink_load diff --git a/hw/bsp/nucleo-l073rz/pkg.yml b/hw/bsp/nucleo-l073rz/pkg.yml index 2f13157a0..a8d8b8648 100644 --- a/hw/bsp/nucleo-l073rz/pkg.yml +++ b/hw/bsp/nucleo-l073rz/pkg.yml @@ -32,3 +32,4 @@ pkg.cflags: pkg.deps: - "@apache-mynewt-core/hw/mcu/stm/stm32l0xx" - "@apache-mynewt-core/libc/baselibc" + - "@apache-mynewt-core/hw/scripts" diff --git a/hw/bsp/nucleo-l073rz/syscfg.yml b/hw/bsp/nucleo-l073rz/syscfg.yml index 01cabc90c..07dc322ed 100644 --- a/hw/bsp/nucleo-l073rz/syscfg.yml +++ b/hw/bsp/nucleo-l073rz/syscfg.yml @@ -74,3 +74,8 @@ syscfg.vals: TIMER_0_TIM: 'TIM2' TIMER_1_TIM: 'TIM3' TIMER_2_TIM: 'TIM21' + + # Flasher parameters + MYNEWT_DOWNLOADER: stflash + MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x08000000 + JLINK_TARGET: STM32L073RZ
