2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-07-19 13:02:18 +10:00

- corrected error with stm32 page calculation

git-svn-id: svn://svn.berlios.de/openocd/trunk@686 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
ntfreak 2008-05-26 11:04:20 +00:00
parent 3a11ebf860
commit 6945fb26c8

View File

@ -664,7 +664,8 @@ int stm32x_probe(struct flash_bank_s *bank)
LOG_INFO( "flash size = %dkbytes", num_pages );
/* calculate numbers of pages */
num_pages /= (page_size - 1024);
if (page_size - 1024)
num_pages /= (page_size - 1024);
bank->base = 0x08000000;
bank->size = (num_pages * page_size);