forked from SmingHub/Sming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'fdf41a301df3f311da5ceb279603e4be0ecaeaf2' into develop
* commit 'fdf41a301df3f311da5ceb279603e4be0ecaeaf2': Allow compilation of custom LWIP (SmingHub#878) Compile libsming(ssl) on demand (SmingHub#879) Fix websocket client key generation (SmingHub#871) Preparation for release 3.0.1. (SmingHub#869) Fixed compilation of Sming with custom heap enabled. (SmingHub#868) spiffs_mount() added (SmingHub#865)
- Loading branch information
Showing
12 changed files
with
207 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* heap.c - overrides of SDK heap handling functions | ||
* Copyright (c) 2016 Ivan Grokhotkov. All rights reserved. | ||
* This file is distributed under MIT license. | ||
*/ | ||
|
||
#include <stdlib.h> | ||
#include <c_types.h> | ||
#include "umm_malloc_cfg.h" | ||
#include "umm_malloc.h" | ||
|
||
#define IRAM_ATTR __attribute__((section(".iram.text"))) | ||
|
||
void* IRAM_ATTR pvPortMalloc(size_t size, const char* file, int line) | ||
{ | ||
return malloc(size); | ||
} | ||
|
||
void IRAM_ATTR vPortFree(void *ptr, const char* file, int line) | ||
{ | ||
free(ptr); | ||
} | ||
|
||
void* IRAM_ATTR pvPortCalloc(size_t count, size_t size, const char* file, int line) | ||
{ | ||
return calloc(count, size); | ||
} | ||
|
||
void* IRAM_ATTR pvPortRealloc(void *ptr, size_t size, const char* file, int line) | ||
{ | ||
return realloc(ptr, size); | ||
} | ||
|
||
void* IRAM_ATTR pvPortZalloc(size_t size, const char* file, int line) | ||
{ | ||
return calloc(1, size); | ||
} | ||
|
||
size_t xPortGetFreeHeapSize(void) | ||
{ | ||
return umm_free_heap_size(); | ||
} | ||
|
||
size_t IRAM_ATTR xPortWantedSizeAlign(size_t size) | ||
{ | ||
return (size + 3) & ~((size_t) 3); | ||
} | ||
|
||
void system_show_malloc(void) | ||
{ | ||
umm_info(NULL, 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
diff --git a/include/user_config.h b/include/user_config.h | ||
index e69de29..1db5073 100644 | ||
--- a/include/user_config.h | ||
+++ b/include/user_config.h | ||
@@ -0,0 +1,34 @@ | ||
+#ifdef __cplusplus | ||
+extern "C" { | ||
+#endif | ||
+ | ||
+typedef signed short sint16_t; | ||
+ | ||
+void *ets_bzero(void *block, size_t size); | ||
+bool ets_post(uint32_t prio, ETSSignal sig, ETSParam par); | ||
+void ets_task(ETSTask task, uint32_t prio, ETSEvent * queue, uint8 qlen); | ||
+ | ||
+void system_pp_recycle_rx_pkt(void *eb); | ||
+ | ||
+#ifndef MEMLEAK_DEBUG | ||
+ extern void *pvPortMalloc( size_t xWantedSize ); | ||
+ extern void vPortFree( void *pv ); | ||
+ extern void *pvPortZalloc(size_t size); | ||
+#else | ||
+ extern void *pvPortMalloc(size_t xWantedSize, const char *file, uint32 line); | ||
+ extern void *pvPortZalloc(size_t xWantedSize, const char *file, uint32 line); | ||
+ extern void vPortFree(void *ptr, const char *file, uint32 line); | ||
+ | ||
+ extern void pvPortFree(void *ptr); | ||
+ extern void *vPortMalloc(size_t xWantedSize); | ||
+#endif /*MEMLEAK_DEBUG*/ | ||
+ | ||
+ | ||
+ extern void *pvPortCalloc(unsigned int n, unsigned int count); | ||
+ extern void *pvPortRealloc(void * p, size_t size); | ||
+ extern size_t xPortGetFreeHeapSize(void); | ||
+// extern void prvHeapInit(void) ICACHE_FLASH_ATTR ; | ||
+ | ||
+#ifdef __cplusplus | ||
+} | ||
+#endif | ||
diff --git a/Makefile.open b/Makefile.open | ||
index 1bc584f..493275b 100644 | ||
--- a/Makefile.open | ||
+++ b/Makefile.open | ||
@@ -36,11 +36,21 @@ lwip/core/ipv4/ip.o \ | ||
lwip/core/ipv4/ip_frag.o \ | ||
lwip/netif/etharp.o \ | ||
\ | ||
-lwip/app/dhcpserver.o \ | ||
-\ | ||
-espconn_dummy.o \ | ||
+lwip/app/dhcpserver.o | ||
+ | ||
+ | ||
+ifneq ($(ENABLE_ESPCONN),1) | ||
+ OBJS += espconn_dummy.o | ||
+else | ||
+ OBJS += lwip/app/espconn.o \ | ||
+lwip/app/espconn_tcp.o \ | ||
+lwip/app/espconn_udp.o \ | ||
+lwip/app/espconn_mdns.o \ | ||
+lwip/core/mdns.o | ||
+ | ||
+endif | ||
|
||
-LIB = liblwip_open.a | ||
+LIB = $(USER_LIBDIR)liblwip_open.a | ||
|
||
all: $(LIB) | ||
|
Submodule esp-open-lwip
added at
b9a23a
Oops, something went wrong.