Forums

Quick help with PIC18F4510 - not debuggable in Large memory model?

Started by larwe October 1, 2010
Anyone have experience working with this part and Hi-Tech C (lite)?
I've got a weird problem and I'm not sure my workaround is correct. I
have connected only a debug header per the ICD2 LE instructions, with
a reset pullup and no other hardware. Put a scope probe on RA6 and
another on RA0, and trivial pin-wiggler. If I try to build it in debug
mode and debug it, everything appears like it works (I see clock
output on RA6, and there are no errors) but nothing happens on RA0.
Additionally, I can't breakpoint or single-step properly - it looks
like it steps through startup.as okay, but goes haywire when it gets
to main - won't breakpoint - watches don't show variable updates
properly, etc.

On the other hand, if I do a release build and program the chip,
rather than trying to debug, it seems to work fine.

Alternatively, if I change the build options to Small memory model, it
works fine in both the small and large memory models. The compiler
docs specifically state that the memory model is not implemented/not
required and is a "don't care" in the project settings.

Am I missing something here? Is it safe for me to build in Small
model, and is there in fact a difference (apart from the fact that
Large doesn't work! :). Is the problem here that MPLAB is selecting a
different debug executive for the different memory models, and the
problem actually lies in the debug stubs?

thanks.
On 1 Oct, 16:59, larwe <zwsdot...@gmail.com> wrote:
> Anyone have experience working with this part and Hi-Tech C (lite)? > I've got a weird problem and I'm not sure my workaround is correct. I > have connected only a debug header per the ICD2 LE instructions, with > a reset pullup and no other hardware. Put a scope probe on RA6 and > another on RA0, and trivial pin-wiggler. If I try to build it in debug > mode and debug it, everything appears like it works (I see clock > output on RA6, and there are no errors) but nothing happens on RA0. > Additionally, I can't breakpoint or single-step properly - it looks > like it steps through startup.as okay, but goes haywire when it gets > to main - won't breakpoint - watches don't show variable updates > properly, etc. > > On the other hand, if I do a release build and program the chip, > rather than trying to debug, it seems to work fine. > > Alternatively, if I change the build options to Small memory model, it > works fine in both the small and large memory models. The compiler > docs specifically state that the memory model is not implemented/not > required and is a "don't care" in the project settings. > > Am I missing something here? Is it safe for me to build in Small > model, and is there in fact a difference (apart from the fact that > Large doesn't work! :). Is the problem here that MPLAB is selecting a > different debug executive for the different memory models, and the > problem actually lies in the debug stubs? > > thanks.
Try the Microchip forums.