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:
Wed Jan 20 04:51:50 2016 +0000
Parent:
1:2957e24bb52f
Commit message:
for Nucleo-F042K6

Changed in this revision

F042K6_USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
USBDevice.lib 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
diff -r 2957e24bb52f -r 6846bcae69aa F042K6_USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/F042K6_USBDevice.lib	Wed Jan 20 04:51:50 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/va009039/code/F042K6_USBDevice/#0ba7c5e2b3dc
diff -r 2957e24bb52f -r 6846bcae69aa USBDevice.lib
--- a/USBDevice.lib	Sat Jul 05 08:26:21 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/USBDevice/#0c6524151939
diff -r 2957e24bb52f -r 6846bcae69aa main.cpp
--- a/main.cpp	Sat Jul 05 08:26:21 2014 +0000
+++ b/main.cpp	Wed Jan 20 04:51:50 2016 +0000
@@ -1,10 +1,13 @@
+// main.cpp 2016/1/20
 #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);
+SWD swd(D7, D6, D3); // SWDIO,SWCLK,nRESET
+DigitalOut connected(LED1); // D13
+DigitalOut running(D12);
+const int LED_ON  = 1;
+const int LED_OFF = 0;
 
 class myDAP : public BaseDAP {
 public:
@@ -12,19 +15,17 @@
     virtual void infoLED(int select, int value) {
         switch(select) {
             case 0:
-                connected = value^1; 
-                running = 1;
+                connected = value ? LED_ON : LED_OFF; 
                 break;
             case 1: 
-                running = value^1; 
-                connected = 1;
+                running = value ? LED_ON : LED_OFF; 
                 break;
         }
     } 
 };
 
 int main() {
-   USBDAP* hid = new USBDAP("CMSIS-DAP");
+   USBDAP* hid = new USBDAP("F042K6 CMSIS-DAP");
    myDAP* dap = new myDAP(&swd);
    while(1) {
         HID_REPORT recv_report;
diff -r 2957e24bb52f -r 6846bcae69aa mbed.bld
--- a/mbed.bld	Sat Jul 05 08:26:21 2014 +0000
+++ b/mbed.bld	Wed Jan 20 04:51:50 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file