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

Solved - Build Issue - Unknown Keyword in #FUSES "NOCOE

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Adam.Smith.Vis



Joined: 03 May 2023
Posts: 5

View user's profile Send private message

Solved - Build Issue - Unknown Keyword in #FUSES "NOCOE
PostPosted: Wed May 03, 2023 8:02 am     Reply with quote

Hello,

So this may be impossible to solve with the information I can give you...

But any help getting closer to the issue would be greatly appreciated.

So I am a new engineer 6 months into my first job. Im now looking into changing my companies existing code to fix a few issues.

I have the source code and hex files for each past code revision. I do not have the compiler version, device file versions used or anything additional bar the .c and .h files.

I know they were using the PCW IDE.

The device I am programming for is the dsPIC33FJ256MC710 and I am currently using the CCS compiler demo till we get the full license.

So I of course know that the code itself should work as it has already been compiled and being used since the latest revision in 2019.

When I build the project I am getting these 2 errors:

Unknown Keyword in #FUSES "NOCOE"
Unknown Keyword in #FUSES "TEMP"

This is for the following section in the header file:

Code:

//#ifndef INF3PLUS_DEFS_LOADED
//#define INF3PLUS_DEFS_LOADED
#include <33FJ256MC710.h>


#FUSES NOWDT                    //No Watch Dog Timer
#FUSES ICS0                     //ICD communication channel 0
#FUSES NOJTAG                   //JTAG disabled
#FUSES NOCOE                    //Device will reset into operational mode
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES PUT128                   //Power On Reset Timer value 128ms
#FUSES WPOSTS16                 //Watch Dog Timer PostScalar 1:32768
#FUSES WPRES128                 //Watch Dog Timer PreScalar 1:128
#FUSES WINDIS                   //Watch Dog Timer in non-Window mode
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES PR_PLL                   //Primary Oscillator with PLL
//#FUSES PR                       //Primary Oscillator
#FUSES XT                       //Crystal osc <= 4mhz for PCM/PCH , 3mhz to 10 mhz for PCD
#FUSES OSCIO                    //OSC2 is clock output
#FUSES CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES TEMP                     //Temperature protection enabled
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOWRTSS                  //Secure segment not write protected
#FUSES NOSSS                    //No secure segment
#FUSES NORSS                    //No secure segment RAM
#FUSES NOWRTB                   //Boot block not write protected
#FUSES NOBSS                    //No boot segment
#FUSES NORBS                    //No Boot RAM defined


Where the #include <33FJ256MC710.h> points to this file in the include path:

https://we.tl/t-sImqgJU7Zl

I have tried commenting them out and it then compiles successfully. But the resultant hex file gives our comms failed error within our own software and hence does not work.

Any help someone can provide would be great!

Please let me know about any more information you need.


Last edited by Adam.Smith.Vis on Thu May 04, 2023 3:45 am; edited 1 time in total
jeremiah



Joined: 20 Jul 2010
Posts: 1354

View user's profile Send private message

PostPosted: Wed May 03, 2023 9:22 am     Reply with quote

I haven't installed the latest version, I'm running 5.105 and it doesn't have support for those fuses. If the most recent version is the same, then it is probably an oversight.

I would recommend giving them a call and telling their tech support about it. They can probably give you a fixed version with support for those fuses.

If you don't want to wait, the compiler does let you manually set all fuses using the format:

Code:
#FUSES 1 = 0xC200 // sets config word 1 to 0xC200


You just have to be very careful to set the whole config work properly. My suggestion would be to compile with the unsupported fuses commented out, take note of the hex value(s) in the appropriate fuse(s), then figure out the hex value when taking your two new fuses into consideration and use the above line to set the whole thing (NOTE: it should come after any other #fuses so later ones don't overwrite it)
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed May 03, 2023 10:25 am     Reply with quote

It appears MChip and CCS dropped these fuses a while back. The datasheet
references the COE fuse but is is no longer shown in the FICD register and I
can find no reference to the TEMP fuse.

Regardless, from what I can tell, neither one of those fuses should have any
effect on comms related operations anyway so I suspect something is else is
going on.
_________________
Google and Forum Search are some of your best tools!!!!
Adam.Smith.Vis



Joined: 03 May 2023
Posts: 5

View user's profile Send private message

Thanks
PostPosted: Wed May 03, 2023 10:31 am     Reply with quote

Thanks for your comments!

Having read through the rest of the code I can't see any use of these fuses either.

I'll leave them commented out and continue investigating for other issues.

Best of luck with your own projects
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Thu May 04, 2023 1:22 am     Reply with quote

Those fuses were removed from the data sheet in about 2009. The
old CCS compilers had them removed in the late V4 days. About 4.107
was the last supporting them. So 2010ish. If your code has these in, then
it is very old, so might well be affected by some of the compiler changes
since. There were some small alterations to how things are handled and
behave when V5 was launched.
Sounds as if they may have been using a very old compiler, though the
last changes were 2019....
Adam.Smith.Vis



Joined: 03 May 2023
Posts: 5

View user's profile Send private message

PostPosted: Thu May 04, 2023 2:29 am     Reply with quote

Thanks Ttelmah,

Very Old code sounds about right!

Ill keep trying and bear in mind about the changes.
Adam.Smith.Vis



Joined: 03 May 2023
Posts: 5

View user's profile Send private message

Fixed
PostPosted: Thu May 04, 2023 3:43 am     Reply with quote

I found an old version of PCWHD (March 2008) and got that running.

I have been able to compile with changes of my own and it is working on our hardware.

Again thanks for everything you are all a massive help!
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Thu May 04, 2023 4:03 am     Reply with quote

Well done.

Worth saying that on my own code, I always 'note' at the top, 'what compiler'
is used, and store a copy of this with the sources. Might well be worth
considering something similar. This way you can come back and make
changes, and know where you are working 'from'. Very Happy
Adam.Smith.Vis



Joined: 03 May 2023
Posts: 5

View user's profile Send private message

PostPosted: Thu May 04, 2023 10:30 am     Reply with quote

That's a good tip!

Ill make sure to do that
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