image

Ana içeriğe git
Konu: pic16f628a derleme sorunu (137 Kez okunmuş)

pic16f628a derleme sorunu

İyi günler
 Assembly diliyle pic16f628a mikrodenetleyicisini programlamayı öğreniyorum. Mikrodenetleyici ve Pic Programlama kitabında olan örnekleri  Mplab programında yazarak denediğim de  derleme işleminin sonucu  hata veriyor. Bu derleme sorunu yazdığım diğer programlarda da kendini gösteriyor.Yardımcı olursanız sevinirim.
Yazdığım kodlar ve derleme sonucu aşağıdadır.
Kod: [Seç]
;======PROG6.ASM====BOLUM7===SYF:116
LIST P=16F628A
INCLUDE "P16F628A.INC"
__CONFIG _XT_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_ON & _BODEN_OFF & _LVP_OFF & _CPD_OFF & _CP_OFF
;------------------------------------------------------------------------------------------------
SAYAC1 EQU h'20'
SAYAC2 EQU h'21'
BANKSEL TRISB
CLRF TRISB
MOVLW h'FF'
MOVWF TRISA
BANKSEL PORTB
MOVLW h'07'
MOVWF CMCON
CLRF PORTB

BASLA
MOVLW h'0A'
MOVWF SAYAC1
TEST
BTFSC PORTA,0
GOTO TEST
MOVLW h'FF'
MOVWF SAYAC2
GECIKME
NOP
NOP
NOP
DECFSZ SAYAC2,F
GOTO GECIKME
AZALT
DECFSZ SAYAC1,F
GOTO YAK
GOTO BASLA
YAK
MOVF SAYAC1,W
MOVWF PORTB
GOTO TEST
END

derleme sonucu:

Kod: [Seç]
----------------------------------------------------------------------
Debug build of project `C:\Users\asus\Desktop\pic uygulama\KitapProgramlar1\prog6.mcp' started.
Language tool versions: MPASMWIN.exe v5.50, mplink.exe v4.48, mplib.exe v4.48
Preprocessor symbol `__DEBUG' is defined.
Mon Jul 09 18:38:33 2018
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628A "prog6.asm" /l"prog6.lst" /e"prog6.err" /o"prog6.o" /d__DEBUG=1
Warning[205] C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 2 : Found directive in column 1. (LIST)
Warning[205] C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 3 : Found directive in column 1. (INCLUDE)
Warning[205] C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 4 : Found directive in column 1. (__CONFIG)
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 8 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 8 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 9 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 9 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 10 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 11 : Register in operand not in bank 0.  Ensure that bank bits are correct.
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 11 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 13 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 14 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 15 : Executable code and data must be defined in an appropriate section
Error[150]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 17 : Labels must be defined in a code or data section when making an object file
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 18 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 19 : Executable code and data must be defined in an appropriate section
Error[150]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 20 : Labels must be defined in a code or data section when making an object file
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 21 : Executable code and data must be defined in an appropriate section
Error[151]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 22 : Operand contains unresolvable labels or is too complex
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 22 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 23 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 24 : Executable code and data must be defined in an appropriate section
Error[150]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 25 : Labels must be defined in a code or data section when making an object file
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 26 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 27 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 28 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 29 : Executable code and data must be defined in an appropriate section
Error[151]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 30 : Operand contains unresolvable labels or is too complex
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 30 : Executable code and data must be defined in an appropriate section
Error[150]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 31 : Labels must be defined in a code or data section when making an object file
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 32 : Executable code and data must be defined in an appropriate section
Error[151]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 33 : Operand contains unresolvable labels or is too complex
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 33 : Executable code and data must be defined in an appropriate section
Error[151]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 34 : Operand contains unresolvable labels or is too complex
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 34 : Executable code and data must be defined in an appropriate section
Error[150]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 35 : Labels must be defined in a code or data section when making an object file
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 36 : Executable code and data must be defined in an appropriate section
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 37 : Executable code and data must be defined in an appropriate section
Error[151]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 38 : Operand contains unresolvable labels or is too complex
Error[152]   C:\USERS\ASUS\DESKTOP\PIC UYGULAMA\KITAPPROGRAMLAR1\PROG6.ASM 38 : Executable code and data must be defined in an appropriate section
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Users\asus\Desktop\pic uygulama\KitapProgramlar1\prog6.mcp' failed.
Language tool versions: MPASMWIN.exe v5.50, mplink.exe v4.48, mplib.exe v4.48
Preprocessor symbol `__DEBUG' is defined.
Mon Jul 09 18:38:34 2018
----------------------------------------------------------------------
BUILD FAILED

Ynt: pic16f628a derleme sorunu

Yanıt #1
dosya yolu uzun olduğu için sorun olabiliyormuş   PIC UYGULAMA\KITAPPROGRAMLAR1  klasör isimlerini kısaltıp deneyin 

ayrıca  LIST P=16F628A  altına org  0x00  ekleyip deneyin

Umarım gelmez ilham perilerimin sonu... ! Modifiye uzmanı web üzerinde 320volt ile yaktı mumu.... Ben deli dolu biriyim.. ama şuan sadece doluyum....

Ynt: pic16f628a derleme sorunu

Yanıt #2
Birde 16F628A nın .INC dosyası , yazdığın kod doyası ile aynı klasörde olması gerekiyor.
BU DİYARLARA MERAK SALMIŞ , TAHSİLİNE DEVAM EDEN BİR GENÇ.

Ynt: pic16f628a derleme sorunu

Yanıt #3
mplabta proje oluşturmadan derleme yaptım.Sorun çözüldü proje oluşturup bu kodları yazdığımda neden bu sorunu veriyor çözemedim.