Skip to content

Commit

Permalink
Fixes after syncing with latest Sming from develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Nov 22, 2017
1 parent 23d4c43 commit 40c640d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Sming/compiler/ld/common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ SECTIONS
*libstdc++.a:(.literal .text .literal.* .text.*)
*liblwip_open.a:(.literal .text .literal.* .text.*)
*liblwip_full.a:(.literal .text .literal.* .text.*)
*liblwip2.a:(.literal .text .literal.* .text.*)
*libaxtls.a:(.literal .text .literal.* .text.*)
*libat.a:(.literal.* .text.*)
*libcrypto.a:(.literal.* .text.*)
Expand All @@ -180,7 +181,7 @@ SECTIONS
out/build/app_app.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.* .irom.debug.*)
*libsming.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.* .irom.debug.*)
*libsmingssl.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.* .irom.debug.*)
*liblwip2.a:(.literal .text .literal.* .text.*)

_irom0_text_end = ABSOLUTE(.);
_flash_code_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
Expand Down
3 changes: 0 additions & 3 deletions Sming/system/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,18 +491,15 @@ void uart_set_debug(int uart_nr)
switch(s_uart_debug_nr) {
case UART0:
system_set_os_print(1);
ets_install_putc1((void *) &uart0_write_char);
ets_install_putc1(uart0_write_char);
break;
case UART1:
system_set_os_print(1);
ets_install_putc1((void *) &uart1_write_char);
ets_install_putc1(uart1_write_char);
break;
case UART_NO:
default:
system_set_os_print(0);
ets_install_putc1((void *) &uart_ignore_char);
ets_install_putc1(uart_ignore_char);
break;
}
Expand Down
14 changes: 8 additions & 6 deletions Sming/third-party/.patches/esp-open-lwip.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
diff --git a/include/user_config.h b/include/user_config.h
index e69de29..235ceff 100644
index e69de29..d608ddf 100644
--- a/include/user_config.h
+++ b/include/user_config.h
@@ -0,0 +1,20 @@
@@ -0,0 +1,21 @@
+#ifndef _USER_CONFIG_LWIP_
+#define _USER_CONFIG_LWIP_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "c_types.h"
+typedef signed short sint16_t;
+
+void ets_bzero(void *block, size_t size);
Expand Down Expand Up @@ -75,13 +76,14 @@ index 1bc584f..e4af916 100644
$(LIB): $(OBJS)
$(AR) rcs $@ $^
diff --git a/include/arch/cc.h b/include/arch/cc.h
index ff03b30..0da8ed3 100644
index ff03b30..348ee12 100644
--- a/include/arch/cc.h
+++ b/include/arch/cc.h
@@ -38,8 +38,25 @@
@@ -38,8 +38,26 @@
#include "c_types.h"
#include "ets_sys.h"
#include "osapi.h"
+#include "mem.h"
+#include <stdarg.h>
+
#define EFAULT 14
Expand All @@ -104,15 +106,15 @@ index ff03b30..0da8ed3 100644
//#define LWIP_PROVIDE_ERRNO

#if (1)
@@ -56,6 +73,7 @@ typedef signed short s16_t;
@@ -56,6 +74,7 @@ typedef signed short s16_t;
typedef unsigned long u32_t;
typedef signed long s32_t;
typedef unsigned long mem_ptr_t;
+typedef signed short sint16_t;

#define S16_F "d"
#define U16_F "d"
@@ -73,11 +91,12 @@ typedef unsigned long mem_ptr_t;
@@ -73,11 +92,12 @@ typedef unsigned long mem_ptr_t;
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END

Expand Down
51 changes: 51 additions & 0 deletions Sming/third-party/.patches/lwip2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,54 @@ index 63cd72d..5f100eb 100644
#ifdef LWIP_BUILD

// define LWIP_BUILD only when building LWIP
diff --git a/Makefile.sming b/Makefile.sming
index 842f4fe..7550a72 100644
--- a/Makefile.sming
+++ b/Makefile.sming
@@ -4,12 +4,13 @@
USER_LIBDIR ?= tweaked-
LWIP_LIB_RELEASE=$(USER_LIBDIR)liblwip2.a
LWIP_INCLUDES_RELEASE=include
+SDK_BASE ?= $(ESP_HOME)/sdk

all: install

%:
@make -f makefiles/Makefile.build-lwip2 \
- SDK=$(ESP_HOME)/sdk \
+ SDK=$(SDK_BASE) \
LWIP_LIB=liblwip2.a \
LWIP_LIB_RELEASE=$(LWIP_LIB_RELEASE) \
LWIP_INCLUDES_RELEASE=$(LWIP_INCLUDES_RELEASE) \
diff --git a/glue/esp-missing.h b/glue/esp-missing.h
index 0e42073..4cb5d6c 100644
--- a/glue/esp-missing.h
+++ b/glue/esp-missing.h
@@ -9,9 +9,9 @@

uint32_t r_rand (void);

-void* pvPortZalloc (size_t, const char*, int);
-void* pvPortMalloc (size_t xWantedSize, const char* file, int line) __attribute__((malloc, alloc_size(1)));
-void vPortFree (void *ptr, const char* file, int line);
+void* pvPortZalloc (size_t, const char*, unsigned line);
+void* pvPortMalloc (size_t xWantedSize, const char* file, unsigned line) __attribute__((malloc, alloc_size(1)));
+void vPortFree (void *ptr, const char* file, unsigned line);

struct netif* eagle_lwip_getif (int netif_index);

@@ -27,10 +27,10 @@ int ets_memcmp (const void*, const void*, size_t n);
void *ets_memset (void *s, int c, size_t n);
void *ets_memcpy (void *dest, const void *src, size_t n);

-typedef void ETSTimerFunc(void *timer_arg);
-void ets_timer_disarm (ETSTimer *a);
-void ets_timer_arm_new (ETSTimer *a, int b, int c, int isMstimer);
-void ets_timer_setfn (ETSTimer *t, ETSTimerFunc *fn, void *parg);
+//typedef void ETSTimerFunc(void *timer_arg);
+//void ets_timer_disarm (ETSTimer *a);
+//void ets_timer_arm_new (ETSTimer *a, int b, int c, int isMstimer);
+//void ets_timer_setfn (ETSTimer *t, ETSTimerFunc *fn, void *parg);

struct ip_addr;
void wifi_softap_set_station_info (uint8_t* mac, struct ip_addr*);

0 comments on commit 40c640d

Please sign in to comment.