diff --git a/components/heap/Kconfig b/components/heap/Kconfig
index 551cf58d4..9bc8ce7c1 100644
--- a/components/heap/Kconfig
+++ b/components/heap/Kconfig
@@ -13,4 +13,12 @@ menu "Heap memory"
         help
             Enables heap tracing API.
 
+    config HEAP_PRIO_8BIT_RAM
+        bool "Prioritize allocation of 8-bit access capable RAM"
+        default n
+        depends on !HEAP_DISABLE_IRAM
+        help
+            Set DRAM region ahead of IRAM region during initialization, so that allocations
+            can be made against it first.
+
 endmenu
diff --git a/components/heap/port/esp8266/esp_heap_init.c b/components/heap/port/esp8266/esp_heap_init.c
index 8135911be..5d950adbe 100644
--- a/components/heap/port/esp8266/esp_heap_init.c
+++ b/components/heap/port/esp8266/esp_heap_init.c
@@ -39,6 +39,23 @@ void heap_caps_init(void)
     extern char _bss_end;
     size_t heap_region_num = 0;
 
+#if CONFIG_HEAP_PRIO_8BIT_RAM
+    g_heap_region[heap_region_num].start_addr = (uint8_t *)&_bss_end;
+    g_heap_region[heap_region_num].total_size = ((size_t)(0x40000000 - (uint32_t)&_bss_end));
+    g_heap_region[heap_region_num].caps = MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_DMA;
+    heap_region_num++;
+
+    // CONFIG_HEAP_PRIO_8BIT_RAM is only available when CONFIG_HEAP_DISABLE_IRAM=n
+    extern char _iram_end;
+    const size_t iram_size = 0x40100000 + CONFIG_SOC_IRAM_SIZE - ((size_t)&_iram_end);
+
+    if (iram_size > HEAP_REGION_IRAM_MIN && iram_size < HEAP_REGION_IRAM_MAX) {
+        g_heap_region[heap_region_num].start_addr = (uint8_t *)&_iram_end;
+        g_heap_region[heap_region_num].total_size = iram_size;
+        g_heap_region[heap_region_num].caps = MALLOC_CAP_32BIT | MALLOC_CAP_EXEC;
+        heap_region_num++;
+    }
+#else
 #ifndef CONFIG_HEAP_DISABLE_IRAM
     extern char _iram_end;
     const size_t iram_size = 0x40100000 + CONFIG_SOC_IRAM_SIZE - ((size_t)&_iram_end);
@@ -55,6 +72,7 @@ void heap_caps_init(void)
     g_heap_region[heap_region_num].total_size = ((size_t)(0x40000000 - (uint32_t)&_bss_end));
     g_heap_region[heap_region_num].caps = MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_DMA;
     heap_region_num++;
+#endif
 
     esp_heap_caps_init_region(g_heap_region, heap_region_num);
 }
diff --git a/components/lwip/port/esp8266/freertos/sys_arch.c b/components/lwip/port/esp8266/freertos/sys_arch.c
index 8338a3480..add9a64af 100644
--- a/components/lwip/port/esp8266/freertos/sys_arch.c
+++ b/components/lwip/port/esp8266/freertos/sys_arch.c
@@ -81,6 +81,7 @@ sys_mutex_lock(sys_mutex_t *pxMutex)
   BaseType_t ret = xSemaphoreTake(*pxMutex, portMAX_DELAY);
 
   LWIP_ASSERT("failed to take the mutex", ret == pdTRUE);
+  (void)ret;
 }
 
 /**
@@ -94,6 +95,7 @@ sys_mutex_unlock(sys_mutex_t *pxMutex)
   BaseType_t ret = xSemaphoreGive(*pxMutex);
 
   LWIP_ASSERT("failed to give the mutex", ret == pdTRUE);
+  (void)ret;
 }
 
 /**
@@ -133,6 +135,7 @@ sys_sem_new(sys_sem_t *sem, u8_t count)
   if (count == 1) {
       BaseType_t ret = xSemaphoreGive(*sem);
       LWIP_ASSERT("sys_sem_new: initial give failed", ret == pdTRUE);
+      (void)ret;
   }
 
   return ERR_OK;
@@ -150,6 +153,7 @@ sys_sem_signal(sys_sem_t *sem)
   /* queue full is OK, this is a signal only... */
   LWIP_ASSERT("sys_sem_signal: sane return value",
              (ret == pdTRUE) || (ret == errQUEUE_FULL));
+  (void)ret;
 }
 
 /*-----------------------------------------------------------------------------------*/
@@ -246,6 +250,7 @@ sys_mbox_post(sys_mbox_t *mbox, void *msg)
 {
   BaseType_t ret = xQueueSendToBack((*mbox)->os_mbox, &msg, portMAX_DELAY);
   LWIP_ASSERT("mbox post failed", ret == pdTRUE);
+  (void)ret;
 }
 
 /**
@@ -385,6 +390,8 @@ sys_mbox_free(sys_mbox_t *mbox)
   vQueueDelete((*mbox)->os_mbox);
   free(*mbox);
   *mbox = NULL;
+
+  (void)msgs_waiting;
 }
 
 /**
diff --git a/components/spi_flash/CMakeLists.txt b/components/spi_flash/CMakeLists.txt
index 255eff8e7..287e63c13 100644
--- a/components/spi_flash/CMakeLists.txt
+++ b/components/spi_flash/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(srcs "src/partition"
+set(srcs "src/partition.c"
          "src/spi_flash_raw.c"
          "src/spi_flash.c")
 if(BOOTLOADER_BUILD)
diff --git a/components/tcpip_adapter/Kconfig b/components/tcpip_adapter/Kconfig
index 1c803476e..33be3d2c0 100644
--- a/components/tcpip_adapter/Kconfig
+++ b/components/tcpip_adapter/Kconfig
@@ -21,4 +21,11 @@ config TCPIP_ADAPTER_GLOBAL_DATA_LINK_IRAM
     help
         Link TCPIP adapter global data(.bss .data COMMON) from DRAM to IRAM.
 
+config TCPIP_ADAPTER_HOSTNAME_MAX_LENGTH
+    int "Max hostname length"
+    range 1 253
+    default 32
+    help
+        Maximum number of characters in the local hostname
+
 endmenu
diff --git a/components/tcpip_adapter/include/tcpip_adapter.h b/components/tcpip_adapter/include/tcpip_adapter.h
index 8f3a76bcc..7b645ce0b 100644
--- a/components/tcpip_adapter/include/tcpip_adapter.h
+++ b/components/tcpip_adapter/include/tcpip_adapter.h
@@ -609,7 +609,6 @@ esp_interface_t tcpip_adapter_get_esp_if(void *dev);
  */
 esp_err_t tcpip_adapter_get_sta_list(wifi_sta_list_t *wifi_sta_list, tcpip_adapter_sta_list_t *tcpip_sta_list);
 
-#define TCPIP_HOSTNAME_MAX_SIZE    32
 /**
  * @brief  Set the hostname to the interface
  *
diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c
index bf3f8bad9..e4cbd5b36 100644
--- a/components/tcpip_adapter/tcpip_adapter_lwip.c
+++ b/components/tcpip_adapter/tcpip_adapter_lwip.c
@@ -46,6 +46,8 @@
 #include "FreeRTOS.h"
 #include "timers.h"
 
+#include "sdkconfig.h"
+
 struct tcpip_adapter_pbuf {
     struct pbuf_custom  pbuf;
 
@@ -1217,13 +1219,13 @@ esp_err_t tcpip_adapter_set_hostname(tcpip_adapter_if_t tcpip_if, const char *ho
 {
 #if LWIP_NETIF_HOSTNAME
     struct netif *p_netif;
-    static char hostinfo[TCPIP_ADAPTER_IF_MAX][TCPIP_HOSTNAME_MAX_SIZE + 1];
+    static char hostinfo[TCPIP_ADAPTER_IF_MAX][CONFIG_TCPIP_ADAPTER_HOSTNAME_MAX_LENGTH + 1];
 
     if (tcpip_if >= TCPIP_ADAPTER_IF_MAX || hostname == NULL) {
         return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
     }
 
-    if (strlen(hostname) > TCPIP_HOSTNAME_MAX_SIZE) {
+    if (strlen(hostname) > CONFIG_TCPIP_ADAPTER_HOSTNAME_MAX_LENGTH) {
         return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
     }