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