• 大小: 16.29MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-14
  • 语言: 其他
  • 标签: 仿真器  

资源简介

仿真器,含有详细的教程,内含原理图,代码,WIN7的驱动等等

资源截图

代码片段和文件信息

/******************************************************************************
 * @file     DAP.c
 * @brief    CMSIS-DAP Commands
 * @version  V1.00
 * @date     31. May 2012
 *
 * @note
 * Copyright (C) 2012 ARM Limited. All rights reserved.
 *
 * @par
 * ARM Limited (ARM) is supplying this software for use with Cortex-M
 * processor based microcontrollers.
 *
 * @par
 * THIS SOFTWARE IS PROVIDED “AS IS“.  NO WARRANTIES WHETHER EXPRESS IMPLIED
 * OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
 * ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
 * CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
 *
 ******************************************************************************/

#include 
#include “DAP_config.h“
#include “DAP.h“


#define DAP_FW_VER      “1.0“   // Firmware Version


#if (DAP_PACKET_SIZE < 64)
#error “Minimum Packet Size is 64“
#endif
#if (DAP_PACKET_SIZE > 32768)
#error “Maximum Packet Size is 32768“
#endif
#if (DAP_PACKET_COUNT < 1)
#error “Minimum Packet Count is 1“
#endif
#if (DAP_PACKET_COUNT > 255)
#error “Maximum Packet Count is 255“
#endif


// Clock Macros

#define MAX_SWJ_CLOCK(delay_cycles) ( CPU_CLOCK / 2 / (IO_PORT_WRITE_CYCLES + delay_cycles))
#define CLOCK_DELAY(swj_clock) ((CPU_CLOCK / 2 / swj_clock) - IO_PORT_WRITE_CYCLES)


         DAP_Data_t DAP_Data;           // DAP Data
volatile uint8_t    DAP_TransferAbort;  // Trasfer Abort Flag


#ifdef DAP_VENDOR
const char DAP_Vendor [] = DAP_VENDOR;
#endif

#ifdef DAP_PRODUCT
const char DAP_Product[] = DAP_PRODUCT;
#endif

#ifdef DAP_SER_NUM
const char DAP_SerNum [] = DAP_SER_NUM;
#endif

const char DAP_FW_Ver [] = DAP_FW_VER;

#if TARGET_DEVICE_FIXED
const char TargetDeviceVendor [] = TARGET_DEVICE_VENDOR;
const char TargetDeviceName   [] = TARGET_DEVICE_NAME;
#endif


// Get DAP Information
//   id:      info identifier
//   info:    pointer to info data
//   return:  number of bytes in info data
static uint8_t DAP_Info(uint8_t id uint8_t *info)
{
uint8_t length = 0;

DEBUG(“DAP_Info: %02X\n“ id);

switch (id)
{
case DAP_ID_VENDOR:
#ifdef DAP_VENDOR
memcpy(info DAP_Vendor sizeof(DAP_Vendor));
length = sizeof(DAP_Vendor);
#endif
break;
case DAP_ID_PRODUCT:
#ifdef DAP_PRODUCT
memcpy(info DAP_Product sizeof(DAP_Product));
length = sizeof(DAP_Product);
#endif
break;
case DAP_ID_SER_NUM:
#ifdef DAP_SER_NUM
memcpy(info DAP_SerNum sizeof(DAP_SerNum));
length = sizeof(DAP_SerNum);
#endif
break;
case DAP_ID_FW_VER:
memcpy(info DAP_FW_Ver sizeof(DAP_FW_Ver));
length = sizeof(DAP_FW_Ver);
break;
case DAP_ID_DEVICE_VENDOR:
#if TARGET_DEVICE_FIXED
memcpy(info TargetDeviceVendor sizeof(TargetDeviceVendor));
length = sizeof(DAP_Target_Device);
#endif
break;
case DAP_ID_DEVICE_NAME:
#if TARGET_DEVICE_FIXED
memcpy(info TargetDeviceName sizeof(TargetDeviceName));
le

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-07-14 14:25  CMSIS-DAP\
     文件     1664116  2017-07-14 14:18  CMSIS-DAP\CMSIS DAP仿真器DIY.pdf
     目录           0  2017-07-14 14:25  CMSIS-DAP\X893版\
     目录           0  2017-07-14 14:25  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\
     文件         483  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\.gitattributes
     文件        2192  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\.gitignore
     文件      166392  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\CMSIS-DAP EULA.pdf
     目录           0  2017-07-14 14:25  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\
     文件       39004  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\DAP.c
     文件        6955  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\DAP.h
     文件       16032  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\JTAG_DP.c
     目录           0  2017-07-14 14:25  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\
     文件          54  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\Abstract.txt
     文件       17676  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\CMSIS_DAP.uvopt
     文件       35380  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\CMSIS_DAP.uvproj
     文件       20041  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\DAP_config.h
     文件        1391  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\LPC17xx_DBG_ROM.ini
     文件        1347  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\RAM.ini
     文件         601  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\SPIFI.sct
     文件        1718  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\main.c
     文件       12782  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\startup_LPC43xx.s
     文件       43406  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\system_LPC43xx.c
     文件       22668  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\usb_config_USB0.c
     文件       23696  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\usbd_LPC43xx_USB0.c
     文件        4664  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\LPC-link-II\usbd_user_hid.c
     目录           0  2017-07-14 14:25  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\
     文件          50  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\Abstract.txt
     文件       11339  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\CMSIS_DAP.uvopt
     文件       17162  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\CMSIS_DAP.uvproj
     文件       18858  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\DAP_config.h
     文件        1718  2016-11-29 00:58  CMSIS-DAP\X893版\CMSIS-DAP-master-X893\Firmware\OpenSDA\main.c
............此处省略630个文件信息

评论

共有 条评论