Embedded TCP/IP stack  4.7.0
Add FNET Bootloader support to an existing project

The Bootloader reserves the first 60 Kbytes of the on-chip Flash memory for its own needs (actually it can occupy less space).
The last page of the on-chip Flash memory is used by the Bootloader for parameter storage and may be modified by a user application to change the Bootloader behaviour.

To use an existing application with the FNET Bootloader, the following changes should be applied in the application project:

  1. Add additional sections to the application linker command file and update the already defined memory sections to avoid section overlapping. The example of MK64FN IAR linker file modification (added flash_offset):
    ...
    define symbol __flash_offset__ =  0x0000F000; //60KB reserved for FNET bootloader.
    
    define symbol __ram_vector_table_size__ =  isdefinedsymbol(__ram_vector_table__) ? 0x00000400 : 0;
    define symbol __ram_vector_table_offset__ =  isdefinedsymbol(__ram_vector_table__) ? 0x000003FF : 0;
    
    define symbol m_interrupts_start       = 0x00000000 + __flash_offset__;
    define symbol m_interrupts_end         = 0x000003FF + __flash_offset__;
    
    define symbol m_flash_config_start     = 0x00000400 + __flash_offset__;
    define symbol m_flash_config_end       = 0x0000040F + __flash_offset__;
    
    define symbol m_text_start             = 0x00000410 + __flash_offset__;
    define symbol m_text_end               = 0x000FFFFF - __flash_offset__;
    ...  
    
  2. An application may change the Bootloader parameters. They are placed at the beginning of the last logical-block of the on-chip flash memory.
    The Bootloader parameters organization is defined by the fapp_params_flash structure placed in the
    fnet\fnet_demos\common\fnet_application\fapp_params.h 
  3. Make sure that your application uses the interrupt vector table copied into RAM area, because the ROM-based table is owned by the Bootloader.

© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net