View previous topic :: View next topic |
Author |
Message |
curt2go
Joined: 21 Nov 2003 Posts: 200
|
**SOLVED** 24EP bootloader |
Posted: Wed Feb 10, 2021 5:01 pm |
|
|
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: 9240 Location: Greensville,Ontario
|
|
Posted: Wed Feb 10, 2021 8:55 pm |
|
|
have you set build configuration to 'release' then recompiled ? |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Wed Feb 10, 2021 9:43 pm |
|
|
Well that seems too easy! I did not. I will try in the AM and post back. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9240 Location: Greensville,Ontario
|
|
Posted: Thu Feb 11, 2021 6:19 am |
|
|
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.....
Jay |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Thu Feb 11, 2021 11:38 am |
|
|
Well I just moved to MPLABX a few months ago..
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
|
|
Posted: Thu Feb 11, 2021 11:43 am |
|
|
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". |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9240 Location: Greensville,Ontario
|
|
Posted: Thu Feb 11, 2021 3:25 pm |
|
|
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....... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Feb 11, 2021 3:53 pm |
|
|
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 |
|
|
|
|