One problem I have found importing other projects is to make sure the
versions of MPLAB and the XC32 compiler are identical.  Not sure how old the
VT100 project might be but MPLAB and its associated libraries have changed a
lot, even the methods used to perform some operations have changed.  The
differences in the libraries could be causing a mismatch in the binary
files.  The USB libraries have changed quite a bit as new features have been
added.  

If you look at the project properties (right click on the project) check
that all the libraries are there and the linkers are correct, also check
that the programmer is set up correctly to use the memory space properly.
If a bootloader is being used then need to make sure the starting point for
the code is correct ­ it has to move to create the bootloader space.  The
bootloader used to be a separate part that had to be downloaded then the
application was loaded (IIRC), it should be available on the Microchip site.
I abandoned the bootloader because it caused too many issues.

Just opening a project sometimes does not set up all the config bits
properly that the original developer might of used ­ crazy I know, Atmel has
the same issue.  I found this problem just migrating my own project to a new
machine, I had to cross check the two configs to make sure they were
correct.  This included adding object libraries back into the new
configuration ­ I am using some very old libraries, the new libraries are
too buggy for some functions.

Not much of a direct point to a problem but areas to check.

Usually there is a config.h (or similar name) for the bit settings which
should come with the project, this will take care of all the settings.  The
32MX also allows the program to change some of those bits at run time,
mostly to help with debug or clock issues.

From:  M100 <m100-boun...@lists.bitchin100.com> on behalf of Ken Pettit
<petti...@gmail.com>
Reply-To:  <m...@bitchin100.com>
Date:  Saturday, July 18, 2020 at 2:22 PM
To:  <m100@lists.bitchin100.com>
Subject:  Re: [M100] PIC32MX (off topic but related!)

>   
>  Hey Steve,
>  
>  Configuration bits?  Are you setting those correctly to ensure the proper
> clock mode is selected, etc?
>  
>  Ken
>  
>  
> On 7/18/20 2:02 PM, Stephen Adolph wrote:
>  
>  
>> Well ok thanks guys.
>> In a nutshell,  ( long winded explanation of problem to follow)...
>>  
>> 
>>  
>>  
>> The Geoff VT100 page has both Geoffs source project files as well a binary
>> file that can be programmed.
>>  
>> 
>>  
>>  
>> The binary contains the application plus bootloader
>>  
>> 
>>  
>>  
>> When I try to build the project myself (unchanged) I get a different binary
>> that does not seem to include the bootloader.    In any case I cannot see a
>> way to produce the same binary as what he provides.  I cant relplicate his
>> build.
>>  
>> 
>>  
>>  
>> As well, I cant see anything that seems to relate to the bootloader
>> functionality in the actual code.
>>  
>> 
>>  
>>  
>> Very confusing.
>>  
>> 
>>  
>>  
>> In any case, the code that MPLAB X produces can be programmed but it does not
>> work.  Meaning if I erase the part completely and then attempt to program my
>> application, the device does not start after the application  is loaded.
>>  
>> 
>>  
>>  
>> However I know my binary works because if I program it OVER TOP of an MCU
>> that has the original binary in it, I can thusly install my application and
>> see it run.
>>  
>> 
>>  
>>  
>> So it really seems like I can produce working application code .. but the
>> bootloader portion cant be generated from scratch. I must be already in there
>> by separate means for my application to work.
>>  
>> 
>>  
>>  
>> 
>>  
>>  
>> So I am a bit stuck.   The only way I can produce MVT100 processors is to
>> first program with the original code  and then overlay my code.
>>  
>> 
>>  
>>  
>> Strange.
>>  
>> 
>>  
>>  
>> Any thoughts?  I really am a newbie on these things.
>>  
>> 
>>  
>>  
>> Thabks Steve
>>  
>> 
>>  
>>  
>> 
>>  
>>  
>> 
>>>> <snip>
>>>>  
>>>>  
>>>  
>>>  
>>  
>>  
>  
>  


Reply via email to