OpenOCD
|
Go to the source code of this file.
Macros | |
#define | __bool_true_false_are_defined 1 |
#define | __stringify(s) #s |
#define | ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) |
Compute the number of elements of a variable length array. More... | |
#define | container_of(ptr, type, member) |
Cast a member of a structure out to the containing structure. More... | |
#define | DIV_ROUND_UP(m, n) (((m) + (n) - 1) / (n)) |
Rounds m up to the nearest multiple of n using division. More... | |
#define | false 0 |
#define | stringify(s) __stringify(s) |
turns a macro argument into a string constant More... | |
#define | TARGET_ADDR_FMT "0x%8.8" TARGET_PRIxADDR |
#define | TARGET_ADDR_MAX UINT64_MAX |
#define | TARGET_PRIdADDR PRId64 |
#define | TARGET_PRIoADDR PRIo64 |
#define | TARGET_PRIuADDR PRIu64 |
#define | TARGET_PRIxADDR PRIx64 |
#define | TARGET_PRIXADDR PRIX64 |
#define | true 1 |
Typedefs | |
typedef uint64_t | target_addr_t |
Functions | |
static uint16_t | be_to_h_u16 (const uint8_t *buf) |
static uint32_t | be_to_h_u24 (const uint8_t *buf) |
static uint32_t | be_to_h_u32 (const uint8_t *buf) |
static uint64_t | be_to_h_u64 (const uint8_t *buf) |
static void | buf_bswap16 (uint8_t *dst, const uint8_t *src, size_t len) |
Byte-swap buffer 16-bit. More... | |
static void | buf_bswap32 (uint8_t *dst, const uint8_t *src, size_t len) |
Byte-swap buffer 32-bit. More... | |
static void | h_u16_to_be (uint8_t *buf, uint16_t val) |
static void | h_u16_to_le (uint8_t *buf, uint16_t val) |
static void | h_u24_to_be (uint8_t *buf, unsigned int val) |
static void | h_u24_to_le (uint8_t *buf, unsigned int val) |
static void | h_u32_to_be (uint8_t *buf, uint32_t val) |
static void | h_u32_to_le (uint8_t *buf, uint32_t val) |
static void | h_u64_to_be (uint8_t *buf, uint64_t val) |
static void | h_u64_to_le (uint8_t *buf, uint64_t val) |
static uint16_t | le_to_h_u16 (const uint8_t *buf) |
static uint32_t | le_to_h_u24 (const uint8_t *buf) |
static uint32_t | le_to_h_u32 (const uint8_t *buf) |
static uint64_t | le_to_h_u64 (const uint8_t *buf) |
static int | parity_u32 (uint32_t x) |
Calculate the (even) parity of a 32-bit datum. More... | |
#define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof(*(x))) |
Compute the number of elements of a variable length array.
const char *strs[] = { "a", "b", "c" }; unsigned num_strs = ARRAY_SIZE(strs);
#define container_of | ( | ptr, | |
type, | |||
member | |||
) |
Cast a member of a structure out to the containing structure.
ptr | The pointer to the member. |
type | The type of the container struct this is embedded in. |
member | The name of the member within the struct. |
This is a mechanism which is used throughout the Linux kernel.
#define DIV_ROUND_UP | ( | m, | |
n | |||
) | (((m) + (n) - 1) / (n)) |
#define stringify | ( | s | ) | __stringify(s) |
typedef uint64_t target_addr_t |
|
inlinestatic |
Definition at line 149 of file types.h.
Referenced by buf_bswap16(), COMMAND_HANDLER(), read_section(), stlink_usb_version(), stm8_read_regs(), target_buffer_get_u16(), and xscale_send().
|
inlinestatic |
Definition at line 144 of file types.h.
Referenced by stm8_read_regs(), and target_buffer_get_u24().
|
inlinestatic |
Definition at line 139 of file types.h.
Referenced by arc_read_instruction_u32(), avr32_jtag_read_memory16(), avr32_jtag_read_memory32(), avr32_jtag_write_memory16(), avr32_jtag_write_memory8(), buf_bswap32(), COMMAND_HANDLER(), fast_target_buffer_get_u32(), fileio_read_u32(), image_ihex_buffer_complete_inner(), lattice_read_bit_file(), read_section(), target_buffer_get_u32(), and xscale_send().
|
inlinestatic |
Definition at line 127 of file types.h.
Referenced by target_buffer_get_u64().
|
inlinestatic |
Byte-swap buffer 16-bit.
Len must be even, dst and src must be either the same or non-overlapping.
dst | Destination buffer. |
src | Source buffer. |
len | Length of source (and destination) buffer, in bytes. |
Definition at line 229 of file types.h.
References be_to_h_u16(), and h_u16_to_le().
Referenced by cfi_write(), or1k_adv_jtag_read_memory(), and or1k_adv_jtag_write_memory().
|
inlinestatic |
Byte-swap buffer 32-bit.
Len must be divisible by four, dst and src must be either the same or non-overlapping.
dst | Destination buffer. |
src | Source buffer. |
len | Length of source (and destination) buffer, in bytes. |
Definition at line 249 of file types.h.
References be_to_h_u32(), and h_u32_to_le().
Referenced by cfi_write(), or1k_adv_jtag_read_memory(), or1k_adv_jtag_write_memory(), rpc_hf_xfer(), xtensa_read_memory(), and xtensa_write_memory().
|
inlinestatic |
Definition at line 214 of file types.h.
Referenced by arm7_9_endianness_callback(), esirisc_jtag_read_csr(), esirisc_jtag_write_csr(), esirisc_jtag_write_hword(), stlink_swim_readbytes(), stlink_swim_writebytes(), stm8_write_regs(), target_buffer_set_u16(), and vdebug_socket_open().
|
inlinestatic |
Definition at line 208 of file types.h.
Referenced by arm7_9_endianness_callback(), buf_bswap16(), cmsis_dap_cmd_dap_swo_data(), cmsis_dap_cmd_dap_tfer_configure(), cmsis_dap_swd_write_from_queue(), isc_program_ccb(), nulink2_usb_init_buffer(), stlink_read_dap_register(), stlink_usb_buf_rw_segment(), stlink_usb_read_mem16(), stlink_usb_read_mem32(), stlink_usb_read_mem32_noaddrinc(), stlink_usb_read_mem8(), stlink_usb_set_jtagclk(), stlink_usb_set_swdclk(), stlink_usb_trace_enable(), stlink_usb_write_mem16(), stlink_usb_write_mem32(), stlink_usb_write_mem32_noaddrinc(), stlink_usb_write_mem8(), target_buffer_set_u16(), vdebug_close(), vdebug_jtag_clock(), vdebug_jtag_shift_tap(), vdebug_mem_close(), vdebug_mem_open(), vdebug_open(), vdebug_reg_read(), vdebug_reg_write(), vdebug_run_jtag_queue(), vdebug_run_reg_queue(), vdebug_sig_set(), and vdebug_wait().
|
inlinestatic |
Definition at line 201 of file types.h.
Referenced by stm8_write_regs(), and target_buffer_set_u24().
|
inlinestatic |
Definition at line 194 of file types.h.
Referenced by isc_adr_shift(), stlink_usb_read_mem16(), stlink_usb_read_mem32(), stlink_usb_read_mem32_noaddrinc(), stlink_usb_read_mem8(), stlink_usb_write_mem16(), stlink_usb_write_mem32(), stlink_usb_write_mem32_noaddrinc(), stlink_usb_write_mem8(), and target_buffer_set_u24().
|
inlinestatic |
Definition at line 186 of file types.h.
Referenced by angie_load_bitstream(), arc_write_instruction_u32(), arm7_9_endianness_callback(), avr32_jtag_write_memory16(), avr32_jtag_write_memory32(), avr32_jtag_write_memory8(), esirisc_jtag_read_byte(), esirisc_jtag_read_hword(), esirisc_jtag_read_word(), esirisc_jtag_write_byte(), esirisc_jtag_write_csr(), esirisc_jtag_write_hword(), esirisc_jtag_write_reg(), esirisc_jtag_write_word(), fileio_write_u32(), jtagspi_cmd(), nrf5_info_variant_to_str(), stlink_swim_readbytes(), stlink_swim_writebytes(), and target_buffer_set_u32().
|
inlinestatic |
Definition at line 178 of file types.h.
Referenced by arm7_9_endianness_callback(), arm7_9_target_request_data(), buf_bswap32(), cmsis_dap_cmd_dap_swj_clock(), cmsis_dap_cmd_dap_swj_pins(), cmsis_dap_cmd_dap_swo_baudrate(), cmsis_dap_metacmd_targetsel(), cmsis_dap_swd_write_from_queue(), h_to_le_32(), icdi_usb_state(), icdi_usb_write_reg(), isc_program_single_revision_btc(), jtag_vpi_send_cmd(), lattice_ecp2_3_write_usercode(), lattice_ecp5_write_usercode(), lattice_read_u32_register(), nrf5_info_variant_to_str(), nulink_speed(), nulink_usb_assert_srst(), nulink_usb_halt(), nulink_usb_idcode(), nulink_usb_read_mem32(), nulink_usb_read_mem8(), nulink_usb_read_reg(), nulink_usb_reset(), nulink_usb_run(), nulink_usb_state(), nulink_usb_step(), nulink_usb_write_mem32(), nulink_usb_write_mem8(), nulink_usb_write_reg(), riscv_init_target(), stlink_set_com_freq(), stlink_tcp_close(), stlink_tcp_xfer_noerrcheck(), stlink_usb_buf_rw_segment(), stlink_usb_misc_rw_segment(), stlink_usb_read_mem16(), stlink_usb_read_mem32(), stlink_usb_read_mem32_noaddrinc(), stlink_usb_read_mem8(), stlink_usb_rw_misc_out(), stlink_usb_trace_enable(), stlink_usb_v2_read_debug_reg(), stlink_usb_write_debug_reg(), stlink_usb_write_mem16(), stlink_usb_write_mem32(), stlink_usb_write_mem32_noaddrinc(), stlink_usb_write_mem8(), stlink_usb_write_reg(), target_buffer_set_u32(), vdebug_jtag_clock(), vdebug_mem_close(), vdebug_open(), vdebug_reg_write(), vdebug_run_jtag_queue(), vdebug_run_reg_queue(), vdebug_sig_set(), and vdebug_wait().
|
inlinestatic |
Definition at line 166 of file types.h.
Referenced by target_buffer_set_u64().
|
inlinestatic |
Definition at line 154 of file types.h.
Referenced by lattice_read_u64_register(), target_buffer_set_u64(), vdebug_jtag_shift_tap(), vdebug_reg_read(), and vdebug_reg_write().
|
inlinestatic |
Definition at line 122 of file types.h.
Referenced by arm7_9_endianness_callback(), cmsis_dap_cmd_dap_swo_data(), cmsis_dap_swd_read_process(), esirisc_jtag_read_hword(), esp_usb_jtag_init(), isc_read_ccb(), nand_write_data_page(), nulink_speed(), nulink_usb_version(), stlink_usb_buf_rw_segment(), stlink_usb_state(), stlink_usb_version(), target_buffer_get_u16(), target_hexmsg(), vdebug_dap_run(), vdebug_jtag_shift_tap(), vdebug_mem_open(), vdebug_open(), vdebug_reg_read(), vdebug_reg_write(), vdebug_run_jtag_queue(), vdebug_run_reg_queue(), vdebug_socket_receive(), vdebug_socket_send(), and xscale_send().
|
inlinestatic |
Definition at line 117 of file types.h.
Referenced by jtagspi_probe(), and target_buffer_get_u24().
|
inlinestatic |
Definition at line 112 of file types.h.
Referenced by arm7_9_endianness_callback(), arm7flip32(), arm_blank_check_memory(), arm_checksum_memory(), arm_le_to_h_u32(), cmsis_dap_cmd_dap_swo_baudrate(), cmsis_dap_cmd_dap_swo_status(), cmsis_dap_get_swo_buf_sz(), cmsis_dap_swd_read_process(), davinci_write_block_data(), erase_command(), esirisc_jtag_read_csr(), esirisc_jtag_read_reg(), esirisc_jtag_read_word(), fast_target_buffer_get_u32(), gowin_read_register(), icdi_usb_read_reg(), jtag_vpi_receive_cmd(), jtagdp_overrun_check(), kitprog_swd_run_queue(), lattice_read_u32_register(), mips_le_to_h_u32(), nulink_usb_halt(), nulink_usb_idcode(), nulink_usb_read_reg(), nulink_usb_step(), nulink_usb_version(), read_sfdp_block(), stlink_get_com_freq(), stlink_open(), stlink_read_dap_register(), stlink_tcp_send_cmd(), stlink_usb_buf_rw_segment(), stlink_usb_check_voltage(), stlink_usb_idcode(), stlink_usb_misc_rw_segment(), stlink_usb_read_reg(), stlink_usb_v2_read_debug_reg(), target_buffer_get_u32(), target_hexmsg(), vdebug_jtag_shift_tap(), vdebug_mem_open(), vdebug_open(), vdebug_run_reg_queue(), vdebug_wait_server(), virtexflip32(), xscale_deassert_reset(), and xscale_send().
|
inlinestatic |
Definition at line 100 of file types.h.
Referenced by lattice_read_u64_register(), mips_le_to_h_u64(), target_buffer_get_u64(), vdebug_run_jtag_queue(), and vdebug_run_reg_queue().
|
inlinestatic |
Calculate the (even) parity of a 32-bit datum.
x | The datum. |
Definition at line 265 of file types.h.
Referenced by bitbang_swd_read_reg(), bitbang_swd_write_reg(), buspirate_swd_read_reg(), buspirate_swd_write_reg(), cmsis_dap_metacmd_targetsel(), ftdi_swd_queue_cmd(), ftdi_swd_run_queue(), jlink_swd_run_queue(), swd_cmd(), xlnx_pcie_xvc_swd_read_reg(), and xlnx_pcie_xvc_swd_write_reg().