|
22 | 22 | */
|
23 | 23 |
|
24 | 24 | #ifndef TARGET_MCU_CORTEX_A
|
25 |
| -#include "device.h" |
26 |
| -#include "cmsis_os2.h" |
27 |
| -#include "target_config.h" |
28 |
| -#include "DAP_config.h" |
29 |
| -#include "DAP.h" |
30 |
| -#include "target_family.h" |
31 |
| -#include "swd_host.h" |
| 25 | +#include "components/DAP/config/target_config.h" |
| 26 | +#include "components/DAP/config/DAP_config.h" |
| 27 | +#include "components/DAP/include/DAP.h" |
| 28 | +#include "components/DAP/include/target_family.h" |
| 29 | +#include "components/DAP/include/swd_host.h" |
32 | 30 |
|
33 | 31 | // Default NVIC and Core debug base addresses
|
34 | 32 | // TODO: Read these addresses from ROM.
|
@@ -66,6 +64,17 @@ static SWD_CONNECT_TYPE reset_connect = CONNECT_NORMAL;
|
66 | 64 |
|
67 | 65 | static DAP_STATE dap_state;
|
68 | 66 | static uint32_t soft_reset = SYSRESETREQ;
|
| 67 | +uint32_t target_get_apsel() |
| 68 | +{ |
| 69 | + /* not support */ |
| 70 | + // if (g_target_family && g_target_family->apsel) { |
| 71 | + // return g_target_family->apsel; |
| 72 | + // } else { |
| 73 | + // return 0; |
| 74 | + // } |
| 75 | + |
| 76 | + return 0; |
| 77 | +} |
69 | 78 |
|
70 | 79 | static uint32_t swd_get_apsel(uint32_t adr)
|
71 | 80 | {
|
@@ -824,9 +833,11 @@ uint8_t swd_init_debug(void)
|
824 | 833 | // call a target dependant function
|
825 | 834 | // this function can do several stuff before really
|
826 | 835 | // initing the debug
|
827 |
| - if (g_target_family && g_target_family->target_before_init_debug) { |
828 |
| - g_target_family->target_before_init_debug(); |
829 |
| - } |
| 836 | + |
| 837 | + /* not support */ |
| 838 | + // if (g_target_family && g_target_family->target_before_init_debug) { |
| 839 | + // g_target_family->target_before_init_debug(); |
| 840 | + // } |
830 | 841 |
|
831 | 842 | if (!JTAG2SWD()) {
|
832 | 843 | do_abort = 1;
|
@@ -874,9 +885,11 @@ uint8_t swd_init_debug(void)
|
874 | 885 | // call a target dependant function:
|
875 | 886 | // some target can enter in a lock state
|
876 | 887 | // this function can unlock these targets
|
877 |
| - if (g_target_family && g_target_family->target_unlock_sequence) { |
878 |
| - g_target_family->target_unlock_sequence(); |
879 |
| - } |
| 888 | + |
| 889 | + /* not support */ |
| 890 | + // if (g_target_family && g_target_family->target_unlock_sequence) { |
| 891 | + // g_target_family->target_unlock_sequence(); |
| 892 | + // } |
880 | 893 |
|
881 | 894 | if (!swd_write_dp(DP_SELECT, 0)) {
|
882 | 895 | do_abort = 1;
|
|
0 commit comments