View previous topic :: View next topic |
Author |
Message |
laser_scientist
Joined: 26 Jun 2013 Posts: 7
|
Program memory size issue on 18F14K50? |
Posted: Wed Jun 26, 2013 12:10 pm |
|
|
Hi,
I have been running into an Out of ROM issue with the 18F14K50, and I finally figured out that the compiler seems to think the memory goes up to 0x3CBF, rather than 0x3FFF. I verified this by doing a getenv("PROGRAM_MEMORY"), which returns 0x3CC0. Any ideas why it won't recognize the last 832 bytes?
I seem to be able to put #rom blocks in that area, but the compiler won't put any code there.
I'm using version 4.119
Thanks,
Dan |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Jun 26, 2013 1:20 pm |
|
|
You are undoubtedly compiling with Debug mode selected. In MPLAB
either Debug or Release mode is selected in a dropdown box at the top of
the MPLAB window.
What programmer are you using ? Different programmers will reserve
different amounts of Program Memory at the end of the PIC (when Debug
mode is selected).
To avoid having that area be reserved, change it to compile in Release mode.
Additional notes on the MPLAB Debug/Release mode dropdown box:
http://www.ccsinfo.com/forum/viewtopic.php?t=50053&start=4 |
|
|
laser_scientist
Joined: 26 Jun 2013 Posts: 7
|
|
Posted: Wed Jun 26, 2013 1:42 pm |
|
|
That was absolutely right, and it fixed the problem immediately! Thank you.
To answer your question, I am using the PICKit2, which appears to reserve about 5% of the (16K) memory on the 18F14K50 in Debug mode.
Best regards,
Dan |
|
|
|