davidb 0 Posted April 14, 2008 Report Share Posted April 14, 2008 Hi all, I have been using Boost C with MPLAB IDE for the last few of my PIC projects (having previously used asm). For the bulk of the development I have used ICE2000 with a prototype board using DIL parts. I have been impressed with BoostC and its integration with MPLAB. Production PCBs use SM parts so I have been using the Microchip PICKit 2 programmer together with Debug Express for final development programming & debugging via an ICSP connector. PICKit 2 is a cheap and competent programmer/debugger (all though very limited compared to ICE2000) that also programs so much faster than my old PICStart Plus. This has worked well for several projects where RAM use was fairly minimal. The problem is that Debug Express reserves RAM, as well as some program memory, for its own use. e.g. on the 16F887 it reserves 0x070, 0x0f0, 0x165 to 0x170 inclusive and 0x1f0. (These are shown as RR in the MPLAB IDE file registers window). On larger projects requiring more RAM BoostC has no knowledge of these reserved locations and simply overwrites them. Is anybody using BoostC with PICKit 2 and Debug Express? Does anyone know the best way, if there is one, of reserving these or any other locations to prevent them being used by BoostC? Perhaps I am missing something simple. It would be nice if BoostC could automatically recognise that Debug Express was in use to prevent it overwriting reserved locations. Alternatively a command line switch would be very useful. Thanks Davidb Quote Link to post Share on other sites
Dave 0 Posted April 14, 2008 Report Share Posted April 14, 2008 The problem is that Debug Express reserves RAM, as well as some program memory, for its own use. e.g. on the 16F887 it reserves 0x070, 0x0f0, 0x165 to 0x170 inclusive and 0x1f0. (These are shown as RR in the MPLAB IDE file registers window). On larger projects requiring more RAM BoostC has no knowledge of these reserved locations and simply overwrites them. Does anyone know the best way, if there is one, of reserving these or any other locations to prevent them being used by BoostC? Declare fixed address variables at the locations you want to protect. BoostLink will work around any fixed address variables. Something like this would fit the bill: char reserved_0x070 @ 0x070; char reserved_0x0F0 @ 0x0F0; char reserved_0x165[ 11 ] @ 0x0165; char reserved_0x1F0 @ 0x1F0; Regards Dave Quote Link to post Share on other sites
davidb 0 Posted April 15, 2008 Author Report Share Posted April 15, 2008 The problem is that Debug Express reserves RAM, as well as some program memory, for its own use. e.g. on the 16F887 it reserves 0x070, 0x0f0, 0x165 to 0x170 inclusive and 0x1f0. (These are shown as RR in the MPLAB IDE file registers window). On larger projects requiring more RAM BoostC has no knowledge of these reserved locations and simply overwrites them. Does anyone know the best way, if there is one, of reserving these or any other locations to prevent them being used by BoostC? Declare fixed address variables at the locations you want to protect. BoostLink will work around any fixed address variables. Something like this would fit the bill: char reserved_0x070 @ 0x070; char reserved_0x0F0 @ 0x0F0; char reserved_0x165[ 11 ] @ 0x0165; char reserved_0x1F0 @ 0x1F0; Regards Dave Thanks Dave. I thought that there must be a simple solution but clean forgot about declaring fixed address variables to reserve locations! Davidb Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.