Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC10F200 - DS command error

Status
Not open for further replies.

Bruno8124

New Member
Hi,
I am learning PIC microcontrollers from tutorials on CircuitBread for PIC10F200. Recently I wanted to simulate design in MPLAB X IDE 5.50 from this example: https://www.circuitbread.com/tutorials/pwm-led-dimming-part-7-microcontroller-basics-pic10f200 (at the bottom of the page are design files to download: XC8-PIC-Assembler-Creating-a-PWM-in-Assembly-Part-7-Microcontroller-Basics-PIC10F200.zip). In those tutorials variables are defined using EQU, but in MPLAB 5.50 EQU does not provide ability to view variables during debug mode. That is why I have changed EQU to DS. That is a declaration from tutorial:
i EQU 010h ;define 0x10 register as the PWM loop variable limit EQU 011h ;define 0x11 register as the PWM limit j EQU 012h ;define 0x12 register as the delay variable dir EQU 013h

That is my declaration:
i: DS 1 j: DS 1 limit: DS 1 dir: DS 1

Unfortunately i got those errors:
make[2]: *** [dist/default/production/PWM_test.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
main.s:40:: error: (1356) fixup overflow referencing psect code (0xFE) into 1 byte at 0x4/0x2 -> 0x2 (build/default/production/main.o 21/0x4)
main.s:41:: error: (1356) fixup overflow referencing psect code (0xFF) into 1 byte at 0x6/0x2 -> 0x3 (build/default/production/main.o 21/0x6)
main.s:44:: error: (1356) fixup overflow referencing psect code (0xFC) into 1 byte at 0xA/0x2 -> 0x5 (build/default/production/main.o 21/0xA)
main.s:47:: error: (1356) fixup overflow referencing psect code (0xFE) into 1 byte at 0xE/0x2 -> 0x7 (build/default/production/main.o 21/0xE)
main.s:48:: error: (1356) fixup overflow referencing psect code (0xFC) into 1 byte at 0x10/0x2 -> 0x8 (build/default/production/main.o 21/0x10)
main.s:53:: error: (1356) fixup overflow referencing psect code (0xFC) into 1 byte at 0x1A/0x2 -> 0xD (build/default/production/main.o 21/0x1A)
main.s:55:: error: (1356) fixup overflow referencing psect code (0xFF) into 1 byte at 0x1E/0x2 -> 0xF (build/default/production/main.o 21/0x1E)
main.s:57:: error: (1356) fixup overflow referencing psect code (0xFE) into 1 byte at 0x22/0x2 -> 0x11 (build/default/production/main.o 21/0x22)
main.s:61:: error: (1356) fixup overflow referencing psect code (0xFE) into 1 byte at 0x28/0x2 -> 0x14 (build/default/production/main.o 21/0x28)
main.s:63:: error: (1356) fixup overflow referencing psect code (0xFE) into 1 byte at 0x2C/0x2 -> 0x16 (build/default/production/main.o 21/0x2C)
main.s:67:: error: (1356) fixup overflow referencing psect code (0xFF) into 1 byte at 0x32/0x2 -> 0x19 (build/default/production/main.o 21/0x32)
main.s:69:: error: (1356) fixup overflow referencing psect code (0xFF) into 1 byte at 0x36/0x2 -> 0x1B (build/default/production/main.o 21/0x36)
main.s:72:: error: (1356) fixup overflow referencing psect code (0xFF) into 1 byte at 0x3A/0x2 -> 0x1D (build/default/production/main.o 21/0x3A)
main.s:77:: error: (1356) fixup overflow referencing psect code (0xFD) into 1 byte at 0x40/0x2 -> 0x20 (build/default/production/main.o 21/0x40)
main.s:79:: error: (1356) fixup overflow referencing psect code (0xFD) into 1 byte at 0x42/0x2 -> 0x21 (build/default/production/main.o 21/0x42)
(908) exit status = 1
nbproject/Makefile-default.mk:126: recipe for target 'dist/default/production/PWM_test.production.hex' failed

I am using pic-as 2.32. I attached main files: main.txt - from my project and main_tutorial - from tutorial project. I have changed the extensions from .s to .txt to be able to attach the files. How can I deal with those errors? Thanks in advance.
 

Attachments

  • main_tutorial.txt
    2.8 KB · Views: 83
  • main.txt
    2.2 KB · Views: 60

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
If you are using EQU you can set an address in the watch window... Then name it and watch it...

I don't remember seeing a DS in XC assembler... I have used XC asm within MPLABX but I still prefer MPASMWIN ( I use it with VSM )

I'll give it a go..
 

rjenkinsgb

Well-Known Member
Most Helpful Member
EQU does not provide ability to view variables during debug mode. That is why I have changed EQU to DS. That is a declaration from tutorial:
i EQU 010h ;define 0x10 register as the PWM loop variable limit EQU 011h ;define 0x11 register as the PWM limit j EQU 012h ;define 0x12 register as the delay variable dir EQU 013h

That is my declaration:
i: DS 1 j: DS 1 limit: DS 1 dir: DS 1

Those are not variables - the EQU is assigning a convenient name to an internal PIC register.

You CAN view registers during debug - go to Window > Target memory views > Special function registers
 

atferrari

Well-Known Member
Most Helpful Member
He is trying to go away, using pic-as 2.32, not MPASM.

I suspect that OP, has not selected pic-as in the tool chain.

And, as I suggested him in another forum, he should read the manual. Otherwise, it is going to be a long way.

select pic-as.png
 
Status
Not open for further replies.

Latest threads

Top