@@ -12,7 +12,7 @@ import { MemoryContentProvider } from './memory_content_provider';
12
12
import Reporting from '../reporting' ;
13
13
14
14
import { CortexDebugConfigurationProvider } from './configprovider' ;
15
- import { JLinkSocketRTTSource , SocketRTTSource , SocketSWOSource , PeMicroSocketSource } from './swo/sources/socket' ;
15
+ import { JLinkSocketRTTSource , SocketRTTSource , SocketSWOSource , PeMicroSocketSource , DefmtSocketRTTSource } from './swo/sources/socket' ;
16
16
import { FifoSWOSource } from './swo/sources/fifo' ;
17
17
import { FileSWOSource } from './swo/sources/file' ;
18
18
import { SerialSWOSource } from './swo/sources/serial' ;
@@ -770,7 +770,7 @@ export class CortexDebugExtension {
770
770
private receivedRTTConfigureEvent ( e : vscode . DebugSessionCustomEvent ) {
771
771
if ( e . body . type === 'socket' ) {
772
772
const decoder : RTTCommonDecoderOpts = e . body . decoder ;
773
- if ( ( decoder . type === 'console' ) || ( decoder . type === 'binary' ) ) {
773
+ if ( ( decoder . type === 'console' ) || ( decoder . type === 'binary' ) || ( decoder . type === 'defmt' ) ) {
774
774
Reporting . sendEvent ( 'RTT' , 'Source' , 'Socket: Console' ) ;
775
775
this . rttCreateTerninal ( e , decoder as RTTConsoleDecoderOpts ) ;
776
776
} else {
@@ -801,6 +801,8 @@ export class CortexDebugExtension {
801
801
}
802
802
if ( mySession . config . servertype === 'jlink' ) {
803
803
src = new JLinkSocketRTTSource ( tcpPort , channel ) ;
804
+ } else if ( e . body . decoder . type === 'defmt' ) {
805
+ src = new DefmtSocketRTTSource ( tcpPort , channel , e . body . executable ) ;
804
806
} else {
805
807
src = new SocketRTTSource ( tcpPort , channel ) ;
806
808
}
0 commit comments