aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2015-09-23 19:12:48 -0500
committerDavid Barksdale <amatus@amatus.name>2015-09-23 19:12:48 -0500
commitfc99e37100f93f69392777265cc2287a4d5c6bb1 (patch)
tree04ad4e555a6dc1b8c261747b4247a02afd802ee2
parent493de2a81baf2bf307d96dcff7689846f6d7ff4f (diff)
How to build
I documented the steps I took to build the hello_world example and load it into flash.
-rw-r--r--laser-tag software/howto build20
-rw-r--r--laser-tag software/openocd.cfg3
2 files changed, 23 insertions, 0 deletions
diff --git a/laser-tag software/howto build b/laser-tag software/howto build
new file mode 100644
index 0000000..9ecf74b
--- /dev/null
+++ b/laser-tag software/howto build
@@ -0,0 +1,20 @@
+This is how I got hello_world building on my Ubuntu box.
+0) apt-get install cmake gcc-arm-none-eabi
+1) Download the Freescale KSDK 1.2.0 Mainline for Linux tarball
+2) Read KSDK_1.2.0/doc/Getting Started with Kinetis SDK (KSDK) v.1.2.pdf
+3) export ARMGCC_DIR=/usr
+ cd KSDK_1.2.0/lib/ksdk_platform_lib/armgcc/KL27Z4
+ ./build_debug.sh
+4) cd KSDK_1.2.0/examples/frdmkl27z/demo_apps/hello_world/armgcc
+ cp CMakeLists.txt CMakeLists.txt.orig
+ sed -i 's/KL27Z644/KL27Z4/g' CMakeLists.txt
+ sed -i 's/MKL27Z64/MKL27Z256/g' CMakeLists.txt
+ ./build_debug.sh
+5) openocd
+ in another terminal:
+ telnet localhost 4444
+ reset halt
+6) in another terminal:
+ gdb-multiarch -x gdb.init path/to/hello_world.elf
+ gdb) load
+ gdb) monitor reset
diff --git a/laser-tag software/openocd.cfg b/laser-tag software/openocd.cfg
index 06f921a..dc381b5 100644
--- a/laser-tag software/openocd.cfg
+++ b/laser-tag software/openocd.cfg
@@ -2,3 +2,6 @@ source [find interface/ftdi/dp_busblaster_kt-link.cfg]
transport select swd
set CHIPNAME kl27
source [find target/klx.cfg]
+$_TARGETNAME configure -event reset-init {
+ adapter_khz 1000
+}