From f508189682b6fba62e08feeb1596f682bad5fff9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Feb 2010 18:42:24 +0000 Subject: Added KDE3 version of PikLab git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1095639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- test/pic30/standalone_test.s | 19 ++++++++ test/pic30/standalone_test_c.c | 18 +++++++ test/pic30/test.piklab | 27 +++++++++++ test/pic30/test.s | 19 ++++++++ test/pic30/test_c.c | 22 +++++++++ test/pic30/test_c.piklab | 103 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 208 insertions(+) create mode 100644 test/pic30/standalone_test.s create mode 100644 test/pic30/standalone_test_c.c create mode 100644 test/pic30/test.piklab create mode 100644 test/pic30/test.s create mode 100644 test/pic30/test_c.c create mode 100644 test/pic30/test_c.piklab (limited to 'test/pic30') diff --git a/test/pic30/standalone_test.s b/test/pic30/standalone_test.s new file mode 100644 index 0000000..98a8d5c --- /dev/null +++ b/test/pic30/standalone_test.s @@ -0,0 +1,19 @@ + .title " Sample dsPIC Assembler Source Code" + .sbttl " For illustration only." + ; dsPIC registers + .equ CORCONL, CORCON + .equ PSV,2 + .section .const,psv +hello: + .ascii "Hello world!\n\0" + .text + .global __reset +__reset: + ; set PSVPAG to page that contains 'hello' + mov #psvpage(hello),w0 + mov w0,PSVPAG + ; enable Program Space Visibility + bset.b CORCONL,#PSV + ; make a pointer to 'hello' + mov #psvoffset(hello),w0 + .end diff --git a/test/pic30/standalone_test_c.c b/test/pic30/standalone_test_c.c new file mode 100644 index 0000000..9e9be37 --- /dev/null +++ b/test/pic30/standalone_test_c.c @@ -0,0 +1,18 @@ +//#include + +int main(void); +unsigned int Add(unsigned int a, unsigned int b); +unsigned int x, y, z; + +int main(void) +{ + x = 2; + y = 5; + z = Add(x,y); + return 0; +} + +unsigned int Add(unsigned int a, unsigned int b) +{ + return(a+b); +} diff --git a/test/pic30/test.piklab b/test/pic30/test.piklab new file mode 100644 index 0000000..9ec721d --- /dev/null +++ b/test/pic30/test.piklab @@ -0,0 +1,27 @@ + + + + 30F6015 + + test.s + + + 0.1 + pic30 + + test.s + + + + $(SRCPATH) + + + + $(SRCPATH) + + + + + inhx32 + + diff --git a/test/pic30/test.s b/test/pic30/test.s new file mode 100644 index 0000000..98a8d5c --- /dev/null +++ b/test/pic30/test.s @@ -0,0 +1,19 @@ + .title " Sample dsPIC Assembler Source Code" + .sbttl " For illustration only." + ; dsPIC registers + .equ CORCONL, CORCON + .equ PSV,2 + .section .const,psv +hello: + .ascii "Hello world!\n\0" + .text + .global __reset +__reset: + ; set PSVPAG to page that contains 'hello' + mov #psvpage(hello),w0 + mov w0,PSVPAG + ; enable Program Space Visibility + bset.b CORCONL,#PSV + ; make a pointer to 'hello' + mov #psvoffset(hello),w0 + .end diff --git a/test/pic30/test_c.c b/test/pic30/test_c.c new file mode 100644 index 0000000..5205e53 --- /dev/null +++ b/test/pic30/test_c.c @@ -0,0 +1,22 @@ +#include +_FOSC(XT_PLL16 & FRC & CSW_FSCM_OFF); +_FWDT(WDTPSB_16 & WDTPSA_512 & WDT_OFF); +_FBORPOR(PWRT_64 & BORV_20 & PBOR_ON & MCLR_EN); +//_FGS(CODE_PROT_ON); + +void delay(void); + +int main (void) +{ +int i = 0xFFFF; + +for (;;) { + delay(); +} +} + +void delay() +{ +int i; +for (i = 0; i < 0xFFFF; i++) {;} +} diff --git a/test/pic30/test_c.piklab b/test/pic30/test_c.piklab new file mode 100644 index 0000000..0985934 --- /dev/null +++ b/test/pic30/test_c.piklab @@ -0,0 +1,103 @@ + + + + 30F3010 + + test_c.c + test.s + libp30F3010-coff.a + + + 0.1 + pic30 + + false + + test_c.c + + + + + + + + 0 + + + false + + --ERRFORMAT + --WARNFORMAT + --MSGFORMAT + --CHIP=%DEVICE + --IDE=mplab + -Q + -C + --ASMLIST + -I$(SRCPATH) + %I + -D + + + $(SRCPATH) + + + + inhx32 + + + inhx32 + + false + + /k%LKR_PATH + %LKR_NAME + /l + /o%COFF + /m%MAP + %OBJS + %LIBS + + + $(SRCPATH) + + + + + false + 0 + + -S + $NO_AUTO_DEVICE(-mcpu=%DEVICE) + -I/home/nicolas/wine/Program Files/Microchip/MPLAB C30/support/h/ + -g + %I + + + $(SRCPATH) + + + + false + + + %I + + + + false + + + -rc + %O + %LIBS + %OBJS + + + + + file:///home/nicolas/prog/trunk/piklab/test/pic30/test.s,9 + file:///home/nicolas/prog/trunk/piklab/test/pic30/test_c.c,1 + + + -- cgit v1.2.1