bootloader that xfers code from I2C into program memory


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: bootloader that xfers code from I2C into program memory

    I think that now I understand what you didn't understand about BLOCK_SIZE.
    First main app usually doesn't have to know what is block size. Only if you use FLASH2FLASH bootloader you must know what is block size.
    Bootloader should know what block size is, so you can erase pic page by page.

    Because BLOCK_SIZE is used in internally PBP library for CODE WRITE/ERASE, you MUST compile bootloader for each PIC.
    So there is no need(also there is no way to pass constant at runtime in LIB) to pass BLOCK_SIZE from main app to bootloader app.
    You can't use same HEX for different pic's, for some you can, but for others you can't. Because register map isn't same for all pic.
    So no to take any chance, just compile bootloader for different pics and don't worry about PAGE_SIZE.

    Conclusion is that you can use same code for almost all PICs, but you can't use same HEX. You must compile, extract and edit bootloader HEX for each PIC you want to use.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: bootloader that xfers code from I2C into program memory

    Agreed - just the bootloader needs it.

    If you're passing OTHER stuff (variables), then you'd want to assign the same location in BOTH files, correct?

  3. #3
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: bootloader that xfers code from I2C into program memory

    Yes. It must be same location and same size.

Similar Threads

  1. Program Code and Program Memory
    By DenFrod in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th February 2007, 14:51
  2. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38
  3. using Flash Program Memory ?
    By muskut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th October 2006, 15:17
  4. PIC16F88, Bootloader & I2C Memory
    By digilord in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th December 2005, 15:36
  5. program memory size
    By volcane in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th October 2005, 19:45

Members who have read this thread : 0

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