#include "target_type.h"
#include "armv7m.h"
#include "cortex_m.h"
+#include "arm_adi_v5.h"
#include "arm_semihosting.h"
#include "target_request.h"
#include <rtt/rtt.h>
{
LOG_DEBUG("%s", __func__);
struct adiv5_private_config *pc = target->private_config;
- if (pc != NULL && pc->ap_num > 0) {
+ if (pc && pc->ap_num > 0) {
LOG_ERROR("hla_target: invalid parameter -ap-num (> 0)");
return ERROR_COMMAND_SYNTAX_ERROR;
}
return ERROR_FAIL;
}
+ cortex_m->common_magic = CORTEX_M_COMMON_MAGIC;
+
adapter_init_arch_info(target, cortex_m, target->tap);
return ERROR_OK;
return adapter->layout->api->write_mem(adapter->handle, address, size, count, buffer);
}
-static const struct command_registration adapter_command_handlers[] = {
+static const struct command_registration hla_command_handlers[] = {
{
.chain = arm_command_handlers,
},
.target_create = adapter_target_create,
.target_jim_configure = adiv5_jim_configure,
.examine = cortex_m_examine,
- .commands = adapter_command_handlers,
+ .commands = hla_command_handlers,
.poll = adapter_poll,
.arch_state = armv7m_arch_state,