Merge pull request #49 from UweBonnes/master
[fw/stlink] / src / stlink-common.h
index a9834a476ca10b51b1ee4e98735850035ebf7e4f..155c6c003083e5e3fe45c4b253ccb67d3370e222 100644 (file)
@@ -112,6 +112,11 @@ extern "C" {
 /* using chip id for F4 ident, since core id is same as F1 */
 #define STM32F4_CHIP_ID 0x413
 
+/* Cortex™-M3 Technical Reference Manual */
+/* Debug Halting Control and Status Register */
+#define DHCSR 0xe000edf0
+#define DBGKEY 0xa05f0000
+
 /* Enough space to hold both a V2 command or a V1 command packaged as generic scsi*/
 #define C_BUF_LEN 32
 
@@ -358,6 +363,7 @@ extern "C" {
     int stlink_erase_flash_mass(stlink_t* sl);
     int stlink_write_flash(stlink_t* sl, stm32_addr_t address, uint8_t* data, unsigned length);
     int stlink_fwrite_flash(stlink_t *sl, const char* path, stm32_addr_t addr);
+    int stlink_fwrite_sram(stlink_t *sl, const char* path, stm32_addr_t addr);
     int stlink_verify_write_flash(stlink_t *sl, stm32_addr_t address, uint8_t *data, unsigned length);
     
     // PUBLIC