summaryrefslogtreecommitdiffstats
path: root/test/gputils/project
diff options
context:
space:
mode:
Diffstat (limited to 'test/gputils/project')
-rw-r--r--test/gputils/project/test.asm60
-rw-r--r--test/gputils/project/test.inc1
-rw-r--r--test/gputils/project/test.libbin0 -> 1986 bytes
-rw-r--r--test/gputils/project/test2.asm6
-rw-r--r--test/gputils/project/test_project.piklab52
-rw-r--r--test/gputils/project/test_project.pikprj20
6 files changed, 139 insertions, 0 deletions
diff --git a/test/gputils/project/test.asm b/test/gputils/project/test.asm
new file mode 100644
index 0000000..e4fcbe8
--- /dev/null
+++ b/test/gputils/project/test.asm
@@ -0,0 +1,60 @@
+; list p=16f877
+ #include <p16f871.inc>
+ #include <test.inc>
+
+ __CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_ENABLE_ON & _LVP_ON & _CPD_OFF
+
+;**********************************************************************
+BANK0 = 0x0
+BANK1 = 0x80
+BANK2 = 0x100
+BANK3 = 0x180
+
+;**********************************************************************
+INT_VAR UDATA_SHR
+w_saved RES 1 ; variable used for context saving
+status_saved RES 1 ; variable used for context saving
+
+TEMP_VAR UDATA_SHR 0x20
+index RES 1
+
+;**********************************************************************
+STARTUP CODE ; processor reset vector
+ nop ; for debugger
+ movlw high start ; load upper byte of 'start' label
+ movwf PCLATH ; initialize PCLATH
+ goto start ; go to beginning of program
+
+;**********************************************************************
+INT_VECTOR CODE 0x0004 ; interrupt vector location
+ movwf w_saved
+ movfw STATUS
+ movwf status_saved
+
+ bcf INTCON,2 ; reset TMR0 interrupt flag
+ bsf PORTB,0
+
+ movfw status_saved
+ movwf STATUS
+ swapf w_saved,f
+ swapf w_saved,w
+ retfie ; return from interrupt
+
+;**********************************************************************
+MAIN CODE
+start
+; initialize microchip
+ clrf TMR0 ^ BANK0
+ clrf INTCON ^ BANK0
+ banksel TRISA ; bank 1
+ movlw B'11010100' ; set prescaler at 32 (32768 Hz / 4 / 256 / 32 = 1 Hz)
+ movwf OPTION_REG ^ BANK1 ; and start TMR0 (internal source clock)
+ movlw B'00000110' ; set PORTA and PORTE to be all digital
+ movwf ADCON1 ^ BANK1
+ banksel INTCON ; back to bank 0
+ bsf INTCON,T0IE ; enable TMR0 interrupt
+ bsf INTCON,GIE ; enable all interrupts
+
+ nop
+
+ END ; directive 'end of program'
diff --git a/test/gputils/project/test.inc b/test/gputils/project/test.inc
new file mode 100644
index 0000000..e956bd9
--- /dev/null
+++ b/test/gputils/project/test.inc
@@ -0,0 +1 @@
+; empty
diff --git a/test/gputils/project/test.lib b/test/gputils/project/test.lib
new file mode 100644
index 0000000..d0050e3
--- /dev/null
+++ b/test/gputils/project/test.lib
Binary files differ
diff --git a/test/gputils/project/test2.asm b/test/gputils/project/test2.asm
new file mode 100644
index 0000000..6a9ed66
--- /dev/null
+++ b/test/gputils/project/test2.asm
@@ -0,0 +1,6 @@
+MAIN CODE
+
+; loop forever
+ goto $
+ END ; directive 'end of program'
+
diff --git a/test/gputils/project/test_project.piklab b/test/gputils/project/test_project.piklab
new file mode 100644
index 0000000..2a26260
--- /dev/null
+++ b/test/gputils/project/test_project.piklab
@@ -0,0 +1,52 @@
+<!DOCTYPE piklab>
+<piklab>
+ <general>
+ <files>
+ <item>test.asm</item>
+ <item>test.lib</item>
+ <item>test2.asm</item>
+ </files>
+ <version>0.2</version>
+ <description/>
+ <device>16F871</device>
+ <tool>gputils</tool>
+ <opened_files>
+ <item>test.asm</item>
+ <item>test2.asm</item>
+ </opened_files>
+ </general>
+ <assembler>
+ <warning_level>0</warning_level>
+ <custom_options/>
+ <has_custom_arguments>false</has_custom_arguments>
+ <custom_arguments>
+ <item>-c</item>
+ <item>-I$(SRCPATH)</item>
+ <item>-p%DEVICE</item>
+ <item>-w0</item>
+ <item>%I</item>
+ </custom_arguments>
+ <includes>
+ <item>$(SRCPATH)</item>
+ </includes>
+ </assembler>
+ <linker>
+ <format>inhx32</format>
+ <custom_options/>
+ <has_custom_arguments>false</has_custom_arguments>
+ <custom_arguments>
+ <item>-o%O</item>
+ <item>-c</item>
+ <item>-ainhx32</item>
+ <item>-m</item>
+ <item>-I$(SRCPATH)</item>
+ <item>$LKR(-s%LKR)</item>
+ <item>%OBJS</item>
+ <item>%LIBS</item>
+ </custom_arguments>
+ </linker>
+ <compiler>
+ <includes>$(SRCPATH)</includes>
+ <custom_options/>
+ </compiler>
+</piklab>
diff --git a/test/gputils/project/test_project.pikprj b/test/gputils/project/test_project.pikprj
new file mode 100644
index 0000000..341ea8d
--- /dev/null
+++ b/test/gputils/project/test_project.pikprj
@@ -0,0 +1,20 @@
+[Assembler]
+include-dir=
+other-options=
+radix=dec
+target-device=16F871
+warn-level=0
+
+[Files]
+inputFiles=test.asm,test2.asm,test.lib
+
+[General]
+description=
+output=test_project.hex
+version=0.1
+
+[Linker]
+debug=false
+hex-format=inhx32
+objs-libs-dir=
+other-options=