OpenOCD
|
Go to the source code of this file.
Macros | |
#define | CPU_RESET 1 |
#define | EZUSB_CPUCS 0xe600 |
#define | SECTION_BUFFERSIZE 16384 |
Maximum size of a single firmware section. More... | |
#define | USBBLASTER_CTRL_LOAD_FIRM 0xA0 |
#define | USBBLASTER_CTRL_READ_REV 0x94 |
#define | USBBLASTER_EPIN 8 |
#define | USBBLASTER_EPOUT 4 |
Functions | |
static int | load_usb_blaster_firmware (struct libusb_device_handle *libusb_dev, struct ublast_lowlevel *low) |
static int | ublast2_libusb_init (struct ublast_lowlevel *low) |
static int | ublast2_libusb_quit (struct ublast_lowlevel *low) |
static int | ublast2_libusb_read (struct ublast_lowlevel *low, uint8_t *buf, unsigned size, uint32_t *bytes_read) |
static int | ublast2_libusb_write (struct ublast_lowlevel *low, uint8_t *buf, int size, uint32_t *bytes_written) |
struct ublast_lowlevel * | ublast2_register_libusb (void) |
static int | ublast2_write_firmware_section (struct libusb_device_handle *libusb_dev, struct image *firmware_image, int section_index) |
Variables | |
static struct ublast_lowlevel | low |
#define CPU_RESET 1 |
Definition at line 27 of file ublast2_access_libusb.c.
#define EZUSB_CPUCS 0xe600 |
Definition at line 26 of file ublast2_access_libusb.c.
#define SECTION_BUFFERSIZE 16384 |
Maximum size of a single firmware section.
Entire EZ-USB code space = 16kB
Definition at line 30 of file ublast2_access_libusb.c.
#define USBBLASTER_CTRL_LOAD_FIRM 0xA0 |
Definition at line 22 of file ublast2_access_libusb.c.
#define USBBLASTER_CTRL_READ_REV 0x94 |
Definition at line 21 of file ublast2_access_libusb.c.
#define USBBLASTER_EPIN 8 |
Definition at line 24 of file ublast2_access_libusb.c.
#define USBBLASTER_EPOUT 4 |
Definition at line 23 of file ublast2_access_libusb.c.
|
static |
A host loader program must write 0x01 to the CPUCS register to put the CPU into RESET, load all or part of the EZUSB RAM with firmware, then reload the CPUCS register with ‘0’ to take the CPU out of RESET. The CPUCS register (at 0xE600) is the only EZ-USB register that can be written using the Firmware Download command.
Definition at line 116 of file ublast2_access_libusb.c.
References image::base_address, image::base_address_set, CPU_RESET, ERROR_FAIL, ERROR_JTAG_INIT_FAILED, ERROR_OK, EZUSB_CPUCS, ublast_lowlevel::firmware_path, image_close(), image_open(), jtag_libusb_control_transfer(), LOG_ERROR, low, image::num_sections, ublast2_write_firmware_section(), and USBBLASTER_CTRL_LOAD_FIRM.
Referenced by ublast2_libusb_init().
|
static |
Definition at line 194 of file ublast2_access_libusb.c.
References buffer, ERROR_FAIL, ERROR_JTAG_INIT_FAILED, ERROR_OK, jtag_libusb_close(), jtag_libusb_control_transfer(), jtag_libusb_open(), ublast_lowlevel::libusb_dev, load_usb_blaster_firmware(), LOG_ERROR, LOG_INFO, low, NULL, ublast_lowlevel::ublast_pid, ublast_lowlevel::ublast_pid_uninit, ublast_lowlevel::ublast_vid, ublast_lowlevel::ublast_vid_uninit, and USBBLASTER_CTRL_READ_REV.
|
static |
Definition at line 255 of file ublast2_access_libusb.c.
|
static |
Definition at line 32 of file ublast2_access_libusb.c.
References jtag_libusb_bulk_read(), ublast_lowlevel::libusb_dev, low, size, and USBBLASTER_EPIN.
|
static |
Definition at line 48 of file ublast2_access_libusb.c.
References jtag_libusb_bulk_write(), ublast_lowlevel::libusb_dev, low, size, and USBBLASTER_EPOUT.
struct ublast_lowlevel* ublast2_register_libusb | ( | void | ) |
Definition at line 272 of file ublast2_access_libusb.c.
References low.
|
static |
Definition at line 65 of file ublast2_access_libusb.c.
References addr, imagesection::base_address, ERROR_FAIL, ERROR_OK, image_read_section(), jtag_libusb_control_transfer(), LOG_DEBUG, SECTION_BUFFERSIZE, image::sections, size, imagesection::size, and USBBLASTER_CTRL_LOAD_FIRM.
Referenced by load_usb_blaster_firmware().
|
static |
Definition at line 255 of file ublast2_access_libusb.c.
Referenced by jtag_set_signals(), load_usb_blaster_firmware(), parse_ranges(), ublast2_libusb_init(), ublast2_libusb_read(), ublast2_libusb_write(), ublast2_register_libusb(), ulink_append_set_signals_cmd(), and ulink_queue_reset().