From 97db27723d89d5357f05e25a309f5b05e1eff5d3 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 10 Nov 2016 16:40:50 +0100 Subject: [PATCH] nrf5-zephyr: add flash_nrf51_pca10028.sh and flash_nrf52_pca10040 --- port/nrf5-zephyr/create_examples.py | 8 +++----- port/nrf5-zephyr/flash_nrf51_pca10028.sh | 4 ++++ port/nrf5-zephyr/flash_nrf52_pca10040.sh | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 port/nrf5-zephyr/flash_nrf51_pca10028.sh create mode 100755 port/nrf5-zephyr/flash_nrf52_pca10040.sh diff --git a/port/nrf5-zephyr/create_examples.py b/port/nrf5-zephyr/create_examples.py index 79f7f90f8..cd7a09d32 100755 --- a/port/nrf5-zephyr/create_examples.py +++ b/port/nrf5-zephyr/create_examples.py @@ -72,11 +72,9 @@ for file in os.listdir(examples_embedded): if not os.path.exists(apps_folder): os.makedirs(apps_folder) - # copy nrf5.conf - shutil.copyfile(script_path + '/nrf5.conf', apps_folder + '/nrf5.conf') - - # copy Makefile - shutil.copyfile(script_path + '/Makefile', apps_folder + 'Makefile') + # copy files + for item in ['nrf5.conf', 'flash_nrf51_pca10028.sh', 'flash_nrf52_pca10040.sh', 'Makefile']: + shutil.copyfile(script_path + '/' + item, apps_folder + '/' + item) # create src folder src_folder = apps_folder + "src/" diff --git a/port/nrf5-zephyr/flash_nrf51_pca10028.sh b/port/nrf5-zephyr/flash_nrf51_pca10028.sh new file mode 100755 index 000000000..d51907f9a --- /dev/null +++ b/port/nrf5-zephyr/flash_nrf51_pca10028.sh @@ -0,0 +1,4 @@ +#!/bin/sh +nrfjprog --eraseall -f nrf51 +nrfjprog --program outdir/nrf51_pca10028/zephyr.hex -f nrf51 +nrfjprog --reset -f nrf51 diff --git a/port/nrf5-zephyr/flash_nrf52_pca10040.sh b/port/nrf5-zephyr/flash_nrf52_pca10040.sh new file mode 100755 index 000000000..cc2014536 --- /dev/null +++ b/port/nrf5-zephyr/flash_nrf52_pca10040.sh @@ -0,0 +1,4 @@ +#!/bin/sh +nrfjprog --eraseall -f nrf52 +nrfjprog --program outdir/nrf52_pca10040/zephyr.hex -f nrf52 +nrfjprog --reset -f nrf52