Men det går inget vidare
Vad jag förstår så måste man skriva assemblern i relocatable mode, vilket jag testat på
PIC18F tidigare.. Så jag utgick från den koden..
Såhär ser min kod för 30F1010 ut,
Kod: Markera allt
;******************************************************************************
;
; Test av dsPIC30F1010.
;
;
;******************************************************************************
;
; Filnamn: dsPIC.s
; Date: 2008-09-14, 13:59
; File version: 1.0
;
; Author: Johan Olofsson
; Company: -
;
;******************************************************************************
;
; Genreal notes:
; -------------
;
; osc
;
;
;
;******************************************************************************
;
; Hardware/software notes:
; -----------------------
;
;
;
;******************************************************************************
.equ __30F1010, 1 ; Setting microkontroller type
.include "p30F1010.inc" ; Include-file with definitions
;******************************************************************************
; Setting fuses
config __FOSC, CSW_FSCM_OFF & FRC_HI_RANGE
config __FOSCSEL,FRC_PLL ; Initial oscillator group Selection
config __FWDT,WDT_OFF ; Watchdogtimer.
config __FPOR, PWRT_128 ; Power-ON reset.
config __FGS, CODE_PROT_OFF ; General Segment Program Flash Code protection
;******************************************************************************
RESET_VECTOR CODE 0x000 ; The processors reset vector
goto start ; Go to start of program
;******************************************************************************
START CODE
; Startup settings
start
nop
nop
nop
loop_forever ; Here the program ends, in a forever loop.
goto loop_forever
end
Vilket ger följande felmeddelande:
Kod: Markera allt
Executing: "C:\Program\Microchip\MPLAB ASM30 Suite\bin\pic30-as.exe" "dsPIC.s" -o"dsPIC.o" -p=30F1010 --defsym=__DEBUG=1 -g
dsPIC.s: Assembler messages:
dsPIC.s:50: Warning: Missing , assumed.
dsPIC.s:50: Warning: Missing , assumed.
dsPIC.s:50: Error: Too many operands ('reset_vector CODE 0x000').
dsPIC.s:55: Error: Invalid mnemonic: 'start'
dsPIC.s:57: Error: Invalid mnemonic: 'start'
dsPIC.s:69: Error: Invalid mnemonic: 'loop'
dsPIC.s:72: Error: Invalid mnemonic: 'end'
Halting build on first failure as requested.