diff --git a/esphome/components/ota/ota_backend_arduino_rp2040.cpp b/esphome/components/ota/ota_backend_arduino_rp2040.cpp index fc4d70249c..2ed000f3e0 100644 --- a/esphome/components/ota/ota_backend_arduino_rp2040.cpp +++ b/esphome/components/ota/ota_backend_arduino_rp2040.cpp @@ -20,8 +20,8 @@ OTAResponseTypes ArduinoRP2040OTABackend::begin(size_t image_size) { // Handle UPDATE_SIZE_UNKNOWN (0) by calculating available space if (image_size == 0) { // Similar to ESP8266, calculate available space from flash layout - extern uint8_t _FS_start; - extern uint8_t _FS_end; + extern "C" uint8_t _FS_start; + extern "C" uint8_t _FS_end; // Calculate the size of the filesystem area which will be used for OTA size_t fs_size = &_FS_end - &_FS_start; // Reserve some space for filesystem overhead diff --git a/esphome/components/web_server/ota/ota_web_server.cpp b/esphome/components/web_server/ota/ota_web_server.cpp index c778297135..0235262e52 100644 --- a/esphome/components/web_server/ota/ota_web_server.cpp +++ b/esphome/components/web_server/ota/ota_web_server.cpp @@ -203,4 +203,4 @@ void WebServerOTAComponent::dump_config() { } // namespace web_server } // namespace esphome -#endif // USE_WEBSERVER_OTA \ No newline at end of file +#endif // USE_WEBSERVER_OTA diff --git a/esphome/components/web_server/ota/ota_web_server.h b/esphome/components/web_server/ota/ota_web_server.h index 68267bf3e8..a7170c0e34 100644 --- a/esphome/components/web_server/ota/ota_web_server.h +++ b/esphome/components/web_server/ota/ota_web_server.h @@ -23,4 +23,4 @@ class WebServerOTAComponent : public ota::OTAComponent { } // namespace web_server } // namespace esphome -#endif // USE_WEBSERVER_OTA \ No newline at end of file +#endif // USE_WEBSERVER_OTA