Laurentiu Cocanu - blinking led app for PIC32.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 12 Nov 2008 09:03:16 +0000 (09:03 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 12 Nov 2008 09:03:16 +0000 (09:03 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1157 b42882b7-edfa-0310-969c-e2dbd0fdcd60

testing/examples/PIC32/BlinkingLeds.c [new file with mode: 0644]
testing/examples/PIC32/BlinkingLeds.elf [new file with mode: 0644]
testing/examples/PIC32/readme.txt [new file with mode: 0644]

diff --git a/testing/examples/PIC32/BlinkingLeds.c b/testing/examples/PIC32/BlinkingLeds.c
new file mode 100644 (file)
index 0000000..d1647c4
--- /dev/null
@@ -0,0 +1,23 @@
+#include <plib.h>\r
+int main(void)\r
+{\r
+       int i;\r
+       mPORTDClearBits(BIT_0);\r
+       mPORTDSetPinsDigitalOut(BIT_0);\r
+       mPORTDClearBits(BIT_1);\r
+       mPORTDSetPinsDigitalOut(BIT_1);\r
+       mPORTDClearBits(BIT_2);\r
+       mPORTDSetPinsDigitalOut(BIT_2);\r
+       \r
+       while(1)\r
+       {\r
+               for(i = 0; i < 500000; i++)\r
+                       mPORTDToggleBits(BIT_0);\r
+               for(i = 0; i < 500000; i++)\r
+                       mPORTDToggleBits(BIT_1);\r
+               for(i = 0; i < 500000; i++)\r
+                       mPORTDToggleBits(BIT_2);\r
+       }\r
+\r
+       return 0;\r
+}\r
diff --git a/testing/examples/PIC32/BlinkingLeds.elf b/testing/examples/PIC32/BlinkingLeds.elf
new file mode 100644 (file)
index 0000000..593164b
Binary files /dev/null and b/testing/examples/PIC32/BlinkingLeds.elf differ
diff --git a/testing/examples/PIC32/readme.txt b/testing/examples/PIC32/readme.txt
new file mode 100644 (file)
index 0000000..ca9573a
--- /dev/null
@@ -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.\r
+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 \r
+to program the flash for this specific target. It is possible in the future this limitation to be removed. \r
\ No newline at end of file