@@ -697,9 +697,11 @@ void Platform_CommSendChar(int character)
697697static const char g_memoryMapXml[] = " <?xml version=\" 1.0\" ?>"
698698 " <!DOCTYPE memory-map PUBLIC \" +//IDN gnu.org//DTD GDB Memory Map V1.0//EN\" \" http://sourceware.org/gdb/gdb-memory-map.dtd\" >"
699699 " <memory-map>"
700+ #ifndef CORE_CM4
700701 " <memory type=\" ram\" start=\" 0x00000000\" length=\" 0x10000\" > </memory>"
701- " <memory type=\" flash\" start=\" 0x08000000\" length=\" 0x200000\" > <property name=\" blocksize\" >0x20000</property></memory>"
702702 " <memory type=\" ram\" start=\" 0x10000000\" length=\" 0x48000\" > </memory>"
703+ #endif
704+ " <memory type=\" flash\" start=\" 0x08000000\" length=\" 0x200000\" > <property name=\" blocksize\" >0x20000</property></memory>"
703705 " <memory type=\" ram\" start=\" 0x1ff00000\" length=\" 0x20000\" > </memory>"
704706 " <memory type=\" ram\" start=\" 0x20000000\" length=\" 0x20000\" > </memory>"
705707 " <memory type=\" ram\" start=\" 0x24000000\" length=\" 0x80000\" > </memory>"
@@ -712,7 +714,9 @@ static const char g_memoryMapXml[] = "<?xml version=\"1.0\"?>"
712714 " <memory type=\" ram\" start=\" 0x58026000\" length=\" 0x800\" > </memory>"
713715 " <memory type=\" ram\" start=\" 0x58027000\" length=\" 0x400\" > </memory>"
714716 " <memory type=\" flash\" start=\" 0x90000000\" length=\" 0x10000000\" > <property name=\" blocksize\" >0x200</property></memory>"
717+ #ifndef CORE_CM4
715718 " <memory type=\" ram\" start=\" 0xc0000000\" length=\" 0x800000\" > </memory>"
719+ #endif
716720 " </memory-map>" ;
717721#endif
718722
@@ -1145,8 +1149,7 @@ void UartDebugCommInterface::onReceivedData()
11451149 }
11461150}
11471151
1148-
1149-
1152+ #ifdef SERIAL_CDC
11501153UsbDebugCommInterface::UsbDebugCommInterface (arduino::USBSerial* pSerial) :
11511154 _pSerial(pSerial)
11521155{
@@ -1181,3 +1184,43 @@ void UsbDebugCommInterface::attach(void (*pCallback)())
11811184{
11821185 _pSerial->attach (pCallback);
11831186}
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