I really need help here ... any input or experienced opinion would be greatly appreciated.
I added quite a bit of code at the bottom of my current project, and when I tried to build it I got the following message from MPASM Assembler:
If my interpretation is correct, the problem lies with the fact that somehow the new code intersected the 0x1002 length boundary, which amounts to about 4kB ... and that seems to be a big no-no ... The chip I'm working with (PIC16LF1825), however, has 8kB of program memory available. So what I did was I added the ORG 0x10FF directive (and not simply 0x1007, so as to be on the safe side) to the beginning of my latest routine and the problem went away. The project was built perfectly.
What gives? Is this going to be a problem? Will I somehow have to watch out for crashes in logic? Is what I did the right thing to do in these circumstances? Is there a better way to allocate program memory space to each routine instead of allowing MAPSM to do that automatically?
I added quite a bit of code at the bottom of my current project, and when I tried to build it I got the following message from MPASM Assembler:
Error - section '.org_2' can not fit the absolute section. Section '.org_2' start=0x00000004, length=0x00001002
If my interpretation is correct, the problem lies with the fact that somehow the new code intersected the 0x1002 length boundary, which amounts to about 4kB ... and that seems to be a big no-no ... The chip I'm working with (PIC16LF1825), however, has 8kB of program memory available. So what I did was I added the ORG 0x10FF directive (and not simply 0x1007, so as to be on the safe side) to the beginning of my latest routine and the problem went away. The project was built perfectly.
What gives? Is this going to be a problem? Will I somehow have to watch out for crashes in logic? Is what I did the right thing to do in these circumstances? Is there a better way to allocate program memory space to each routine instead of allowing MAPSM to do that automatically?





