diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-06 12:14:52 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-06 12:14:52 +0000 |
commit | 5ec6a48a4b8c1d5b3ec0eea61d3ea30a1e1d5469 (patch) | |
tree | cc76cdb498e5bd313933c7946366636d3def116b /testing/examples/cortex/test.c | |
parent | 7fd9ba22ba2faefc2b6cadeb7c26c23981458339 (diff) | |
download | openocd_libswd-5ec6a48a4b8c1d5b3ec0eea61d3ea30a1e1d5469.tar.gz openocd_libswd-5ec6a48a4b8c1d5b3ec0eea61d3ea30a1e1d5469.tar.bz2 openocd_libswd-5ec6a48a4b8c1d5b3ec0eea61d3ea30a1e1d5469.tar.xz openocd_libswd-5ec6a48a4b8c1d5b3ec0eea61d3ea30a1e1d5469.zip |
basic smoketest on lm3s3748.elf
git-svn-id: svn://svn.berlios.de/openocd/trunk@1020 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'testing/examples/cortex/test.c')
-rw-r--r-- | testing/examples/cortex/test.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/examples/cortex/test.c b/testing/examples/cortex/test.c new file mode 100644 index 00000000..7e0c303f --- /dev/null +++ b/testing/examples/cortex/test.c @@ -0,0 +1,27 @@ +/* simple app. + +modify test.ld to change address. + +Even if the app is position independent, the symbols +need to match to test basic debugging. + +To load the app to 0x20000000 in GDB, use: + +load a.out +monitor reg sp 0x20004000 +monitor reg pc 0x20002000 +stepi + +arm-elf-gcc -mthumb -mcpu=cortex-m3 -nostdlib -Ttest.ld test.c + + +*/ +int j; +void _start() +{ + int i; + for (i=0; i<1000; i++) + { + j++; + } +} |