OpenOCD
cc26xx.c
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 /***************************************************************************
4  * Copyright (C) 2017 by Texas Instruments, Inc. *
5  ***************************************************************************/
6 
7 #ifdef HAVE_CONFIG_H
8 #include "config.h"
9 #endif
10 
11 #include "imp.h"
12 #include "cc26xx.h"
13 #include <helper/binarybuffer.h>
14 #include <helper/time_support.h>
15 #include <target/algorithm.h>
16 #include <target/armv7m.h>
17 #include <target/image.h>
18 
19 #define FLASH_TIMEOUT 8000
20 
21 struct cc26xx_bank {
22  const char *family_name;
23  uint32_t icepick_id;
24  uint32_t user_id;
25  uint32_t device_type;
26  uint32_t sector_length;
27  bool probed;
30  const uint8_t *algo_code;
31  uint32_t algo_size;
33  uint32_t buffer_addr[2];
34  uint32_t params_addr[2];
35 };
36 
37 /* Flash helper algorithm for CC26x0 Chameleon targets */
38 static const uint8_t cc26x0_algo[] = {
39 #include "../../../contrib/loaders/flash/cc26xx/cc26x0_algo.inc"
40 };
41 
42 /* Flash helper algorithm for CC26x2 Agama targets */
43 static const uint8_t cc26x2_algo[] = {
44 #include "../../../contrib/loaders/flash/cc26xx/cc26x2_algo.inc"
45 };
46 
47 static int cc26xx_auto_probe(struct flash_bank *bank);
48 
49 static uint32_t cc26xx_device_type(uint32_t icepick_id, uint32_t user_id)
50 {
51  uint32_t device_type = 0;
52 
53  switch (icepick_id & ICEPICK_ID_MASK) {
54  case CC26X0_ICEPICK_ID:
55  device_type = CC26X0_TYPE;
56  break;
57  case CC26X1_ICEPICK_ID:
58  device_type = CC26X1_TYPE;
59  break;
60  case CC13X0_ICEPICK_ID:
61  device_type = CC13X0_TYPE;
62  break;
64  default:
65  if ((user_id & USER_ID_CC13_MASK) != 0)
66  device_type = CC13X2_TYPE;
67  else
68  device_type = CC26X2_TYPE;
69  break;
70  }
71 
72  return device_type;
73 }
74 
75 static uint32_t cc26xx_sector_length(uint32_t icepick_id)
76 {
77  uint32_t sector_length;
78 
79  switch (icepick_id & ICEPICK_ID_MASK) {
80  case CC26X0_ICEPICK_ID:
81  case CC26X1_ICEPICK_ID:
82  case CC13X0_ICEPICK_ID:
83  /* Chameleon family device */
84  sector_length = CC26X0_SECTOR_LENGTH;
85  break;
87  default:
88  /* Agama family device */
89  sector_length = CC26X2_SECTOR_LENGTH;
90  break;
91  }
92 
93  return sector_length;
94 }
95 
96 static int cc26xx_wait_algo_done(struct flash_bank *bank, uint32_t params_addr)
97 {
98  struct target *target = bank->target;
99  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
100 
101  uint32_t status_addr = params_addr + CC26XX_STATUS_OFFSET;
102  uint32_t status = CC26XX_BUFFER_FULL;
103  long long start_ms;
104  long long elapsed_ms;
105 
106  int retval = ERROR_OK;
107 
108  start_ms = timeval_ms();
109  while (status == CC26XX_BUFFER_FULL) {
110  retval = target_read_u32(target, status_addr, &status);
111  if (retval != ERROR_OK)
112  return retval;
113 
114  elapsed_ms = timeval_ms() - start_ms;
115  if (elapsed_ms > FLASH_TIMEOUT)
116  break;
117 
118  keep_alive();
119  };
120 
121  if (status != CC26XX_BUFFER_EMPTY) {
122  LOG_ERROR("%s: Flash operation failed", cc26xx_bank->family_name);
123  return ERROR_FAIL;
124  }
125 
126  return ERROR_OK;
127 }
128 
129 static int cc26xx_init(struct flash_bank *bank)
130 {
131  struct target *target = bank->target;
132  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
133 
134  int retval;
135 
136  /* Make sure we've probed the flash to get the device and size */
137  retval = cc26xx_auto_probe(bank);
138  if (retval != ERROR_OK)
139  return retval;
140 
141  /* Check for working area to use for flash helper algorithm */
144 
147  if (retval != ERROR_OK)
148  return retval;
149 
150  /* Confirm the defined working address is the area we need to use */
153 
154  /* Write flash helper algorithm into target memory */
157  if (retval != ERROR_OK) {
158  LOG_ERROR("%s: Failed to load flash helper algorithm",
162  return retval;
163  }
164 
165  /* Initialize the ARMv7 specific info to run the algorithm */
168 
169  /* Begin executing the flash helper algorithm */
170  retval = target_start_algorithm(target, 0, NULL, 0, NULL,
172  if (retval != ERROR_OK) {
173  LOG_ERROR("%s: Failed to start flash helper algorithm",
177  return retval;
178  }
179 
180  /*
181  * At this point, the algorithm is running on the target and
182  * ready to receive commands and data to flash the target
183  */
184 
185  return retval;
186 }
187 
188 static int cc26xx_quit(struct flash_bank *bank)
189 {
190  struct target *target = bank->target;
191  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
192 
193  int retval;
194 
195  /* Regardless of the algo's status, attempt to halt the target */
196  (void)target_halt(target);
197 
198  /* Now confirm target halted and clean up from flash helper algorithm */
199  retval = target_wait_algorithm(target, 0, NULL, 0, NULL, 0, FLASH_TIMEOUT,
201 
204 
205  return retval;
206 }
207 
208 static int cc26xx_mass_erase(struct flash_bank *bank)
209 {
210  struct target *target = bank->target;
211  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
212  struct cc26xx_algo_params algo_params;
213 
214  int retval;
215 
216  if (target->state != TARGET_HALTED) {
217  LOG_ERROR("Target not halted");
219  }
220 
221  retval = cc26xx_init(bank);
222  if (retval != ERROR_OK)
223  return retval;
224 
225  /* Initialize algorithm parameters */
226  buf_set_u32(algo_params.address, 0, 32, 0);
227  buf_set_u32(algo_params.length, 0, 32, 4);
228  buf_set_u32(algo_params.command, 0, 32, CC26XX_CMD_ERASE_ALL);
229  buf_set_u32(algo_params.status, 0, 32, CC26XX_BUFFER_FULL);
230 
231  /* Issue flash helper algorithm parameters for mass erase */
233  sizeof(algo_params), (uint8_t *)&algo_params);
234 
235  /* Wait for command to complete */
236  if (retval == ERROR_OK)
238 
239  /* Regardless of errors, try to close down algo */
240  (void)cc26xx_quit(bank);
241 
242  return retval;
243 }
244 
245 FLASH_BANK_COMMAND_HANDLER(cc26xx_flash_bank_command)
246 {
247  struct cc26xx_bank *cc26xx_bank;
248 
249  if (CMD_ARGC < 6)
251 
252  cc26xx_bank = malloc(sizeof(struct cc26xx_bank));
253  if (!cc26xx_bank)
254  return ERROR_FAIL;
255 
256  /* Initialize private flash information */
257  memset((void *)cc26xx_bank, 0x00, sizeof(struct cc26xx_bank));
258  cc26xx_bank->family_name = "cc26xx";
260  cc26xx_bank->sector_length = 0x1000;
261 
262  /* Finish initialization of bank */
263  bank->driver_priv = cc26xx_bank;
264 
265  return ERROR_OK;
266 }
267 
268 static int cc26xx_erase(struct flash_bank *bank, unsigned int first,
269  unsigned int last)
270 {
271  struct target *target = bank->target;
272  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
273  struct cc26xx_algo_params algo_params;
274 
275  uint32_t address;
276  uint32_t length;
277  int retval;
278 
279  if (target->state != TARGET_HALTED) {
280  LOG_ERROR("Target not halted");
282  }
283 
284  /* Do a mass erase if user requested all sectors of flash */
285  if ((first == 0) && (last == (bank->num_sectors - 1))) {
286  /* Request mass erase of flash */
287  return cc26xx_mass_erase(bank);
288  }
289 
290  address = first * cc26xx_bank->sector_length;
291  length = (last - first + 1) * cc26xx_bank->sector_length;
292 
293  retval = cc26xx_init(bank);
294  if (retval != ERROR_OK)
295  return retval;
296 
297  /* Set up algorithm parameters for erase command */
298  buf_set_u32(algo_params.address, 0, 32, address);
299  buf_set_u32(algo_params.length, 0, 32, length);
300  buf_set_u32(algo_params.command, 0, 32, CC26XX_CMD_ERASE_SECTORS);
301  buf_set_u32(algo_params.status, 0, 32, CC26XX_BUFFER_FULL);
302 
303  /* Issue flash helper algorithm parameters for erase */
305  sizeof(algo_params), (uint8_t *)&algo_params);
306 
307  /* If no error, wait for erase to finish */
308  if (retval == ERROR_OK)
310 
311  /* Regardless of errors, try to close down algo */
312  (void)cc26xx_quit(bank);
313 
314  return retval;
315 }
316 
317 static int cc26xx_write(struct flash_bank *bank, const uint8_t *buffer,
318  uint32_t offset, uint32_t count)
319 {
320  struct target *target = bank->target;
321  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
322  struct cc26xx_algo_params algo_params[2];
323  uint32_t size = 0;
324  uint32_t address;
325 
326  uint32_t index;
327  int retval;
328 
329  if (target->state != TARGET_HALTED) {
330  LOG_ERROR("Target not halted");
332  }
333 
334  retval = cc26xx_init(bank);
335  if (retval != ERROR_OK)
336  return retval;
337 
338  /* Initialize algorithm parameters to default values */
339  buf_set_u32(algo_params[0].command, 0, 32, CC26XX_CMD_PROGRAM);
340  buf_set_u32(algo_params[1].command, 0, 32, CC26XX_CMD_PROGRAM);
341 
342  /* Write requested data, ping-ponging between two buffers */
343  index = 0;
344  address = bank->base + offset;
345  while (count > 0) {
346 
349  else
350  size = count;
351 
352  /* Put next block of data to flash into buffer */
354  size, buffer);
355  if (retval != ERROR_OK) {
356  LOG_ERROR("Unable to write data to target memory");
357  break;
358  }
359 
360  /* Update algo parameters for next block */
361  buf_set_u32(algo_params[index].address, 0, 32, address);
362  buf_set_u32(algo_params[index].length, 0, 32, size);
363  buf_set_u32(algo_params[index].status, 0, 32, CC26XX_BUFFER_FULL);
364 
365  /* Issue flash helper algorithm parameters for block write */
367  sizeof(algo_params[index]), (uint8_t *)&algo_params[index]);
368  if (retval != ERROR_OK)
369  break;
370 
371  /* Wait for next ping pong buffer to be ready */
372  index ^= 1;
374  if (retval != ERROR_OK)
375  break;
376 
377  count -= size;
378  buffer += size;
379  address += size;
380 
381  keep_alive();
382  }
383 
384  /* If no error yet, wait for last buffer to finish */
385  if (retval == ERROR_OK) {
386  index ^= 1;
388  }
389 
390  /* Regardless of errors, try to close down algo */
391  (void)cc26xx_quit(bank);
392 
393  return retval;
394 }
395 
396 static int cc26xx_probe(struct flash_bank *bank)
397 {
398  struct target *target = bank->target;
399  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
400 
401  uint32_t sector_length;
402  uint32_t value;
403  int num_sectors;
404  int max_sectors;
405 
406  int retval;
407 
408  retval = target_read_u32(target, FCFG1_ICEPICK_ID, &value);
409  if (retval != ERROR_OK)
410  return retval;
411  cc26xx_bank->icepick_id = value;
412 
413  retval = target_read_u32(target, FCFG1_USER_ID, &value);
414  if (retval != ERROR_OK)
415  return retval;
416  cc26xx_bank->user_id = value;
417 
420 
422 
423  /* Set up appropriate flash helper algorithm */
425  case CC26X0_ICEPICK_ID:
426  case CC26X1_ICEPICK_ID:
427  case CC13X0_ICEPICK_ID:
428  /* Chameleon family device */
430  cc26xx_bank->algo_size = sizeof(cc26x0_algo);
436  max_sectors = CC26X0_MAX_SECTORS;
437  break;
439  default:
440  /* Agama family device */
442  cc26xx_bank->algo_size = sizeof(cc26x2_algo);
448  max_sectors = CC26X2_MAX_SECTORS;
449  break;
450  }
451 
452  retval = target_read_u32(target, CC26XX_FLASH_SIZE_INFO, &value);
453  if (retval != ERROR_OK)
454  return retval;
455  num_sectors = value & 0xff;
456  if (num_sectors > max_sectors)
457  num_sectors = max_sectors;
458 
459  bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
460  if (!bank->sectors)
461  return ERROR_FAIL;
462 
464  bank->num_sectors = num_sectors;
465  bank->size = num_sectors * sector_length;
466  bank->write_start_alignment = 0;
467  bank->write_end_alignment = 0;
469 
470  for (int i = 0; i < num_sectors; i++) {
471  bank->sectors[i].offset = i * sector_length;
472  bank->sectors[i].size = sector_length;
473  bank->sectors[i].is_erased = -1;
474  bank->sectors[i].is_protected = 0;
475  }
476 
477  /* We've successfully determined the stats on the flash bank */
478  cc26xx_bank->probed = true;
479 
480  /* If we fall through to here, then all went well */
481 
482  return ERROR_OK;
483 }
484 
485 static int cc26xx_auto_probe(struct flash_bank *bank)
486 {
487  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
488 
489  int retval = ERROR_OK;
490 
491  if (!cc26xx_bank->probed)
492  retval = cc26xx_probe(bank);
493 
494  return retval;
495 }
496 
497 static int cc26xx_info(struct flash_bank *bank, struct command_invocation *cmd)
498 {
499  struct cc26xx_bank *cc26xx_bank = bank->driver_priv;
500  const char *device;
501 
502  switch (cc26xx_bank->device_type) {
503  case CC26X0_TYPE:
504  device = "CC26x0";
505  break;
506  case CC26X1_TYPE:
507  device = "CC26x1";
508  break;
509  case CC13X0_TYPE:
510  device = "CC13x0";
511  break;
512  case CC13X2_TYPE:
513  device = "CC13x2";
514  break;
515  case CC26X2_TYPE:
516  device = "CC26x2";
517  break;
518  case CC26XX_NO_TYPE:
519  default:
520  device = "Unrecognized";
521  break;
522  }
523 
525  "%s device: ICEPick ID 0x%08" PRIx32 ", USER ID 0x%08" PRIx32 "\n",
527 
528  return ERROR_OK;
529 }
530 
531 const struct flash_driver cc26xx_flash = {
532  .name = "cc26xx",
533  .flash_bank_command = cc26xx_flash_bank_command,
534  .erase = cc26xx_erase,
535  .write = cc26xx_write,
536  .read = default_flash_read,
537  .probe = cc26xx_probe,
538  .auto_probe = cc26xx_auto_probe,
539  .erase_check = default_flash_blank_check,
540  .info = cc26xx_info,
541  .free_driver_priv = default_flash_free_driver_priv,
542 };
@ ARM_MODE_THREAD
Definition: arm.h:94
#define ARMV7M_COMMON_MAGIC
Definition: armv7m.h:224
static const struct device_t * device
Definition: at91rm9200.c:94
Support functions to access arbitrary bits in a byte array.
static void buf_set_u32(uint8_t *_buffer, unsigned int first, unsigned int num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
Definition: binarybuffer.h:34
static const uint8_t cc26x0_algo[]
Definition: cc26xx.c:38
static uint32_t cc26xx_sector_length(uint32_t icepick_id)
Definition: cc26xx.c:75
static int cc26xx_quit(struct flash_bank *bank)
Definition: cc26xx.c:188
FLASH_BANK_COMMAND_HANDLER(cc26xx_flash_bank_command)
Definition: cc26xx.c:245
static int cc26xx_probe(struct flash_bank *bank)
Definition: cc26xx.c:396
static int cc26xx_info(struct flash_bank *bank, struct command_invocation *cmd)
Definition: cc26xx.c:497
#define FLASH_TIMEOUT
Definition: cc26xx.c:19
static const uint8_t cc26x2_algo[]
Definition: cc26xx.c:43
static int cc26xx_auto_probe(struct flash_bank *bank)
Definition: cc26xx.c:485
static int cc26xx_init(struct flash_bank *bank)
Definition: cc26xx.c:129
static int cc26xx_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: cc26xx.c:317
static int cc26xx_mass_erase(struct flash_bank *bank)
Definition: cc26xx.c:208
const struct flash_driver cc26xx_flash
Definition: cc26xx.c:531
static uint32_t cc26xx_device_type(uint32_t icepick_id, uint32_t user_id)
Definition: cc26xx.c:49
static int cc26xx_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: cc26xx.c:268
static int cc26xx_wait_algo_done(struct flash_bank *bank, uint32_t params_addr)
Definition: cc26xx.c:96
#define CC13X0_ICEPICK_ID
Definition: cc26xx.h:19
#define CC26XX_STATUS_OFFSET
Definition: cc26xx.h:72
#define CC26X1_ICEPICK_ID
Definition: cc26xx.h:18
#define CC13X2_TYPE
Definition: cc26xx.h:69
#define CC26X0_ALGO_PARAMS_1
Definition: cc26xx.h:37
#define CC26X2_ALGO_PARAMS_1
Definition: cc26xx.h:47
#define CC26X0_ALGO_BUFFER_0
Definition: cc26xx.h:34
#define CC26XX_BUFFER_FULL
Definition: cc26xx.h:53
#define CC26X0_ICEPICK_ID
Definition: cc26xx.h:17
#define CC26X0_WORKING_SIZE
Definition: cc26xx.h:38
#define CC26XX_FLASH_BASE_ADDR
Definition: cc26xx.h:26
#define ICEPICK_ID_MASK
Definition: cc26xx.h:15
#define CC26XX_BUFFER_EMPTY
Definition: cc26xx.h:52
#define CC26XX_CMD_ERASE_SECTORS
Definition: cc26xx.h:61
#define CC26X0_ALGO_PARAMS_0
Definition: cc26xx.h:36
#define CC26X0_TYPE
Definition: cc26xx.h:65
#define CC26XX_CMD_ERASE_ALL
Definition: cc26xx.h:57
#define CC26X2_ALGO_BUFFER_0
Definition: cc26xx.h:44
#define CC26X0_SECTOR_LENGTH
Definition: cc26xx.h:33
#define FCFG1_ICEPICK_ID
Definition: cc26xx.h:11
#define FCFG1_USER_ID
Definition: cc26xx.h:12
#define CC26X2_ALGO_BUFFER_1
Definition: cc26xx.h:45
#define CC26XX_ALGO_BASE_ADDRESS
Definition: cc26xx.h:29
#define CC26X0_MAX_SECTORS
Definition: cc26xx.h:32
#define CC26XX_NO_TYPE
Definition: cc26xx.h:64
#define CC26XX_FLASH_SIZE_INFO
Definition: cc26xx.h:27
#define CC26XX_CMD_PROGRAM
Definition: cc26xx.h:58
#define CC13X2_CC26X2_ICEPICK_ID
Definition: cc26xx.h:20
#define CC26X0_ALGO_BUFFER_1
Definition: cc26xx.h:35
#define CC26X1_TYPE
Definition: cc26xx.h:66
#define CC26X2_WORKING_SIZE
Definition: cc26xx.h:48
#define CC26X2_MAX_SECTORS
Definition: cc26xx.h:42
#define CC13X0_TYPE
Definition: cc26xx.h:68
#define CC26X2_ALGO_PARAMS_0
Definition: cc26xx.h:46
#define USER_ID_CC13_MASK
Definition: cc26xx.h:23
#define CC26X2_SECTOR_LENGTH
Definition: cc26xx.h:43
#define CC26X2_TYPE
Definition: cc26xx.h:67
void command_print_sameline(struct command_invocation *cmd, const char *format,...)
Definition: command.c:352
#define ERROR_COMMAND_SYNTAX_ERROR
Definition: command.h:400
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
Definition: command.h:151
uint64_t buffer
Pointer to data buffer to send over SPI.
Definition: dw-spi-helper.h:0
uint32_t size
Size of dw_spi_transaction::buffer.
Definition: dw-spi-helper.h:4
uint32_t address
Starting address. Sector aligned.
Definition: dw-spi-helper.h:0
uint8_t bank
Definition: esirisc.c:135
uint8_t length
Definition: esp_usb_jtag.c:1
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
void keep_alive(void)
Definition: log.c:427
#define ERROR_FAIL
Definition: log.h:174
#define LOG_ERROR(expr ...)
Definition: log.h:133
#define ERROR_OK
Definition: log.h:168
unsigned int common_magic
Definition: armv7m.h:299
enum arm_mode core_mode
Definition: armv7m.h:301
uint8_t address[4]
Definition: cc26xx.h:74
uint8_t command[4]
Definition: cc26xx.h:76
uint8_t status[4]
Definition: cc26xx.h:77
uint8_t length[4]
Definition: cc26xx.h:75
struct armv7m_algorithm armv7m_info
Definition: cc26xx.c:29
uint32_t algo_working_size
Definition: cc26xx.c:32
struct working_area * working_area
Definition: cc26xx.c:28
bool probed
Definition: cc26xx.c:27
const uint8_t * algo_code
Definition: cc26xx.c:30
const char * family_name
Definition: cc26xx.c:22
uint32_t user_id
Definition: cc26xx.c:24
uint32_t icepick_id
Definition: cc26xx.c:23
uint32_t sector_length
Definition: cc26xx.c:26
uint32_t buffer_addr[2]
Definition: cc26xx.c:33
uint32_t device_type
Definition: cc26xx.c:25
uint32_t algo_size
Definition: cc26xx.c:31
uint32_t params_addr[2]
Definition: cc26xx.c:34
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Definition: command.h:76
Provides details of a flash bank, available either on-chip or through a major interface.
Definition: nor/core.h:75
Provides the implementation-independent structure that defines all of the callbacks required by OpenO...
Definition: nor/driver.h:39
const char * name
Gives a human-readable name of this flash driver, This field is used to select and initialize the dri...
Definition: nor/driver.h:44
Describes the geometry and status of a single flash sector within a flash bank.
Definition: nor/core.h:28
Definition: target.h:119
enum target_state state
Definition: target.h:160
target_addr_t address
Definition: target.h:89
int target_halt(struct target *target)
Definition: target.c:516
int target_write_buffer(struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer)
Definition: target.c:2351
int target_alloc_working_area(struct target *target, uint32_t size, struct working_area **area)
Definition: target.c:2070
int target_free_working_area(struct target *target, struct working_area *area)
Free a working area.
Definition: target.c:2128
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)
Definition: target.c:2559
int target_wait_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t exit_point, unsigned int timeout_ms, void *arch_info)
Waits for an algorithm started with target_start_algorithm() to complete.
Definition: target.c:868
int target_start_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, void *arch_info)
Executes a target-specific native code algorithm and leaves it running.
Definition: target.c:824
#define ERROR_TARGET_NOT_HALTED
Definition: target.h:786
@ TARGET_HALTED
Definition: target.h:58
#define ERROR_TARGET_RESOURCE_NOT_AVAILABLE
Definition: target.h:790
int64_t timeval_ms(void)
#define NULL
Definition: usb.h:16
uint8_t status[4]
Definition: vdebug.c:17
uint8_t cmd
Definition: vdebug.c:1
uint8_t offset[4]
Definition: vdebug.c:9
uint8_t count[4]
Definition: vdebug.c:22