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 bd8e95f36dd674a0ce69455a8146fb0b50a741a2 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Fri May 19 14:19:46 2023 +0200 hw/bsp: nucleo-f767zi add syscfg selectable download script This removes: - .cmd files that were not need anymore - nucleo_f767zi_download.sh (which is replaced by hw/scripts/download.sh) Values for various download commands are put in syscfg so they don't have to be specified in target when downloader is change to other option. Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/bsp/nucleo-f767zi/bsp.yml | 4 +-- hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.cmd | 22 ------------- hw/bsp/nucleo-f767zi/nucleo-f767zi_download.cmd | 22 ------------- hw/bsp/nucleo-f767zi/nucleo-f767zi_download.sh | 41 ------------------------- hw/bsp/nucleo-f767zi/pkg.yml | 1 + hw/bsp/nucleo-f767zi/syscfg.yml | 6 ++++ 6 files changed, 8 insertions(+), 88 deletions(-) diff --git a/hw/bsp/nucleo-f767zi/bsp.yml b/hw/bsp/nucleo-f767zi/bsp.yml index 35b1a54eb..f1da74b33 100644 --- a/hw/bsp/nucleo-f767zi/bsp.yml +++ b/hw/bsp/nucleo-f767zi/bsp.yml @@ -28,10 +28,8 @@ bsp.linkerscript: bsp.linkerscript.BOOT_LOADER.OVERWRITE: - "hw/bsp/nucleo-f767zi/boot-nucleo-f767zi.ld" - "@apache-mynewt-core/hw/mcu/stm/stm32f7xx/stm32f767.ld" -bsp.downloadscript: "hw/bsp/nucleo-f767zi/nucleo-f767zi_download.sh" +bsp.downloadscript: "hw/scripts/download.sh" bsp.debugscript: "hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.sh" -bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/nucleo-f767zi/nucleo-f767zi_download.cmd" -bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.cmd" bsp.flash_map: areas: diff --git a/hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.cmd b/hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.cmd deleted file mode 100644 index 3444fd327..000000000 --- a/hw/bsp/nucleo-f767zi/nucleo-f767zi_debug.cmd +++ /dev/null @@ -1,22 +0,0 @@ -@rem -@rem Licensed to the Apache Software Foundation (ASF) under one -@rem or more contributor license agreements. See the NOTICE file -@rem distributed with this work for additional information -@rem regarding copyright ownership. The ASF licenses this file -@rem to you under the Apache License, Version 2.0 (the -@rem "License"); you may not use this file except in compliance -@rem with the License. You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, -@rem software distributed under the License is distributed on an -@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@rem KIND, either express or implied. See the License for the -@rem specific language governing permissions and limitations -@rem under the License. -@rem - -@rem Execute a shell with a script of the same name and .sh extension - -@bash "%~dp0%~n0.sh" diff --git a/hw/bsp/nucleo-f767zi/nucleo-f767zi_download.cmd b/hw/bsp/nucleo-f767zi/nucleo-f767zi_download.cmd deleted file mode 100644 index 3444fd327..000000000 --- a/hw/bsp/nucleo-f767zi/nucleo-f767zi_download.cmd +++ /dev/null @@ -1,22 +0,0 @@ -@rem -@rem Licensed to the Apache Software Foundation (ASF) under one -@rem or more contributor license agreements. See the NOTICE file -@rem distributed with this work for additional information -@rem regarding copyright ownership. The ASF licenses this file -@rem to you under the Apache License, Version 2.0 (the -@rem "License"); you may not use this file except in compliance -@rem with the License. You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, -@rem software distributed under the License is distributed on an -@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@rem KIND, either express or implied. See the License for the -@rem specific language governing permissions and limitations -@rem under the License. -@rem - -@rem Execute a shell with a script of the same name and .sh extension - -@bash "%~dp0%~n0.sh" diff --git a/hw/bsp/nucleo-f767zi/nucleo-f767zi_download.sh b/hw/bsp/nucleo-f767zi/nucleo-f767zi_download.sh deleted file mode 100755 index c4c4c2a36..000000000 --- a/hw/bsp/nucleo-f767zi/nucleo-f767zi_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/openocd.sh - -CFG="-s $BSP_PATH -f nucleo-f767zi.cfg" - -if [ "$MFG_IMAGE" ]; then - FLASH_OFFSET=0x08000000 -fi - -common_file_to_load -openocd_load -openocd_reset_run diff --git a/hw/bsp/nucleo-f767zi/pkg.yml b/hw/bsp/nucleo-f767zi/pkg.yml index e177c0370..8b0cd0983 100644 --- a/hw/bsp/nucleo-f767zi/pkg.yml +++ b/hw/bsp/nucleo-f767zi/pkg.yml @@ -35,3 +35,4 @@ pkg.cflags.HARDFLOAT: pkg.deps: - "@apache-mynewt-core/hw/mcu/stm/stm32f7xx" - "@apache-mynewt-core/libc/baselibc" + - "@apache-mynewt-core/hw/scripts" diff --git a/hw/bsp/nucleo-f767zi/syscfg.yml b/hw/bsp/nucleo-f767zi/syscfg.yml index eccbbb8a8..f96a8d3b8 100644 --- a/hw/bsp/nucleo-f767zi/syscfg.yml +++ b/hw/bsp/nucleo-f767zi/syscfg.yml @@ -64,3 +64,9 @@ syscfg.vals: TIMER_0_TIM: 'TIM9' TIMER_1_TIM: 'TIM10' TIMER_2_TIM: 'TIM11' + MYNEWT_DOWNLOADER: openocd + MYNEWT_DOWNLOADER_OPENOCD_CFG: nucleo-f767zi.cfg + MYNEWT_DOWNLOADER_OPENOCD_INTERFACE: interface/stlink-v2-1.cfg + MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x08000000 + PYOCD_TARGET: stm32f767zi + JLINK_TARGET: STM32F767ZI
