Load partialy the code in the microcontroller - something like partial bootloader


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    39

    Default Load partialy the code in the microcontroller - something like partial bootloader

    Hello,
    this is maybe question for someone who knows how PBP is working, but do think, that is could be possible to update the code via e.g. serial port? But I don't want to use the bootloader, I want to update only the specific part of the code memory. E.g.

    'Existing code
    :rx
    HSERIN data
    gosub manageData
    goto rx
    end

    :manageData
    'do something
    RETURN

    I want to replace only the function manageData. The manage data function will not be used during the update of the code. Do you think, that this would be possible? Does anyone have idea how to do it? ( E.g. how to know, at which address the manageData starts? )

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Load partialy the code in the microcontroller - something like partial bootloader

    You could put into eeprom the volatile data and change that
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Load partialy the code in the microcontroller - something like partial bootloader

    Although what you want is possible, I can't think of why you would want to do such a thing.


    If you have the original source, then you can find out where the routines are by looking at the ASM file.

    And the resuting .HEX file also contains the information (in the first few bytes of each line) of where the data will be written. But you can't just write to FLASH indiscriminately. You have to erase it first, and you can only erase and write whole 'blocks' at a time (your device datasheet will give you the size of the erase and write blocks). And of course, you have to start on a block boundary. There is virtually no chance that your routine will #1. Be contiguous, #2. Fit in one block, #3. Begin and end on a block boundary.

    This sounds like way too much trouble. Is there some reason why you can't simply write the whole chip? A good bootloader can write a 'big' chip (128KB of FLASH) in less than 2 minutes.
    Charles Linquist

Similar Threads

  1. Load caps
    By grounded in forum Off Topic
    Replies: 0
    Last Post: - 30th November 2009, 15:43
  2. Bootloader + Mainline code in single HEX file
    By dman776 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th May 2006, 22:59
  3. can someone post example to code a bootloader using pbp?
    By nimonia in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th May 2005, 16:28
  4. ADC Load
    By CocaColaKid in forum General
    Replies: 3
    Last Post: - 19th November 2004, 12:43
  5. Partial Digital PORTA?
    By actionplus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th March 2004, 06:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts