Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the foe code of the rtl_slavedemo application #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions applications/rtl_slavedemo/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void boot_inithook (void)
}
}

uint32_t flash_foe_buffer (foe_writefile_cfg_t * self, uint8_t * data, size_t length)
uint32_t flash_foe_buffer (foe_file_cfg_t * self, uint8_t * data, size_t length)
{
uint32_t flash_cmd_failed = 0;
uint32_t calculated_address = self->dest_start_address + self->address_offset;
Expand Down Expand Up @@ -92,14 +92,15 @@ void bootstrap_foe_init (void)
* extern uint32_t flash_start;
*/
/* This part is Cortex M4 Kinetis specific therefore placed in Hooks*/
static foe_writefile_cfg_t files[] =
static foe_file_cfg_t files[] =
{
{
.name = "ato.bin",
.max_data = FLASH_BLOCK_SIZE,
.dest_start_address = FLASH_BLOCK_SIZE + 0, /* + (uint32_t)&flash_start,*/
.address_offset = 0,
.filepass = 0,
.write_only_in_boot = 1,
.write_function = flash_foe_buffer /* NULL if not used */
},
{
Expand All @@ -109,6 +110,7 @@ void bootstrap_foe_init (void)
(FLASH_EEPROM_SECTIONS * FLASH_SECTOR_SIZE),
.address_offset = 0,
.filepass = 0,
.write_only_in_boot = 1,
.write_function = flash_foe_buffer /* NULL if not used */
},
};
Expand All @@ -122,7 +124,7 @@ void bootstrap_foe_init (void)
.files = files
};

FOE_config ((foe_cfg_t *)&config, (foe_writefile_cfg_t *)&files);
FOE_config ((foe_cfg_t *)&config);
}

void bootstrap_state (void)
Expand Down