CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

**SOLVED** 24EP bootloader

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
curt2go



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

**SOLVED** 24EP bootloader
PostPosted: Wed Feb 10, 2021 5:01 pm     Reply with quote

Well I have been stumped for a long time now..

24EP512GP206 part. I am using the CCS bootloader, which works good.

Compiler 5.083(new version on the way cause this might be the issue)

The bootloader works wonderfully in debug, but as soon as I program it to run it does not work. By not working meaning it does not take the first line of HEX in. The rest is working, even verified the serial comms back and forth in program mode. I have narrowed it down to not seeing the 0x0D at the end of each hex line, and even then the timing seems to be off for the receive but that could just be me.

Have tried with debug bit on and off as well in the code.
Running at 140MHz. 115200 BAUD.

Tried slowing it down to 9600BAUD and 16MHz and different combinations.

Anybody seen this before? I have never had debug work and programming do something different.

Using MPLABx.


Last edited by curt2go on Thu Feb 11, 2021 11:54 am; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 7975
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Feb 10, 2021 8:55 pm     Reply with quote

have you set build configuration to 'release' then recompiled ?
curt2go



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

PostPosted: Wed Feb 10, 2021 9:43 pm     Reply with quote

Well that seems too easy! I did not. I will try in the AM and post back.
temtronic



Joined: 01 Jul 2010
Posts: 7975
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 6:19 am     Reply with quote

hopefully that's it. Up until MPLAB 8.50ish... it defaulted to 'debug'. Since I never use 'debug', I had to manually change, recompile/test..edit...repeat it all again. I talked(yes, real phone call) to a SW head and he changed MPLAB to allow the default option to be changed and stored. That sure helped me !
I don't know if MPLABx has the same 'option'...as a dinosuar, I'm stuck in then mud, using 'old stuff' that works for me..... Laughing
Jay
curt2go



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 11:38 am     Reply with quote

Well I just moved to MPLABX a few months ago.. Smile

I don't think there is a "debug" or "release" option, i think you have to build them yourself. Correct me if I'm wrong anyone. So I am a little unsure how to do it , in MPLAB X.

Also new compiler 5.103 did not fix the problem. And it looks liek the ne rom_modify.c file that it uses is not the same as the old one and does not compile.. arg....

Anyways, any help would be appreciated. This is a weird one.
curt2go



Joined: 21 Nov 2003
Posts: 200

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 11:43 am     Reply with quote

Well I went digging a bit... Went into the compiler options..

There is a setting called Compile for use with ICD. This was not set. I set it and guess what........ It now works...

Anyone want to try to explain why this might be? Or just chalk it up to " it works now". Smile
temtronic



Joined: 01 Jul 2010
Posts: 7975
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:25 pm     Reply with quote

My 'guess' is that like 'debug', 'compile with ICD' modifies the actual PIC asm code to 'play nice' with the ICD.
Good news is you got it WORKING !!!!
Bad news is 2 weeks from now, it'll stop, and you'll have forgotten HOW to fix it....... Laughing
PCM programmer



Joined: 06 Sep 2003
Posts: 21362

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:53 pm     Reply with quote

It's not good news. One common question put to Microchip is why does
my project work only in Debug mode. It needs to be solved.
Do a web search for this:
Quote:
why does my project work only in debug site:microchip.com
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group