|
|
@@ -20,13 +20,18 @@
|
|
|
* Debug stubs entries IDs
|
|
|
*/
|
|
|
typedef enum {
|
|
|
- ESP_DBG_STUB_CONTROL_DATA, ///< stubs descriptor entry
|
|
|
+ ESP_DBG_STUB_MAGIC_NUM,
|
|
|
+ ESP_DBG_STUB_CONTROL_DATA, ///< stubs descriptor entry
|
|
|
ESP_DBG_STUB_ENTRY_FIRST,
|
|
|
- ESP_DBG_STUB_ENTRY_GCOV ///< GCOV entry
|
|
|
- = ESP_DBG_STUB_ENTRY_FIRST,
|
|
|
+ ESP_DBG_STUB_ENTRY_GCOV ///< GCOV entry
|
|
|
+ = ESP_DBG_STUB_ENTRY_FIRST,
|
|
|
+ ESP_DBG_STUB_CAPABILITIES,
|
|
|
ESP_DBG_STUB_ENTRY_MAX
|
|
|
} esp_dbg_stub_id_t;
|
|
|
|
|
|
+#define ESP_DBG_STUB_MAGIC_NUM_VAL 0xFEEDBEEF
|
|
|
+#define ESP_DBG_STUB_CAP_GCOV_TASK (1 << 0)
|
|
|
+
|
|
|
/**
|
|
|
* @brief Initializes debug stubs.
|
|
|
*
|
|
|
@@ -41,10 +46,22 @@ void esp_dbg_stubs_init(void);
|
|
|
*
|
|
|
* @param id Stub ID.
|
|
|
* @param entry Stub entry. Usually it is stub entry function address,
|
|
|
- * but can be any value meaningfull for OpenOCD command/code.
|
|
|
- *
|
|
|
+ * but can be any value meaningfull for OpenOCD command/code
|
|
|
+ * such as capabilities
|
|
|
* @return ESP_OK on success, otherwise see esp_err_t
|
|
|
*/
|
|
|
esp_err_t esp_dbg_stub_entry_set(esp_dbg_stub_id_t id, uint32_t entry);
|
|
|
|
|
|
-#endif //ESP_DBG_STUBS_H_
|
|
|
+/**
|
|
|
+ * @brief Retrives the corresponding stub entry
|
|
|
+ *
|
|
|
+ * @param id Stub ID.
|
|
|
+ * @param entry Stub entry. Usually it is stub entry function address,
|
|
|
+ * but can be any value meaningfull for OpenOCD command/code
|
|
|
+ * such as capabilities
|
|
|
+ *
|
|
|
+ * @return ESP_OK on success, otherwise see esp_err_t
|
|
|
+ */
|
|
|
+esp_err_t esp_dbg_stub_entry_get(esp_dbg_stub_id_t id, uint32_t *entry);
|
|
|
+
|
|
|
+#endif //ESP_DBG_STUBS_H_
|