You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2024/12/02 16:39:12 UTC
(mynewt-core) 03/05: hw/bsp/nordic_pca10056: Switch to use common download script
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 7fac1f289bff1b872971bbf60c5e61aba5299569
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Thu Nov 28 10:52:07 2024 +0100
hw/bsp/nordic_pca10056: Switch to use common download script
This also changes default downloader to nrfutil
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
hw/bsp/nordic_pca10056/bsp.yml | 2 +-
hw/bsp/nordic_pca10056/nordic_pca10056_download.sh | 40 ----------------------
hw/bsp/nordic_pca10056/pkg.yml | 1 +
hw/bsp/nordic_pca10056/syscfg.yml | 5 +++
4 files changed, 7 insertions(+), 41 deletions(-)
diff --git a/hw/bsp/nordic_pca10056/bsp.yml b/hw/bsp/nordic_pca10056/bsp.yml
index 250c124ac..d691384b6 100644
--- a/hw/bsp/nordic_pca10056/bsp.yml
+++ b/hw/bsp/nordic_pca10056/bsp.yml
@@ -24,7 +24,7 @@ bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript: autogenerated
bsp.part2linkerscript: "hw/bsp/nordic_pca10056/split-nordic_pca10056.ld"
-bsp.downloadscript: "hw/bsp/nordic_pca10056/nordic_pca10056_download.sh"
+bsp.downloadscript: "hw/scripts/download.sh"
bsp.debugscript: "hw/bsp/nordic_pca10056/nordic_pca10056_debug.sh"
bsp.flash_map:
diff --git a/hw/bsp/nordic_pca10056/nordic_pca10056_download.sh b/hw/bsp/nordic_pca10056/nordic_pca10056_download.sh
deleted file mode 100755
index 9f4fade92..000000000
--- a/hw/bsp/nordic_pca10056/nordic_pca10056_download.sh
+++ /dev/null
@@ -1,40 +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/jlink.sh
-
-if [ "$MFG_IMAGE" ]; then
- FLASH_OFFSET=0x0
-fi
-
-JLINK_DEV="nrf52840_xxaa"
-
-common_file_to_load
-jlink_load
diff --git a/hw/bsp/nordic_pca10056/pkg.yml b/hw/bsp/nordic_pca10056/pkg.yml
index 5a2c70d06..5a468423f 100644
--- a/hw/bsp/nordic_pca10056/pkg.yml
+++ b/hw/bsp/nordic_pca10056/pkg.yml
@@ -37,6 +37,7 @@ pkg.cflags.HARDFLOAT:
pkg.deps:
- "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx"
- "@apache-mynewt-core/libc"
+ - "@apache-mynewt-core/hw/scripts"
- "@apache-mynewt-core/sys/flash_map"
- "@apache-mynewt-core/boot/startup"
diff --git a/hw/bsp/nordic_pca10056/syscfg.yml b/hw/bsp/nordic_pca10056/syscfg.yml
index 69af1588a..07715d285 100644
--- a/hw/bsp/nordic_pca10056/syscfg.yml
+++ b/hw/bsp/nordic_pca10056/syscfg.yml
@@ -66,6 +66,11 @@ syscfg.vals:
QSPI_PIN_DIO3: 23
GPIO_AS_PIN_RESET: 1
+ MYNEWT_DOWNLOADER: nrfutil
+ JLINK_TARGET: NRF52
+ PYOCD_TARGET: nrf52840
+ MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x0
+
syscfg.vals.BLE_CONTROLLER:
TIMER_0: 0
TIMER_5: 1