summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-12 09:03:16 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-12 09:03:16 +0000
commit3a59ff8bda2c1c1bba36edc2c217de7d1c224d17 (patch)
tree35f563b6f9274e829e8aefa6b0a22fdbc0aec7b2 /testing
parentded28546f84eb39a8a89994ddc7b026a460d6381 (diff)
downloadopenocd+libswd-3a59ff8bda2c1c1bba36edc2c217de7d1c224d17.tar.gz
openocd+libswd-3a59ff8bda2c1c1bba36edc2c217de7d1c224d17.tar.bz2
openocd+libswd-3a59ff8bda2c1c1bba36edc2c217de7d1c224d17.tar.xz
openocd+libswd-3a59ff8bda2c1c1bba36edc2c217de7d1c224d17.zip
Laurentiu Cocanu - blinking led app for PIC32.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1157 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'testing')
-rw-r--r--testing/examples/PIC32/BlinkingLeds.c23
-rw-r--r--testing/examples/PIC32/BlinkingLeds.elfbin0 -> 770014 bytes
-rw-r--r--testing/examples/PIC32/readme.txt4
3 files changed, 27 insertions, 0 deletions
diff --git a/testing/examples/PIC32/BlinkingLeds.c b/testing/examples/PIC32/BlinkingLeds.c
new file mode 100644
index 00000000..d1647c45
--- /dev/null
+++ b/testing/examples/PIC32/BlinkingLeds.c
@@ -0,0 +1,23 @@
+#include <plib.h>
+int main(void)
+{
+ int i;
+ mPORTDClearBits(BIT_0);
+ mPORTDSetPinsDigitalOut(BIT_0);
+ mPORTDClearBits(BIT_1);
+ mPORTDSetPinsDigitalOut(BIT_1);
+ mPORTDClearBits(BIT_2);
+ mPORTDSetPinsDigitalOut(BIT_2);
+
+ while(1)
+ {
+ for(i = 0; i < 500000; i++)
+ mPORTDToggleBits(BIT_0);
+ for(i = 0; i < 500000; i++)
+ mPORTDToggleBits(BIT_1);
+ for(i = 0; i < 500000; i++)
+ mPORTDToggleBits(BIT_2);
+ }
+
+ return 0;
+}
diff --git a/testing/examples/PIC32/BlinkingLeds.elf b/testing/examples/PIC32/BlinkingLeds.elf
new file mode 100644
index 00000000..593164ba
--- /dev/null
+++ b/testing/examples/PIC32/BlinkingLeds.elf
Binary files differ
diff --git a/testing/examples/PIC32/readme.txt b/testing/examples/PIC32/readme.txt
new file mode 100644
index 00000000..ca9573a5
--- /dev/null
+++ b/testing/examples/PIC32/readme.txt
@@ -0,0 +1,4 @@
+Here you'll find a simple example tested with PIC32 Starter kit (source code and .elf file). It will blink repeatedly the LEDs on the board.
+The program was compiled and written on the target using MPLAB IDE v 8.0 that comes with the kit because openocd is missing currently the ability
+to program the flash for this specific target. It is possible in the future this limitation to be removed.
+ \ No newline at end of file