|
|
View previous topic :: View next topic |
Author |
Message |
allenhuffman
Joined: 17 Jun 2019 Posts: 554 Location: Des Moines, Iowa, USA
|
Works in DEBUG, not in BUILD+RUN (SOLVED: Config Bits) |
Posted: Tue Jun 08, 2021 10:16 am |
|
|
Has anyone had an issue where something works when in Debug mode, but not in Build+Run?
I pruned down my project until it was just this:
Code: | #include <24FJ256GA106.h>
//#device ICSP=TRUE
#device ICD=3
#use delay(clock=32MHz,crystal=8MHz)
//#use rs232(ICD)
#FUSES NOWDT //No Watch Dog Timer
#FUSES CKSFSM //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOPROTECT
//#include <stdio.h>
#define LED_COM PIN_B10
#define LED_FAULT PIN_B11
void main(void)
{
output_high (LED_COM);
output_high (LED_FAULT);
while (TRUE);
}
|
On my system, BUILD+RUN never turns on the lights. But DEBUG+RUN does.
We moved the project to a different laptop, and it works there.
Any suggestions on what I might need to clean up that could cause this? All the other projects I work on, as far as I know, are still working as designed. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ?
Last edited by allenhuffman on Tue Jun 08, 2021 12:36 pm; edited 2 times in total |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 08, 2021 11:41 am |
|
|
Look at fuses list at the bottom of the .LST file.
Debug mode disables some fuse settings.
Compare the fuses used for Debug and for non-Debug mode. |
|
|
allenhuffman
Joined: 17 Jun 2019 Posts: 554 Location: Des Moines, Iowa, USA
|
|
Posted: Tue Jun 08, 2021 12:36 pm |
|
|
PCM programmer wrote: | Look at fuses list at the bottom of the .LST file.
Debug mode disables some fuse settings.
Compare the fuses used for Debug and for non-Debug mode. |
CCS Support just had me pull the hex file from the working system and compare it to my hex file and I noticed those being different.
"Config Bits" in CCS Load was unchecked. Resetting to defaults got me going again.
I don't recall touching this, but I have been using #HEXCOMMENT entries from support to make my project erase all flash or erase only used flash. Early on, I was just putting in the values they gave me (131, 149, etc.) and I finally decided to decode them a bit:
Code: | // Erase entire flash part before programming Bootload code.
// 131 = 10000011
// 1 - PROG
// 2 - DATA EE
// 4 - CONFIG
// 8 - Erase only blocks
// 16 - Erase chip after write errors
// 32 - Verify ROM protect.
#HEXCOMMENT\SETTINGS OPTIONS=131 VOLTAGE=5.00 |
Either this line altered the defaults (it should not) or I accidentally clicked that button when i was figure out what each generated for OPTIONS (likely).
Though I'm still not sure what (if anything) the last two bits are used for (high bit always set?). _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ? |
|
|
|
|
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
|