@@ -697,9 +697,11 @@ void Platform_CommSendChar(int character)
697
697
static const char g_memoryMapXml[] = " <?xml version=\" 1.0\" ?>"
698
698
" <!DOCTYPE memory-map PUBLIC \" +//IDN gnu.org//DTD GDB Memory Map V1.0//EN\" \" http://sourceware.org/gdb/gdb-memory-map.dtd\" >"
699
699
" <memory-map>"
700
+ #ifndef CORE_CM4
700
701
" <memory type=\" ram\" start=\" 0x00000000\" length=\" 0x10000\" > </memory>"
701
- " <memory type=\" flash\" start=\" 0x08000000\" length=\" 0x200000\" > <property name=\" blocksize\" >0x20000</property></memory>"
702
702
" <memory type=\" ram\" start=\" 0x10000000\" length=\" 0x48000\" > </memory>"
703
+ #endif
704
+ " <memory type=\" flash\" start=\" 0x08000000\" length=\" 0x200000\" > <property name=\" blocksize\" >0x20000</property></memory>"
703
705
" <memory type=\" ram\" start=\" 0x1ff00000\" length=\" 0x20000\" > </memory>"
704
706
" <memory type=\" ram\" start=\" 0x20000000\" length=\" 0x20000\" > </memory>"
705
707
" <memory type=\" ram\" start=\" 0x24000000\" length=\" 0x80000\" > </memory>"
@@ -712,7 +714,9 @@ static const char g_memoryMapXml[] = "<?xml version=\"1.0\"?>"
712
714
" <memory type=\" ram\" start=\" 0x58026000\" length=\" 0x800\" > </memory>"
713
715
" <memory type=\" ram\" start=\" 0x58027000\" length=\" 0x400\" > </memory>"
714
716
" <memory type=\" flash\" start=\" 0x90000000\" length=\" 0x10000000\" > <property name=\" blocksize\" >0x200</property></memory>"
717
+ #ifndef CORE_CM4
715
718
" <memory type=\" ram\" start=\" 0xc0000000\" length=\" 0x800000\" > </memory>"
719
+ #endif
716
720
" </memory-map>" ;
717
721
#endif
718
722
@@ -1145,8 +1149,7 @@ void UartDebugCommInterface::onReceivedData()
1145
1149
}
1146
1150
}
1147
1151
1148
-
1149
-
1152
+ #ifdef SERIAL_CDC
1150
1153
UsbDebugCommInterface::UsbDebugCommInterface (arduino::USBSerial* pSerial) :
1151
1154
_pSerial(pSerial)
1152
1155
{
@@ -1181,3 +1184,43 @@ void UsbDebugCommInterface::attach(void (*pCallback)())
1181
1184
{
1182
1185
_pSerial->attach (pCallback);
1183
1186
}
1187
+ #endif
1188
+
1189
+ #if defined(STM32H747xx) && defined(CORE_CM4)
1190
+
1191
+ RPCDebugCommInterface::RPCDebugCommInterface (arduino::RPC* pSerial) :
1192
+ _pSerial(pSerial)
1193
+ {
1194
+ _pSerial->begin ();
1195
+ }
1196
+
1197
+ RPCDebugCommInterface::~RPCDebugCommInterface ()
1198
+ {
1199
+ }
1200
+
1201
+ bool RPCDebugCommInterface::readable ()
1202
+ {
1203
+ return _pSerial->available () > 0 ;
1204
+ }
1205
+
1206
+ bool RPCDebugCommInterface::writeable ()
1207
+ {
1208
+ // The USBSerial::write() method blocks until data is actually sent to the PC.
1209
+ return true ;
1210
+ }
1211
+
1212
+ uint8_t RPCDebugCommInterface::read ()
1213
+ {
1214
+ return _pSerial->read ();
1215
+ }
1216
+
1217
+ void RPCDebugCommInterface::write (uint8_t c)
1218
+ {
1219
+ _pSerial->write (c);
1220
+ }
1221
+
1222
+ void RPCDebugCommInterface::attach (void (*pCallback)())
1223
+ {
1224
+ _pSerial->attach (pCallback);
1225
+ }
1226
+ #endif
0 commit comments