Commit de330ca5 authored by oharboe's avatar oharboe
Browse files

Edwin Olson found bug & tested fix for flash write_image for stellaris.

git-svn-id: svn://svn.berlios.de/openocd/trunk@550 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 30cda620
...@@ -459,6 +459,17 @@ int stellaris_read_part_info(struct flash_bank_s *bank) ...@@ -459,6 +459,17 @@ int stellaris_read_part_info(struct flash_bank_s *bank)
stellaris_info->pages_in_lockregion = 2; stellaris_info->pages_in_lockregion = 2;
target_read_u32(target, SCB_BASE|FMPPE, &stellaris_info->lockbits); target_read_u32(target, SCB_BASE|FMPPE, &stellaris_info->lockbits);
/* provide this for the benefit of the higher flash driver layers */
bank->num_sectors = stellaris_info->num_pages;
bank->sectors = malloc(sizeof(flash_sector_t) * bank->num_sectors);
for (i = 0; i < bank->num_sectors; i++)
{
bank->sectors[i].offset = i*stellaris_info->pagesize;
bank->sectors[i].size = stellaris_info->pagesize;
bank->sectors[i].is_erased = -1;
bank->sectors[i].is_protected = -1;
}
/* Read main and master clock freqency register */ /* Read main and master clock freqency register */
stellaris_read_clock_info(bank); stellaris_read_clock_info(bank);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment