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 CCS Technical Support

CSS protection bit doesn't set on PIC24FJ1024GB610[SOLVED]

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



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

CSS protection bit doesn't set on PIC24FJ1024GB610[SOLVED]
PostPosted: Wed Apr 17, 2024 3:26 pm     Reply with quote

I'm trying to compile the HEX for production but the CSS bit is not being set on MPLAB X IDE v6.20

I'm compiling with Shift+F11(Clean and compile)


Code:
#use delay(internal=32MHz,USB_FULL,ACT)
#fuses SOSC_LOW,SOSC_SEL,PROTECT


What could I being doing wrong?

Click on the image to full size it

_________________
Electric Blue


Last edited by E_Blue on Thu Apr 18, 2024 8:49 am; edited 1 time in total
temtronic



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

View user's profile Send private message

PostPosted: Wed Apr 17, 2024 4:33 pm     Reply with quote

any chance it's in 'debug' build mode and not 'release' build mode ??

I don't use 'x', just MPLAB 8.92....but 'build mode' used to be 'fun'....
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Wed Apr 17, 2024 5:36 pm     Reply with quote

I wish to use MPLAB IDE 8.92 but this microcontroller is not supported in MPLAB IDE.

I think that the problem is something in debug mode but the HEX is created in D:\MyProject.X\dist\ICD3_profile\production
_________________
Electric Blue
temtronic



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

View user's profile Send private message

PostPosted: Thu Apr 18, 2024 5:34 am     Reply with quote

My understanding is that when the compiler creates code in 'debug' mode it changes/adds several things and the program will not run,at least properly, in the 'real world'.
In MPLAB, this is done under the 'build configuration' sub menu and was originally set to 'debug',only after v8.50+-, could YOU set and save it as 'release'. I asked Microchip for this 'option' as I never used 'debug'. The IT guy called me and couldn't believe I never use 'debug'. Told him I use the 'real world' for debugging as the PIC has to WORK in the real world.

I'm assuming X has a similar 'option', that's why I suggested it.
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Thu Apr 18, 2024 8:51 am     Reply with quote

I've just found how to make it work.

Code:
#fuses NODEBUG
#use delay(internal=32MHz,USB_FULL,ACT)
#fuses SOSC_LOW,SOSC_SEL,PROTECT_CFG,PROTECT

_________________
Electric Blue
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