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

Build successful but loading fails

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



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

Build successful but loading fails
PostPosted: Wed Jun 05, 2019 8:43 am     Reply with quote

I've had a bug show up once that I never posted here before, but I figured out how to reproduce it today and I wanted to share.

I'm using CCS v5.085, MPLABx v5.15.

What happens is that when you try to build or download code, building succeeds, but loading fails with this message in the output:
Code:
The program file could not be loaded: Index: 0, Size: 0


EDIT: fixed image to be more specific
This shows up when I tick this box in project properties:


So if you are having this problem, one thing to try is to make sure this box are not ticked.


Last edited by dluu13 on Wed Jun 05, 2019 9:35 am; edited 2 times in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Wed Jun 05, 2019 9:29 am     Reply with quote

I have to ask 'why' you would be ticking the second?.
You do realise that if this is ticked, it expects you to put the name of the
file it is to load in the window underneath. If there is no name there, it'll
load nothing....
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Wed Jun 05, 2019 9:32 am     Reply with quote

Sloppy on my part... I never tested them in isolation.

It is the first box that is the deal breaker here. If you tick the second box, it unticks itself if you don't put anything in the text box. I'll edit the picture to reflect this.
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Wed Jun 05, 2019 9:38 am     Reply with quote

Are you building for DEBUG or release?.
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Wed Jun 05, 2019 9:51 am     Reply with quote

I have only been using build for release.

I just found out that building for DEBUG gives that error message whether or not I tick the box.

In both cases when there is a failure, I think it fails in loading the .cof file somehow, since that is what it's doing right before it fails.

Anyway, the reason that I wanted to load symbols in the first place was to see the data and program memory usage in the IDE. I can always see memory usage in the .lst file, but this seeing it in the IDE was more convenient.
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Wed Jun 05, 2019 10:25 am     Reply with quote

The symbols should always load automatically when debug is selected. This
option only 'turns it on' when debug is not selected.
Suggests that for some reason MPLAB is not correctly interpreting
the symbol file.
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