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 support@ccsinfo.com

Data conflict when unifying hex files

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



Joined: 18 Jun 2014
Posts: 5

View user's profile Send private message

Data conflict when unifying hex files
PostPosted: Tue Feb 10, 2015 1:26 am     Reply with quote

Hi all,

I’m trying to unify two hex files in MPLAB X but run into a "data conflict at address 300004h". I'm using the PIC18F45K50 and according to the datasheet address 300004h (config3L) is unimplemented so it should be all zeroes. The address does not show up in the PIC memory view window under Configuration bits, so I've been unable to tell which of the two projects modifies this region to cause the conflict.

The first project is Microchip's USB HID bootloader, the "pic18_non_j" version. I've modified the configuration bits to match the second project, but the code is otherwise unchanged. The first project is compiled with XC8 and the hex file is then added as a loadable to the second project which is compiled with CCS 5.0.

I'm using the internal oscillator of the 45K50. The first lines of code in my main project look like this:

Code:
#include "18F45K50.h"
#device ADC=10
#fuses INTRC, WDT, PROTECT
#use delay(internal=48MHz)

// Changes required for bootloader
#define CODE_START 0x1000
#build(reset=CODE_START, interrupt=CODE_START+0x08)
#org 0, CODE_START-1 {}


Do you have any ideas how I can remove the data conflict? Thanks!
temtronic



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

View user's profile Send private message

PostPosted: Tue Feb 10, 2015 6:23 am     Reply with quote

Quick answer with a note...
OK, I don't use Mplab X, uchips HID, XC or ccs v5 ..but..

I have a very hard time thinking you can just 'merge' the bootloader and a ccs c code.

I'm pretty sure CCS has a USB bootloader,other will KNOW, but it sounds improbable you can create code in two different C's using two different compilers and simply 'merge'.

Though I haven't looked , unimplemented cells in a PIC usually are 1's not 0's and if not used why do you think a program can put something there?

The easy,workable solution is to go 100% CCS C. Be aware that version 5 had it's 'quirks' in the early numbers....


Jay
Mikzi



Joined: 18 Jun 2014
Posts: 5

View user's profile Send private message

PostPosted: Tue Feb 10, 2015 6:41 am     Reply with quote

Thanks for your answer, Jay. CCS includes an USB virtual comport bootloader in the example folder, but I need an USB HID bootloader for this project.

Microchip's USB HID bootloader is working fine, but it would be a major convenience if I could merge its hex file with my CCS project.
Mikzi



Joined: 18 Jun 2014
Posts: 5

View user's profile Send private message

PostPosted: Wed Feb 11, 2015 2:44 pm     Reply with quote

Success! I was able to merge the XC8 bootloader with my CCS project by removing all the config data from the bootloader project. For this to work I needed to remove the #pragma configs and also uncheck the XC8 linker setting "Program the device with default config words".
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