parent
03f5e898a0
commit
c1974f7551
2 changed files with 61 additions and 0 deletions
16
Makefile
16
Makefile
|
|
@ -23,6 +23,8 @@ UNZIP = unzip -q -o
|
|||
VENDOR_SDK_ZIP = $(VENDOR_SDK_ZIP_$(VENDOR_SDK))
|
||||
VENDOR_SDK_DIR = $(VENDOR_SDK_DIR_$(VENDOR_SDK))
|
||||
|
||||
VENDOR_SDK_ZIP_2.0.0 = ESP8266_NONOS_SDK_V2.0.0_16_07_19.zip
|
||||
VENDOR_SDK_DIR_2.0.0 = ESP8266_NONOS_SDK_V2.0.0_16_07_19
|
||||
VENDOR_SDK_ZIP_1.5.4 = ESP8266_NONOS_SDK_V1.5.4_16_05_20.zip
|
||||
VENDOR_SDK_DIR_1.5.4 = ESP8266_NONOS_SDK_V1.5.4_16_05_20
|
||||
VENDOR_SDK_ZIP_1.5.3 = ESP8266_NONOS_SDK_V1.5.3_16_04_18.zip
|
||||
|
|
@ -168,6 +170,12 @@ $(VENDOR_SDK_DIR)/.dir: $(VENDOR_SDK_ZIP)
|
|||
-mv License $(VENDOR_SDK_DIR)
|
||||
touch $@
|
||||
|
||||
$(VENDOR_SDK_DIR_2.0.0)/.dir: $(VENDOR_SDK_ZIP_2.0.0)
|
||||
$(UNZIP) $^
|
||||
mv ESP8266_NONOS_SDK $(VENDOR_SDK_DIR_2.0.0)
|
||||
-mv License $(VENDOR_SDK_DIR)
|
||||
touch $@
|
||||
|
||||
$(VENDOR_SDK_DIR_1.5.4)/.dir: $(VENDOR_SDK_ZIP_1.5.4)
|
||||
$(UNZIP) $^
|
||||
mv ESP8266_NONOS_SDK $(VENDOR_SDK_DIR_1.5.4)
|
||||
|
|
@ -176,6 +184,12 @@ $(VENDOR_SDK_DIR_1.5.4)/.dir: $(VENDOR_SDK_ZIP_1.5.4)
|
|||
|
||||
sdk_patch: $(VENDOR_SDK_DIR)/.dir .sdk_patch_$(VENDOR_SDK)
|
||||
|
||||
.sdk_patch_2.0.0:
|
||||
echo -e "#undef ESP_SDK_VERSION\n#define ESP_SDK_VERSION 020000" >>$(VENDOR_SDK_DIR)/include/esp_sdk_ver.h
|
||||
$(PATCH) -d $(VENDOR_SDK_DIR) -p1 < c_types-c99_sdk_2.patch
|
||||
cd $(VENDOR_SDK_DIR)/lib; mkdir -p tmp; cd tmp; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar x ../libcrypto.a; cd ..; $(TOOLCHAIN)/bin/xtensa-lx106-elf-ar rs libwpa.a tmp/*.o
|
||||
@touch $@
|
||||
|
||||
.sdk_patch_1.5.4:
|
||||
echo -e "#undef ESP_SDK_VERSION\n#define ESP_SDK_VERSION 010504" >>$(VENDOR_SDK_DIR)/include/esp_sdk_ver.h
|
||||
$(PATCH) -d $(VENDOR_SDK_DIR) -p1 < c_types-c99.patch
|
||||
|
|
@ -317,6 +331,8 @@ ifeq ($(STANDALONE),y)
|
|||
$(TOOLCHAIN)/xtensa-lx106-elf/sysroot/usr/include/
|
||||
endif
|
||||
|
||||
ESP8266_NONOS_SDK_V2.0.0_16_07_19.zip:
|
||||
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1613"
|
||||
ESP8266_NONOS_SDK_V1.5.4_16_05_20.zip:
|
||||
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1469"
|
||||
ESP8266_NONOS_SDK_V1.5.3_16_04_18.zip:
|
||||
|
|
|
|||
45
c_types-c99_sdk_2.patch
Normal file
45
c_types-c99_sdk_2.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
This patch fixes vendor SDK header "c_types.h" for C99 compatibility.
|
||||
|
||||
--- ESP8266_NONOS_SDK_V2.0.0_16_07_19/include/c_types.h.orig 2016-07-18 07:16:07.000000000 -0700
|
||||
+++ ESP8266_NONOS_SDK_V2.0.0_16_07_19/include/c_types.h 2016-07-26 21:45:18.904657700 -0700
|
||||
@@ -6,17 +6,19 @@
|
||||
#ifndef _C_TYPES_H_
|
||||
#define _C_TYPES_H_
|
||||
|
||||
-typedef unsigned char uint8_t;
|
||||
+#include <stdint.h>
|
||||
+#include <stdbool.h>
|
||||
+//typedef unsigned char uint8_t;
|
||||
typedef signed char sint8_t;
|
||||
-typedef signed char int8_t;
|
||||
-typedef unsigned short uint16_t;
|
||||
+//typedef signed char int8_t;
|
||||
+//typedef unsigned short uint16_t;
|
||||
typedef signed short sint16_t;
|
||||
-typedef signed short int16_t;
|
||||
-typedef unsigned int uint32_t;
|
||||
+//typedef signed short int16_t;
|
||||
+//typedef unsigned int uint32_t;
|
||||
typedef signed long sint32_t;
|
||||
-typedef signed int int32_t;
|
||||
+//typedef signed int int32_t;
|
||||
typedef signed long long sint64_t;
|
||||
-typedef unsigned long long uint64_t;
|
||||
+//typedef unsigned long long uint64_t;
|
||||
typedef unsigned long long u_int64_t;
|
||||
typedef float real32_t;
|
||||
typedef double real64_t;
|
||||
@@ -82,10 +84,10 @@
|
||||
#define STORE_ATTR __attribute__((aligned(4)))
|
||||
|
||||
#ifndef __cplusplus
|
||||
-typedef unsigned char bool;
|
||||
+//typedef unsigned char bool;
|
||||
#define BOOL bool
|
||||
-#define true (1)
|
||||
-#define false (0)
|
||||
+//#define true (1)
|
||||
+//#define false (0)
|
||||
#define TRUE true
|
||||
#define FALSE false
|
||||
|
||||
Loading…
Reference in a new issue