hw/bsp: bluepill add syscfg selectable download script
diff --git a/hw/bsp/bluepill/bluepill_debug.cmd b/hw/bsp/bluepill/bluepill_debug.cmd
deleted file mode 100755
index 96f0b26..0000000
--- a/hw/bsp/bluepill/bluepill_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/bluepill/bluepill_download.cmd b/hw/bsp/bluepill/bluepill_download.cmd
deleted file mode 100755
index 96f0b26..0000000
--- a/hw/bsp/bluepill/bluepill_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/bluepill/bsp.yml b/hw/bsp/bluepill/bsp.yml
index 52566d9..74334b1 100644
--- a/hw/bsp/bluepill/bsp.yml
+++ b/hw/bsp/bluepill/bsp.yml
@@ -29,10 +29,8 @@
 bsp.linkerscript.BOOT_LOADER.OVERWRITE:
     - 'hw/bsp/bluepill/boot-bluepill.ld'
     - '@apache-mynewt-core/hw/mcu/stm/stm32f1xx/stm32f103.ld'
-bsp.downloadscript: "hw/bsp/bluepill/bluepill_download.sh"
+bsp.downloadscript: "hw/scripts/download.sh"
 bsp.debugscript: "hw/bsp/bluepill/bluepill_debug.sh"
-bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/bluepill/bluepill_download.cmd"
-bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/bluepill/bluepill_debug.cmd"
 
 bsp.flash_map:
     areas:
@@ -65,4 +63,3 @@
             device: 0
             offset: 0x08006000
             size: 8kB
-
diff --git a/hw/bsp/bluepill/pkg.yml b/hw/bsp/bluepill/pkg.yml
index 81cd190..e896576 100644
--- a/hw/bsp/bluepill/pkg.yml
+++ b/hw/bsp/bluepill/pkg.yml
@@ -33,3 +33,4 @@
     - '@apache-mynewt-core/hw/mcu/stm/stm32f1xx'
     - '@apache-mynewt-core/kernel/os'
     - '@apache-mynewt-core/libc/baselibc'
+    - "@apache-mynewt-core/hw/scripts"
diff --git a/hw/bsp/bluepill/syscfg.yml b/hw/bsp/bluepill/syscfg.yml
index 0b83d06..1bb32bd 100644
--- a/hw/bsp/bluepill/syscfg.yml
+++ b/hw/bsp/bluepill/syscfg.yml
@@ -52,3 +52,10 @@
     TIMER_0_TIM: 'TIM2'
     TIMER_1_TIM: 'TIM3'
     TIMER_2_TIM: 'TIM4'
+
+    # Flasher parameters
+    MYNEWT_DOWNLOADER: openocd
+    MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET: 0x08000000
+    MYNEWT_DOWNLOADER_OPENOCD_CFG: 'repos/apache-mynewt-core/hw/bsp/bluepill/bluepill.cfg'
+    JLINK_TARGET: STM32F103C8
+    PYOCD_TARGET: stm32f103rc