Skip to content

Commit 2da29d8

Browse files
committed
libraries: get rid of stray printf
VARIANT_M4_GENERIC doesn't define any console pins (due to obvious reasons) so the default printf will make the application crash without mbed blinks of death.
1 parent d9fc415 commit 2da29d8

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

libraries/Portenta_SDRAM/src/SDRAM.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ extern "C" {
55

66
int SDRAMClass::begin(uint32_t start_address) {
77

8-
printf("FMC_SDRAM_DEVICE->SDCMR: %x\n", FMC_SDRAM_DEVICE->SDCMR);
8+
//printf("FMC_SDRAM_DEVICE->SDCMR: %x\n", FMC_SDRAM_DEVICE->SDCMR);
99
if (FMC_SDRAM_DEVICE->SDCMR == 0x00000000U) {
10-
printf("initializing external ram\n");
10+
//printf("initializing external ram\n");
1111
bool ret = sdram_init();
1212
if (ret == false) {
1313
return 0;
@@ -19,7 +19,7 @@ int SDRAMClass::begin(uint32_t start_address) {
1919
*/
2020

2121
if (SDRAM_START_ADDRESS != 0xC0000000) {
22-
printf("remap ram to 0x60000000\n");
22+
//printf("remap ram to 0x60000000\n");
2323
HAL_SetFMCMemorySwappingConfig(FMC_SWAPBMAP_SDRAM_SRAM);
2424
}
2525

@@ -62,7 +62,7 @@ int SDRAMClass::begin(uint32_t start_address) {
6262
}
6363

6464
if (start_address) {
65-
printf("malloc_addblock: allocate %d bytes\n", SDRAM_END_ADDRESS - start_address);
65+
//printf("malloc_addblock: allocate %d bytes\n", SDRAM_END_ADDRESS - start_address);
6666
malloc_addblock((void*)start_address, SDRAM_END_ADDRESS - start_address);
6767
}
6868

libraries/SocketWrapper/src/MbedUdp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ uint8_t arduino::MbedUDP::beginMulticast(IPAddress ip, uint16_t port) {
4242
SocketAddress socketAddress = SocketHelpers::socketAddressFromIpAddress(ip, port);
4343

4444
if (_socket.join_multicast_group(socketAddress) != NSAPI_ERROR_OK) {
45-
printf("Error joining the multicast group\n");
45+
//printf("Error joining the multicast group\n");
4646
return 0;
4747
}
4848

libraries/USBHOST/src/USB251xB.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ void write_hub_configuration(struct usb251xb* hub) {
133133
wbuf[0] = USB251XB_I2C_WRITE_SZ;
134134
memcpy(&wbuf[1], &i2c_wb[offset], USB251XB_I2C_WRITE_SZ);
135135

136-
printf("writing %d byte block %d to 0x%02X\n",
137-
USB251XB_I2C_WRITE_SZ, i, offset);
136+
//printf("writing %d byte block %d to 0x%02X\n",
137+
// USB251XB_I2C_WRITE_SZ, i, offset);
138138

139139
Wire.beginTransmission(0x2C);
140140
Wire.write(offset);

libraries/WiFi/src/WiFi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void* arduino::WiFiClass::handleAPEvents(whd_interface_t ifp, const whd_event_he
9090
if (osSemaphoreGetCount(whd_driver->ap_info.whd_wifi_sleep_flag) < 1) {
9191
osStatus_t result = osSemaphoreRelease(whd_driver->ap_info.whd_wifi_sleep_flag);
9292
if (result != osOK) {
93-
printf("Release whd_wifi_sleep_flag ERROR: %d", result);
93+
//printf("Release whd_wifi_sleep_flag ERROR: %d", result);
9494
}
9595
}
9696
}

libraries/openamp_arduino/src/openamp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept, size_t deadline)
175175
MAILBOX_Poll(rvdev.vdev);
176176
}
177177
if (millis() >= deadline) {
178-
printf("OPENAMP_Wait_EndPointready %X timed out\n\r", (unsigned int)rp_ept);
178+
//printf("OPENAMP_Wait_EndPointready %X timed out\n\r", (unsigned int)rp_ept);
179179
return -1;
180180
}
181181
return 0;

0 commit comments

Comments
 (0)