@@ -12,7 +12,7 @@ import { MemoryContentProvider } from './memory_content_provider';
1212import Reporting from '../reporting' ;
1313
1414import { CortexDebugConfigurationProvider } from './configprovider' ;
15- import { JLinkSocketRTTSource , SocketRTTSource , SocketSWOSource , PeMicroSocketSource } from './swo/sources/socket' ;
15+ import { JLinkSocketRTTSource , SocketRTTSource , SocketSWOSource , PeMicroSocketSource , DefmtSocketRTTSource } from './swo/sources/socket' ;
1616import { FifoSWOSource } from './swo/sources/fifo' ;
1717import { FileSWOSource } from './swo/sources/file' ;
1818import { SerialSWOSource } from './swo/sources/serial' ;
@@ -770,7 +770,7 @@ export class CortexDebugExtension {
770770 private receivedRTTConfigureEvent ( e : vscode . DebugSessionCustomEvent ) {
771771 if ( e . body . type === 'socket' ) {
772772 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' ) ) {
774774 Reporting . sendEvent ( 'RTT' , 'Source' , 'Socket: Console' ) ;
775775 this . rttCreateTerninal ( e , decoder as RTTConsoleDecoderOpts ) ;
776776 } else {
@@ -801,6 +801,8 @@ export class CortexDebugExtension {
801801 }
802802 if ( mySession . config . servertype === 'jlink' ) {
803803 src = new JLinkSocketRTTSource ( tcpPort , channel ) ;
804+ } else if ( e . body . decoder . type === 'defmt' ) {
805+ src = new DefmtSocketRTTSource ( tcpPort , channel , e . body . executable ) ;
804806 } else {
805807 src = new SocketRTTSource ( tcpPort , channel ) ;
806808 }
0 commit comments