Error - section '.org_0' can not fit the absolute section

Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x0000020a

Got this problem, apparently it's because the linker can't find a section of memory large enough to fit the table I have. Anyone knows how to solve this?

Views: 108

Reply to This

Replies to This Discussion

s it the same problem as explained on page 7-86 of the textbook? And what does the "High TableEntries" and "Low TableEntries" mean in the sample code on that page?

 HIGH Table Entries i'm assuming is the high bits of the address of TableEntries. And TableEntries is that thing where the data is (like the one on the table just above the code you're looking at)

so apparently PCL only knows the low bits. And the PCLATH thinks that the table is small. So this weird code will ensure that PCLATH knows where table actually is and stuff.

Throw org0x300 after your tables and before the rest of your code

 

Thanks, it worked

can u briefly explain why org 0x300 fix this problem? Thx!

Emami mentioned in lecture like the first 250 bytes after 0x004 is reserved for tables. So if your code starts at 0x300, you should be fine? Its a very hack-y solution. Not completely sure why it works

RSS

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service