- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I want to chang dct size to 2k.I modify bootapp_link.ld bootloader_link.ld dct_link.ld
to
MEMORY
{
BTLDR_VECTORS (rx) : ORIGIN = 0x08000000, LENGTH = 512
BTLDR_API (rx) : ORIGIN = 0x08000200, LENGTH = 512
BTLDR_CODE (rx) : ORIGIN = 0x08000400, LENGTH = 15K
DCT1_FLASH (rx) : ORIGIN = 0x08004000, LENGTH = 2K
DCT2_FLASH (rx) : ORIGIN = 0x08004800, LENGTH = 2K
APP_HDR (rx) : ORIGIN = 0x08005000, LENGTH = 512
APP_CODE (rx) : ORIGIN = 0x08005200, LENGTH = 0x3AE00
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
}
APP can't run.
But if I change memory map to
MEMORY
{
BTLDR_VECTORS (rx) : ORIGIN = 0x08000000, LENGTH = 512
BTLDR_API (rx) : ORIGIN = 0x08000200, LENGTH = 512
BTLDR_CODE (rx) : ORIGIN = 0x08000400, LENGTH = 15K
DCT1_FLASH (rx) : ORIGIN = 0x08004000, LENGTH = 2K
DCT2_FLASH (rx) : ORIGIN = 0x08004800, LENGTH = 2K
APP_HDR (rx) : ORIGIN = 0x08008000, LENGTH = 512
APP_CODE (rx) : ORIGIN = 0x08008200, LENGTH = 0x3AE00
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
}
app wull run ok.
The APP_HDR address can't modify ?
- Labels:
-
DCT
- Tags:
- dct
- memory map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The STM32Fxxxx flash sector size to erase is 16K. When the DCT1 and DCT2 are updated the corresponding sectors are erased and updated with new values. With current implementation the sector size is the limiting factor for DCT size.
With different DCT storage implementation, the DCT flash size could be reduced.
Thanks,
Seyhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks your replying.I use STM32F10x MCU with flash page size is 2k.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, the flash will be erased in 8K page "chunks" regardless. So it is not recommended to change to 2K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your reply.sorry,I don't understand 8K page "chunks" .stm33f103 page size is 2k,I try make dct size to 2k.It can work,but the app start addrees must be more than 0x08008000。
stm32f1xx_platform.c file
#define ERASE_DCT_1() platform_erase_flash( FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY1_START_ADDRESS), FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY1_END_ADDRESS) )
#define ERASE_DCT_2() platform_erase_flash( FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY2_START_ADDRESS), FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY2_END_ADDRESS) )
/* for stm33f103 the size of the page is 2k !!!! , it depends on the type of the stm32f1 device, high, low and medium density devices exist */
#define PLATFORM_FLASH_PAGE_SIZE ( 2*1024 )
Best Regards
chenchuang
浙江生辉照明上海研发中心
Shanghai R&D Center
Zhejiang Shenghui Lighting Co., Ltd
Tel: 021-60707500-8090
Email:chenc@sengled.com
上海市漕河泾开发区田林路388号新业大楼1栋8楼801
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Make sure the data is written would fit into the reserved flash memory.
-Seyhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Thanks for your reply.
I find only download application will change the bootloader data by WICED IDE.Download boot and dct is ok.
But I don't find the reason of the openocd write application change boot.
if I download bootloader,dct,application by jlink,The code run ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Discussion is being locked. If you have any follow-up, please start a new discussion.