mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-07-17 23:54:21 +10:00
Laurentiu Cocanu - blinking led app for PIC32.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1157 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
ded28546f8
commit
3a59ff8bda
23
testing/examples/PIC32/BlinkingLeds.c
Normal file
23
testing/examples/PIC32/BlinkingLeds.c
Normal file
@ -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;
|
||||
}
|
BIN
testing/examples/PIC32/BlinkingLeds.elf
Normal file
BIN
testing/examples/PIC32/BlinkingLeds.elf
Normal file
Binary file not shown.
4
testing/examples/PIC32/readme.txt
Normal file
4
testing/examples/PIC32/readme.txt
Normal file
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user