View previous topic :: View next topic |
Author |
Message |
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
Build successful but loading fails |
Posted: Wed Jun 05, 2019 8:43 am |
|
|
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: 19549
|
|
Posted: Wed Jun 05, 2019 9:29 am |
|
|
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
|
|
Posted: Wed Jun 05, 2019 9:32 am |
|
|
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: 19549
|
|
Posted: Wed Jun 05, 2019 9:38 am |
|
|
Are you building for DEBUG or release?. |
|
|
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
|
Posted: Wed Jun 05, 2019 9:51 am |
|
|
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: 19549
|
|
Posted: Wed Jun 05, 2019 10:25 am |
|
|
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. |
|
|
|