Hot!Debugging Broken Breakpoints In MPLABX

Page: < 12 Showing page 2 of 2
Author
BumpSplat
Starting Member
  • Total Posts : 81
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/17 22:20:01 (permalink)
0
When I try, it shows as broken.
#21
qɥb
Monolothic Member
  • Total Posts : 1167
  • Reward points : 0
  • Joined: 2017/09/09 05:07:30
  • Location: Jupiter
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/17 22:34:22 (permalink)
0
I assume that means it has been optimised away.
What if you add a "volatile" qualifier to its definition?
 (Although if it has been optimised away, it indicates the compiler thinks your loop will never run, which agrees with your other observations.)
 

PicForum "it just works"
#22
qɥb
Monolothic Member
  • Total Posts : 1167
  • Reward points : 0
  • Joined: 2017/09/09 05:07:30
  • Location: Jupiter
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/17 22:37:05 (permalink)
0
I'm rapidly getting the impression the problem is in the code you are not posting.
Can you zip all the source and header files up and attach here?

PicForum "it just works"
#23
BumpSplat
Starting Member
  • Total Posts : 81
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/17 23:05:24 (permalink)
0
It's from the MLA USB Data Logger project.  I'm simply embedding my routine within the "app_host_msd_data_logger.c" file after the drive is mounted.  Here's an interesting point.  I got to thinking about the true and false attributes.  I moved things around and collected a 0 response (no error) with true and a 0x1 response (erase failed) with false.  The return value is a #typedef enum I included a snip of it.  This is all really squirly.  I can't find anywhere the "false" attribute is being used in any of the MLA projects (I've looked).  I'm also struggling to find the FILEIO_LongFileNameGet Function().  
 
////// header declaration 
typedef enum
{
FILEIO_ERROR_NONE = 0, // No error
FILEIO_ERROR_ERASE_FAIL, // An erase failed
FILEIO_ERROR_NOT_PRESENT, // No device was present
.......
/////////
 
if (FILEIO_Find("*.BDG", FILEIO_ATTRIBUTE_MASK, &SearchResult1, true) == FILEIO_ERROR_NONE)
   {
   for (Transfer=0; Transfer<File_Name_Length; Transfer++)
      {
   Sound.call_1[Transfer] = SearchResult1.shortFileName[Transfer];
   BP1 - deviceAddress = FILEIO_Find("*.BDG", FILEIO_ATTRIBUTE_MASK, &SearchResult2, false);
      }   
   }
 
I'm thinking at this point, since I don't have a ton invested, I transfer over to one of the other USB host projects with this same simple test.  That way I'm starting with a known good environment.  I just think I've hit the atomic level of the issue, an API I didn't create isn't working.  The BP challenges I saw earlier seem like they may be scope based coupled with this wonkey issue.
 
thx
post edited by BumpSplat - 2018/01/17 23:16:25
#24
BumpSplat
Starting Member
  • Total Posts : 81
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/18 14:21:54 (permalink)
0
Found it!  The issue was initializing "each" search record.  I was using individual search records.  It wasn't needed so I removed it and the function now works.  RTFM got me. I hate it when that happens.  :)
 
"This parameter must be specified as 'true' the first time this function is called with any given FILEIO_SEARCH_RECORD structure"
 
-Tim
#25
qɥb
Monolothic Member
  • Total Posts : 1167
  • Reward points : 0
  • Joined: 2017/09/09 05:07:30
  • Location: Jupiter
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/18 14:31:35 (permalink)
0
Ahh, it wasn't that obvious that you changed the pointer from SearchResult1 to SearchResult2 between the two calls.
It keeps intermediate results in that structure, and setting the last parameter to FALSE tells it not to clear them.

PicForum "it just works"
#26
BumpSplat
Starting Member
  • Total Posts : 81
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
Re: Debugging Broken Breakpoints In MPLABX 2018/01/18 17:02:16 (permalink)
0
I'm feeling like I need to open a ticket for the long file name issue. FILEIO.h or FILEIO_LFN.h both have a
FILEIO_SEARCH_RECORD.shortFileName[13] which clearly isn't big enough to hold a long file name @255 char limit.

Works -
if (FILEIO_Find("*.BDG", FILEIO_ATTRIBUTE_MASK, &SearchResult, true) == FILEIO_ERROR_NONE)
for (Transfer1=0; Transfer1<File_Name_Length; Transfer1++)
sound.call_2[Transfer1] = SearchResult.shortFileName[Transfer1];
 
Doesn't work -
if (FILEIO_Find("*.BDG", FILEIO_ATTRIBUTE_LONG_NAME, &SearchResult, true) == FILEIO_ERROR_NONE)
for (Transfer1=0; Transfer1<File_Name_Length; Transfer1++)
sound.call_1[Transfer1] = SearchResult.shortFileName[Transfer1];
Looked closer removing if and assigning it to a variable. The result was a Return value - 0xfff. This is clearly as error.

FILEIO_ATTRIBUTE_LONG_NAME just doesn't work. This is true with either fileio.h and fileio_lfn.h. I figure maybe it's placing the long file name in another location but there's no reference to this being the fact.
 
-Tim
#27
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5