void libmem_dcc_loader_start libmem_dcc_loader_set_param_fn_t   set_param_fn  ) 
 

Start up a LIBMEM loader that uses the "Comms Channel Loader" protocol.

Parameters:
set_param_fn   A pointer to the function to call when a loader set parameter message is received or NULL if not required.
Example:
  int set_param_fn(unsigned int parameter, unsigned int value)
  {
    return 1;
  }

  int main(void)
  {
    uint8_t *flash1_start = (uint8_t *)0x10000000;
    const int flash1_max_geometry_regions = 4;
    libmem_driver_handle_t flash1_handle;
    libmem_geometry_t flash1_geometry[flash1_max_geometry_regions];
    libmem_flash_info_t flash1_info;

    // Register FLASH driver.
    libmem_register_cfi_driver(&flash1_handle, 
                                flash1_start,
                                flash1_geometry,
                                flash1_max_geometry_regions, 
                                &flash1_info);

    // Run the loader 
    libmem_dcc_loader_start(set_param_fn);

    return 0;
  }

This function starts up a LIBMEM loader that uses the older "Comms Channel Loader" protocol, this function has been provided for backward compatibility with earlier products. This form of loader will only run on ARM7 and ARM9s with the debug comms channel.

To use this form of loader the "Target | Loader File Type" project property must be set to "Comms Channel Loader".

Optional parameters can be passed to the loader using CrossStudio's "Target | Loader Parameter" project property which holds a 32 bit integer value. If a parameter value has been set the function set_param_fn will be called when the set parameter message has been received.