About testing the flash configuration
With the files described in the previous sections in place, it should be possible to make a connection to the target in DS-5 and inspect the flash devices available and program an image. Although, with the files in their current form, no data will actually be written to flash.
NoteIf DS-5 is already open and project_types.xml is changed, it will be necessary to rebuild the configuration database.
Within DS-5 Debugger, connect to your target system and enter info flash into the Commands view. You should get an output similar to:
info flash MainFlash regions: 0x8000000-0x807FFFF parameters: programPageTimeout: 100 driverVersion: 257 programPageSize: 0x400 eraseSectorTimeout: 500 sectorSizes: ((0x800, 0x00000000)) valEmpty: 0xff type: 1 size: 0x00080000 name: STM32F10x High-density Flash address: 0x08000000 algorithm: FDB://algorithms/STM32F10x_512.FLM coreName: Cortex-M3 ramAddress: 0x20000000 ramSize: 0x10000 disableTimeouts: false verify: true
You can test the flash programming operation by attempting to program with a test ELF file.
flash load flashyprogram.axf Writing segment 0x00008000 ~ 0x0000810C (size 0x10C) Flash programming completed OK (target state has been preserved)