• AVR Freaks

Hot!error: (1356) fixup overflow referencing psect

Page: < 12 Showing page 2 of 2
Author
ric
Super Member
  • Total Posts : 24574
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: error: (1356) fixup overflow referencing psect 2019/06/20 21:13:48 (permalink)
0
It appears forcing the switch from #asm to asm() has had a number of unforeseen ramifications...
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#21
mad_c
Super Member
  • Total Posts : 1206
  • Reward points : 0
  • Joined: 2010/12/12 17:48:27
  • Location: Brisbane, Australia
  • Status: offline
Re: error: (1356) fixup overflow referencing psect 2019/06/20 21:34:15 (permalink)
0
1and0
Just curious, what was the reason behind requiring the programmer to manually mask the address of the file register?  How does BANKMASK() perform bank check?

BANKMASK does not perform any check, but as I said, you could implement a check if you wanted to. If you wrote assembly that assumed an object defined in C code was in bank 1, for example, in assembly you could XOR the symbol with a mask (for example 0x100 on PIC18 devices) that would allow the code to compile fine if the symbol was indeed in bank 1, but give a fixup error if it was accidentally located in any other bank.

Including the <xc.inc> file allows usage of bit symbols in the assembly code. It works with the #asm/#endasm syntax and I was expecting it to work with asm("") too, but sadly it does not appear to.

Oh, I see what you're doing. No, the asm() form will not like that. I'm not sure how easy that would be to change. It's a good reason to try and write seperate assembly modules if you can.
 
Jeff.
#22
1and0
Access is Denied
  • Total Posts : 9982
  • Reward points : 0
  • Joined: 2007/05/06 12:03:20
  • Location: Harry's Gray Matter
  • Status: offline
Re: error: (1356) fixup overflow referencing psect 2019/06/21 03:33:32 (permalink)
0
mad_c
BANKMASK does not perform any check, but as I said, you could implement a check if you wanted to. If you wrote assembly that assumed an object defined in C code was in bank 1, for example, in assembly you could XOR the symbol with a mask (for example 0x100 on PIC18 devices) that would allow the code to compile fine if the symbol was indeed in bank 1, but give a fixup error if it was accidentally located in any other bank.

Then what do you meant by the following quote?
mad_c
It [fixing this fixup error and getting rid of the need for BANKMASK()] would also prevent any sort of bank check you wanted to implement in assembly.

#23
mad_c
Super Member
  • Total Posts : 1206
  • Reward points : 0
  • Joined: 2010/12/12 17:48:27
  • Location: Brisbane, Australia
  • Status: offline
Re: error: (1356) fixup overflow referencing psect 2019/06/23 13:18:53 (permalink)
+1 (1)
1and0
Then what do you meant by the following quote?
mad_c
It [fixing this fixup error and getting rid of the need for BANKMASK()] would also prevent any sort of bank check you wanted to implement in assembly.
 


My Comment was merely that if the assembler ignored any bits of the address that were outside the range of the instruction, this could limit the code you could write, such as the bank check trick I suggested.
 
Jeff.
#24
Page: < 12 Showing page 2 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5