diff --git a/hw/bsp/nordic_pca10028-16k/bsp.yml b/hw/bsp/nordic_pca10028-16k/bsp.yml index be9e49c65b..dc19b6bf29 100644 --- a/hw/bsp/nordic_pca10028-16k/bsp.yml +++ b/hw/bsp/nordic_pca10028-16k/bsp.yml @@ -29,10 +29,8 @@ bsp.linkerscript.BOOT_LOADER.OVERWRITE: - "hw/bsp/nordic_pca10028-16k/boot-nrf51xxaa.ld" - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld" bsp.part2linkerscript: "hw/bsp/nordic_pca10028-16k/split-nordic_pca10028-16k.ld" -bsp.downloadscript: "hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_download.sh" +bsp.downloadscript: "hw/scripts/download.sh" bsp.debugscript: "hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_debug.sh" -bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_download.cmd" -bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_debug.cmd" bsp.flash_map: areas: diff --git a/hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_download.cmd b/hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_download.cmd deleted file mode 100755 index 96f0b26050..0000000000 --- a/hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_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/nordic_pca10028-16k/nordic_pca10028-16k_download.sh b/hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_download.sh deleted file mode 100755 index fc83a277ea..0000000000 --- a/hw/bsp/nordic_pca10028-16k/nordic_pca10028-16k_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/jlink.sh - -if [ "$MFG_IMAGE" ]; then - FLASH_OFFSET=0x0 -fi - -JLINK_DEV="nRF51422_xxAC" - -common_file_to_load -jlink_load diff --git a/hw/bsp/nordic_pca10028-16k/pkg.yml b/hw/bsp/nordic_pca10028-16k/pkg.yml index 70c9f40fc0..dfc0904398 100644 --- a/hw/bsp/nordic_pca10028-16k/pkg.yml +++ b/hw/bsp/nordic_pca10028-16k/pkg.yml @@ -35,6 +35,7 @@ pkg.cflags: pkg.deps: - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx" - "@apache-mynewt-core/libc" + - "@apache-mynewt-core/hw/scripts" pkg.deps.UART_0: - "@apache-mynewt-core/hw/drivers/uart/uart_hal" diff --git a/hw/bsp/nordic_pca10028-16k/syscfg.yml b/hw/bsp/nordic_pca10028-16k/syscfg.yml index 3eae17b7cc..9d1ad3a056 100644 --- a/hw/bsp/nordic_pca10028-16k/syscfg.yml +++ b/hw/bsp/nordic_pca10028-16k/syscfg.yml @@ -124,6 +124,12 @@ syscfg.vals: MCU_DCDC_ENABLED: 1 MCU_LFCLK_SOURCE: LFXO + # Flasher parameters + MYNEWT_DOWNLOADER: nrfjprog + MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x0 + PYOCD_TARGET: nrf51 + JLINK_TARGET: nRF51422_xxAC + syscfg.vals.BLE_CONTROLLER: OS_CPUTIME_FREQ: 32768 OS_CPUTIME_TIMER_NUM: 3 diff --git a/hw/bsp/nordic_pca10028/bsp.yml b/hw/bsp/nordic_pca10028/bsp.yml index 9e0ee2e9fd..300ce73e5d 100644 --- a/hw/bsp/nordic_pca10028/bsp.yml +++ b/hw/bsp/nordic_pca10028/bsp.yml @@ -29,10 +29,8 @@ bsp.linkerscript.BOOT_LOADER.OVERWRITE: - "hw/bsp/nordic_pca10028/boot-nrf51xxac.ld" - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld" bsp.part2linkerscript: "hw/bsp/nordic_pca10028/split-nordic_pca10028.ld" -bsp.downloadscript: "hw/bsp/nordic_pca10028/nordic_pca10028_download.sh" +bsp.downloadscript: "hw/scripts/download.sh" bsp.debugscript: "hw/bsp/nordic_pca10028/nordic_pca10028_debug.sh" -bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/nordic_pca10028/nordic_pca10028_download.cmd" -bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/nordic_pca10028/nordic_pca10028_debug.cmd" bsp.flash_map: areas: diff --git a/hw/bsp/nordic_pca10028/nordic_pca10028_download.cmd b/hw/bsp/nordic_pca10028/nordic_pca10028_download.cmd deleted file mode 100755 index 96f0b26050..0000000000 --- a/hw/bsp/nordic_pca10028/nordic_pca10028_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/nordic_pca10028/nordic_pca10028_download.sh b/hw/bsp/nordic_pca10028/nordic_pca10028_download.sh deleted file mode 100755 index 3e552e2256..0000000000 --- a/hw/bsp/nordic_pca10028/nordic_pca10028_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/jlink.sh - -if [ "$MFG_IMAGE" ]; then - FLASH_OFFSET=0x0 -fi - -JLINK_DEV="nRF51422_xxAC" - -common_file_to_load -jlink_load diff --git a/hw/bsp/nordic_pca10028/pkg.yml b/hw/bsp/nordic_pca10028/pkg.yml index e45fd41795..036faa4b85 100644 --- a/hw/bsp/nordic_pca10028/pkg.yml +++ b/hw/bsp/nordic_pca10028/pkg.yml @@ -35,6 +35,7 @@ pkg.cflags: pkg.deps: - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx" - "@apache-mynewt-core/libc" + - "@apache-mynewt-core/hw/scripts" pkg.deps.UART_0: - "@apache-mynewt-core/hw/drivers/uart/uart_hal" diff --git a/hw/bsp/nordic_pca10028/syscfg.yml b/hw/bsp/nordic_pca10028/syscfg.yml index bc21685cee..15e03bbc06 100644 --- a/hw/bsp/nordic_pca10028/syscfg.yml +++ b/hw/bsp/nordic_pca10028/syscfg.yml @@ -124,6 +124,12 @@ syscfg.vals: MCU_DCDC_ENABLED: 1 MCU_LFCLK_SOURCE: LFXO + # Flasher parameters + MYNEWT_DOWNLOADER: nrfjprog + MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x0 + PYOCD_TARGET: nrf51 + JLINK_TARGET: nRF51422_xxAC + syscfg.vals.BLE_CONTROLLER: OS_CPUTIME_FREQ: 32768 OS_CPUTIME_TIMER_NUM: 3