View previous topic :: View next topic |
Author |
Message |
sirius
Joined: 27 Jun 2009 Posts: 16 Location: Bulgaria
|
How to force CCS not to include Config. Words in .hex file |
Posted: Fri Mar 22, 2013 2:51 am |
|
|
MCU - PIC18F65J10, Compiler version 4.084
From document: "PIC18FxxJxx family devices do not have per-
sistent configuration memory, the top four words of
on-chip program memory are reserved for configuration
information. On Reset, the configuration information is
copied into the Configuration registers."
Is there any way(any directive?) to force compiler not to generate Configuration Words in output HEX file. Configuration Words are programmed initially by Bootloader application, so I don't need to do it again, actually it's undesirable.
#Fuses are not used in the CCS project, but still the compiler(obviously "by default") generates Config Words on address 7FF8 - 7FFF.
Thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Fri Mar 22, 2013 3:01 am |
|
|
Seriously they should always be the same in the compiled code as the bootloader. Many bootloaders won't write configuration bytes (best solution), since otherwise a value could be written that stops them working....
Make you booloader ignore bytes in this range.
Best Wishes |
|
|
sirius
Joined: 27 Jun 2009 Posts: 16 Location: Bulgaria
|
|
Posted: Fri Mar 22, 2013 3:28 am |
|
|
Actually this is an update of a project, that uses non-J-part(MCU), where Config. Words are at address 300000h. On J-parts Configuration Words are part of the on-chip flash program memory ("user flash"). That's why I prefer not to eliminate thе possibility to write the whole "user flash", including Configuration Words.
So, as I understand, there's no way to stop compiler doing this?
Now I edit manually hex-file, but it's a tedious job.
Quote: | Many bootloaders won't write configuration bytes (best solution), since otherwise a value could be written that stops them working.... | - I'm aware of this risk.
Quote: | Make you booloader ignore bytes in this range. |
- Yes, this is one of the variants, probably the final one, if no other solution is found
Thank You for reply |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Fri Mar 22, 2013 3:35 am |
|
|
Load the file into MPLAB (import). Then hit export, and un-tick the 'configuration bits' tickbox.
Best Wishes |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1353
|
|
Posted: Fri Mar 22, 2013 2:06 pm |
|
|
I haven't checked in a long time, but I believe
Also works if using the CCS IDE (the manual also mentions it). I'm not sure how it integrates with mplab |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Fri Mar 22, 2013 3:04 pm |
|
|
Well spotted Jeremiah.
Best Wishes |
|
|
sirius
Joined: 27 Jun 2009 Posts: 16 Location: Bulgaria
|
|
Posted: Tue Mar 26, 2013 5:41 am |
|
|
- Thanks, works just fine! |
|
|
|