• AVR Freaks

Hot!Can software run on different PIC32 variant?

Author
hneel
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/03/03 06:30:43
  • Location: The Netherlands
  • Status: offline
2019/08/20 04:20:24 (permalink)
0

Can software run on different PIC32 variant?

We are considering developping 2 variants of our PCB, with different variants of the PIC32 processor.
The first type will have a PC32MX570F512L. The other type will have one with less internal memory, probably a 550F256 or 250F256. These PIC32 variant belong to the same family.
 
The software will be converted from the .hex file to a .bin file. 
The question is: will the software developped for 570F512 run flawlessly on the other PIC32s? (Do they internally have the same opcodes etc?)
 
PS: within the software we can easily detect which PIC32 variant is running by looking at the DEVID. That's no problem.
 
#1

4 Replies Related Threads

    MisterHemi
    Senior Member
    • Total Posts : 154
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: offline
    Re: Can software run on different PIC32 variant? 2019/08/20 08:14:47 (permalink)
    0
    In general yes, but you'd have to change the configuration for the different peripherals and the differences in their pinouts.
     
    There might be some other little differences too but they're both of the MX family so there shouldn't be any major differences, I would think.

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS High Sierra (10.14.5) and MPLAB X IDE v5.20
     
    Curiosity PIC32MZ EF, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #2
    maxruben
    Super Member
    • Total Posts : 3366
    • Reward points : 0
    • Joined: 2011/02/22 03:35:11
    • Location: Sweden
    • Status: offline
    Re: Can software run on different PIC32 variant? 2019/08/20 08:45:23 (permalink)
    5 (1)
    With different build configurations in your project you can easily build two separate bin files with conditional compilation based on the different processors.
     
    /Ruben
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17847
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Can software run on different PIC32 variant? 2019/08/20 09:46:29 (permalink)
    0
    MisterHemi
    In general yes, but you'd have to change the configuration for the different peripherals and the differences in their pinouts.
     
    There might be some other little differences too but they're both of the MX family so there shouldn't be any major differences, I would think.




     
    The MX family is big and covers many years.  they would need to verify the Address of Every register and control Bit. Plas the Configuration bits. And since the Memory size is different make sure the Link in in the correct area.  It could be possible but it would take some effort to be sure it work.
    #4
    Larry.Standage
    Super Member
    • Total Posts : 920
    • Reward points : 0
    • Joined: 2011/12/30 09:50:47
    • Location: 0
    • Status: offline
    Re: Can software run on different PIC32 variant? 2019/08/20 11:45:22 (permalink)
    0
    Internally, the MX parts have the same MIPS M4K core, so they will run the same opcodes. However, because of different features, they may not all run the same code as well.
     
    Now, in the case of what you've listed, there is one big red flag. The 550F256 and 250F256 do not have as much SRAM as the 570F512 does. On all MIPS parts, the stack grows downward from the top of SRAM, so the binary code will not work the same. Also, XC32 places the Interrupt table at the end of Flash, so it wouldn't exist if you downsize your Flash (without changing the linker script).
     
    Now, you could compile for the 550F256, and it would work on the 570F512, but you would be "losing" half your SRAM and Flash for all intents and purposes.
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5