cmsis-dap debug adapter

Dependencies:   BaseDAP F042K6_USBDevice SWD USBDAP mbed

Fork of Simple-CMSIS-DAP by Norimasa Okamoto

CMSIS-DAP debug adapter. (not mbed-interface)

/media/uploads/va009039/f042k6_simple-cmsis-dap.jpg

SWDNUCLEO-F042K6
SWDIOD7
SWCLKD6
nRESETD3

Files at this revision

API Documentation at this revision

Comitter:
va009039
Date:
Mon Jun 23 03:26:58 2014 +0000
Child:
1:2957e24bb52f
Commit message:
first commit

Changed in this revision

BaseDAP.lib Show annotated file Show diff for this revision Revisions of this file
SWD.lib Show annotated file Show diff for this revision Revisions of this file
USBDAP.lib Show annotated file Show diff for this revision Revisions of this file
USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
mydebug.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BaseDAP.lib	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/va009039/code/BaseDAP/#76588be01e71
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SWD.lib	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/va009039/code/SWD/#86fde86e144f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDAP.lib	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/va009039/code/USBDAP/#366f6f649a7d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#0c6524151939
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "USBDAP.h"
+#include "BaseDAP.h"
+
+SWD swd(D12, D10, D6); // SWDIO,SWCLK,nRESET
+DigitalOut connected(LED_GREEN);
+DigitalOut running(LED_RED);
+
+class myDAP : public BaseDAP {
+public:
+    myDAP(SWD* swd):BaseDAP(swd){};
+    virtual void infoLED(int select, int value) {
+        switch(select) {
+            case 0:
+                connected = value^1; 
+                running = 1;
+                break;
+            case 1: 
+                running = value^1; 
+                connected = 1;
+                break;
+        }
+    } 
+};
+
+int main() {
+   USBDAP* hid = new USBDAP;
+   myDAP* dap = new myDAP(&swd);
+   while(1) {
+        HID_REPORT recv_report;
+        if(hid->readNB(&recv_report)) {
+            HID_REPORT send_report;
+            dap->Command(recv_report.data, send_report.data);
+            send_report.length = 64;
+            hid->send(&send_report);
+        }
+    }    
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mydebug.h	Mon Jun 23 03:26:58 2014 +0000
@@ -0,0 +1,1 @@
+//dummy