Jump to content
McNerdius

How To Not Do A Debug Build ?

Recommended Posts

I'd been having problems with an 18F based project - till i realized it worked via pickit 2 ICD. So i started reading around - and found out that my problem is almost certainly that the debug bit is 0 in CONFIG1L. I can't get this to set via pickit - i've tried various methods. Its probably got to do with the fact that the config's are loaded differently on these parts than some others. Anyhoo, the questions are -

 

1) I see a drop-down menu with one option in it: "DEBUG" I can only assume this is a build-option... Clearly i am trying to do a Release build, not a debug... yet i can't find any mention of this dropdown in the manuals, and after 45+ minutes of googling and searching the forums, i can't figure out any way of changing from debug to release...

 

2) (Some lines trimmed):

 

 

Building...

"C:\Program Files\SourceBoost\boostc_pic18.exe" app.c -t PIC18F26J11 -idx 1 -obj Debug -d _DEBUG

BoostC Optimizing C Compiler Version 7.03 (for PIC18 architecture)

Single user Lite License (Unregistered) for 0 node(s)

app.c

success

"C:\Program Files\SourceBoost\boostlink_pic.exe" -idx 1 /ld "C:\Program Files\SourceBoost\lib" libc.pic18.lib Debug\app.obj /t PIC18F26J11 /d "Debug" /p app

BoostLink Optimizing Linker Version 7.03

Building CASM file

Memory Usage Report

===================

RAM available:3776 bytes, used:2 bytes (0.1%), free:3774 bytes (99.9%),

Heap size:510 bytes, Heap max single alloc:127 bytes

ROM available:65528 bytes, used:76 bytes (0.2%), free:65452 bytes (99.8%)

success

Done

 

OK so there are several "debug" command-line options in there. The question is - how did they get there ? I can't find any way of changing from debug to release or what have you, i don't have any "extra" compiler or linker options defined - nor can i find any information regarding this topic after quite a while of googling, menu-searching, or manual-reading.

 

Lastly - is this quest for a "Release" option going to do me any good ? After all, i'm only looking to set my debug bit in CONFIG1L - which i can do right now by tweaking my TDF file. But if there is a "proper" intended way of doing this, i'd like to think i'm just missing it...

Share this post


Link to post
Share on other sites

I have the same question with PIC18F27J53 in the TDF/PIC18F27J53.h header file there is no option defined to turn on/off the debugging bit :huh: And it's not cleared/set automatically when selecting debug/release in the toolbar :lol:

Share this post


Link to post
Share on other sites

McNerdius,

 

1) I see a drop-down menu with one option in it: "DEBUG" I can only assume this is a build-option... Clearly i am trying to do a Release build, not a debug... yet i can't find any mention of this dropdown in the manuals, and after 45+ minutes of googling and searching the forums, i can't figure out any way of changing from debug to release...
There should be two options in there, Debug and Release.

The function of these modes is two fold:

1) Debug or Release are defined so code can be conditionally compiler, by using #ifdef, for debug or release builds of a project.

2) The files created during a built, ie .obj, .asm, .casm, .hex etc are placed in either a debug folder or release folder.

Debug and release does not change the setting of processor debug mode configuration flag.

 

...

Lastly - is this quest for a "Release" option going to do me any good ? After all, i'm only looking to set my debug bit in CONFIG1L - which i can do right now by tweaking my TDF file. But if there is a "proper" intended way of doing this, i'd like to think i'm just missing it...

It appears we have missed out the debug configuration flag on some targets.

You can add it in by modifying the Target Configuration section of the TDF file.

 

In the case of PIC18F26J11 this needs adding:

 

TargetConfig DEBUG
{
// Background Debugger Enable:
ConfigRegAddr = 0x0000FFF8;
ConfigBitMask = 0b10000000;
ConfigSettings =
	0b00000000, "ON","Enabled",
	0b10000000, "OFF","Disabled";
}

 

Regards

Dave

Share this post


Link to post
Share on other sites

Is there any plan to allow the user to configure the set of configurations? Or to turn the whole thing off? Hard-coding a relationship between the chip's config bits to output folders is useless to me, and I'm wasting a lot of time now trying to make SourceBoost 7 just do what SourceBoost 6 did with my output.

Share this post


Link to post
Share on other sites
Hard-coding a relationship between the chip's config bits to output folders is useless to me

 

SB7 isnt changing the configuration bits based on the debug/release dropdown menu.

 

The debug configuration bit is not defined the the chips header file.

 

You need to change the bit in the #pragma because its missing from the header file. (see dave's reply, ^^above)

Edited by TomF

Share this post


Link to post
Share on other sites
Hard-coding a relationship between the chip's config bits to output folders is useless to me

 

SB7 isnt changing the configuration bits based on the debug/release dropdown menu.

 

The debug configuration bit is not defined the the chips header file.

 

You need to change the bit in the #pragma because its missing from the header file. (see dave's reply, ^^above)

 

Oh - sorry, I didn't get that. Maybe this is hijacking the thread, but at least it relates to the subject line so I'll restate it: I still don't want to have to choose between Debug and Release builds that hard-code the defines (_DEBUG and _RELEASE) and hard-code the subfolders (Debug\ and Release\), because I already have conventions for existing projects and source code that serve those purposes. So I'd like to be able to either customize what those configs do and what they're called, or at least turn them off completely.

Share this post


Link to post
Share on other sites

Hi, Dave

I have the same trouble with this debug/release option. I am using IDE for p16f1827 coding. I could not figure out why some projects with the same target will show the 'release' mode, and some shows only 'debug' mode is available. I looked at the TDF for P16F1827, but failed to find any 'TargetConfig DEBUG' session in the TDF for p16f1827.

 

Chen

Share this post


Link to post
Share on other sites

Chen,

I have the same trouble with this debug/release option. I am using IDE for p16f1827 coding. I could not figure out why some projects with the same target will show the 'release' mode, and some shows only 'debug' mode is available. I looked at the TDF for P16F1827, but failed to find any 'TargetConfig DEBUG' session in the TDF for p16f1827.

There is nothing in the TDF file relating to Debug and Release options. These are purely IDE settings that invoke the compiler with _DEBUG or _RELEASE defined and direct the output files to ether the Release or Debug folders. These settings are saved as part of the project.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Chen,

Thanks Dave,

How to change this setting?

Say, I want to compile to the release version. But the IDE shows only the DEBUG option.

This should be displayed on the tool bar, with a drop down list to allow selection of Debug or Release.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Hi Chen

 

After starting a reply click on "More Reply Options" to the right of the screen and you will find yourself editing your reply in a full editor that accpets attachements.

Just attach your screenshot and thats it.

 

 

 

Best regards

Jorge

Edited by JorgeF

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...