• AVR Freaks

Hot!Is it possible to change Configuration Bits via Command-Line interface?

Author
saregister
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2020/04/01 13:56:25
  • Location: 0
  • Status: offline
2020/04/01 14:12:55 (permalink)
0

Is it possible to change Configuration Bits via Command-Line interface?

I have an automated test that installs a HEX file onto a PIC16F877 using a command line call to the MPLAB IPE.  My problem is that I'm not receiving the correct checksum.  I need to manually configure the Configuration Bits and install the code manually in order to receive the proper checksum and have a working product.  I would like to know if it's possible to set the configuration bits using another switch on the command line.  My current call command looks similar to this: 
mplab_ipe -K -E TPICD3 -P16F877 -M -F"C:\project\file.hex
I figured out how to get source code for the configuration bits in the IDE and it looks like this: 
 
#include "p16f877.inc"
; CONFIG
; __config 0xFD76
__CONFIG _FOSC_HS & _WDTE_ON & _PWRTE_ON & _CP_OFF & _BOREN_ON & _LVP_OFF & _CPD_OFF & _WRT_OFF
 
Is there a way to change the configuration bits when called?  Or does this require a change to the source code?  I don't have access to make changes to the HEX file I'm loading, so that would be a no go right now.
#1

1 Reply Related Threads

    ric
    Super Member
    • Total Posts : 27115
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Is it possible to change Configuration Bits via Command-Line interface? 2020/04/02 12:34:53 (permalink)
    0
    You're going to have to correct the hex file, which could either be done directly, or by changing the original source and recompiling.
    If you have command line access, you could probably use the HEXMATE utility to modify the hex file.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5