Boa tarde pessoal,
Estou a seguir o curso de microcontroladores PIC do asena mas estou com algumas dificuldades em executar os exemplos de assembly.
Estou a utilizar o MPLAB X IDE V.205 e no primeiro exemplo prático "Registo temporário W" com o seguinte código:
processor 16F886 ;configura o tipo de CPU usado
radix hex ;pre-definicao do tipo de valores numericos usados
;------------------------
inicio
movlw 0x0F ;carrega W com o valor 0x0F
movlw 0x0A ;carrega W com o valor 0x0A
movlw 0x0D ;carrega W com o valor 0x0D
movlw 0x04 ;carrega W com o valor 0x04
movlw 0x33 ;carrega W com o valor 0x33
goto inicio
;------------------------
end
e obtenho os erros:
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/zeze/MPLABXProjects/Projecto2.1.X'
make -f nbproject/Makefile-default.mk dist/default/production/Projecto2.1.X.production.hex
make[2]: Entering directory `C:/Users/zeze/MPLABXProjects/Projecto2.1.X'
make[2]: *** [build/default/production/registow.o] Error 1
make[1]: *** [.build-conf] Error 2
"C:\Program Files\Microchip\MPLABX\mpasmx\mpasmx.exe" -q -p16f886 -l"build/default/production/registow.lst" -e"build/default/production/registow.err" -o"build/default/production/registow.o" "registow.asm"
make: *** [.build-impl] Error 2
Error[150] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 18 : Labels must be defined in a code or data section when making an object file
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 20 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 22 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 24 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 26 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 28 : Executable code and data must be defined in an appropriate section
Error[151] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 30 : Operand contains unresolvable labels or is too complex
Error[152] C:\USERS\ZEZE\MPLABXPROJECTS\PROJECTO2.1.X\REGISTOW.ASM 30 : Executable code and data must be defined in an appropriate section
make[2]: Leaving directory `C:/Users/zeze/MPLABXProjects/Projecto2.1.X'
make[1]: Leaving directory `C:/Users/zeze/MPLABXProjects/Projecto2.1.X'
BUILD FAILED (exit value 2, total time: 1s)
Também experimentei outros exemplos e também não correm, referem sempre o erro 150, apenas consegui correr o "primeiro programa" da página 247 mas tive que acrescentar um _config1, no __config. Como não tenho nenhuma experiência em Assembly está muito difícil encontrar uma solução para este problema será que alguém me pode ajudar?
Desde já muito obrigado!