Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
cb4a49e0
Commit
cb4a49e0
authored
Jan 05, 2015
by
HuangRui
Browse files
Changed Makefile to support Windows xcc.
parent
c04f2578
Changes
6
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
cb4a49e0
...
...
@@ -4,12 +4,66 @@ ifndef PDIR
endif
AR
=
xt-ar
CC
=
xt-xcc
NM
=
xt-nm
CPP
=
xt-cpp
OBJCOPY
=
xt-objcopy
#MAKE = xt-make
#############################################################
# Select compile
#
ifeq
($(OS),Windows_NT)
# WIN32
# We are under windows.
ifeq
($(XTENSA_CORE),lx106)
# It is xcc
AR
=
xt-ar
CC
=
xt-xcc
NM
=
xt-nm
CPP
=
xt-cpp
OBJCOPY
=
xt-objcopy
#MAKE = xt-make
CCFLAGS
+=
-Os
--rename-section
.text
=
.irom0.text
--rename-section
.literal
=
.irom0.literal
else
# It is gcc, may be cygwin
# Can we use -fdata-sections?
CCFLAGS
+=
-Os
-ffunction-sections
-fno-jump-tables
AR
=
xtensa-lx106-elf-ar
CC
=
xtensa-lx106-elf-gcc
NM
=
xtensa-lx106-elf-nm
CPP
=
xtensa-lx106-elf-cpp
OBJCOPY
=
xtensa-lx106-elf-objcopy
endif
ifeq
($(PROCESSOR_ARCHITECTURE),AMD64)
# ->AMD64
endif
ifeq
($(PROCESSOR_ARCHITECTURE),x86)
# ->IA32
endif
else
# We are under other system, may be Linux. Assume using gcc.
# Can we use -fdata-sections?
CCFLAGS
+=
-Os
-ffunction-sections
-fno-jump-tables
AR
=
xtensa-lx106-elf-ar
CC
=
xtensa-lx106-elf-gcc
NM
=
xtensa-lx106-elf-nm
CPP
=
xtensa-lx106-elf-cpp
OBJCOPY
=
xtensa-lx106-elf-objcopy
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),Linux)
# LINUX
endif
ifeq
($(UNAME_S),Darwin)
# OSX
endif
UNAME_P
:=
$(
shell
uname
-p
)
ifeq
($(UNAME_P),x86_64)
# ->AMD64
endif
ifneq
($(filter %86,$(UNAME_P)),)
# ->IA32
endif
ifneq
($(filter arm%,$(UNAME_P)),)
# ->ARM
endif
endif
#############################################################
CSRCS
?=
$(
wildcard
*
.c
)
ASRCs
?=
$(
wildcard
*
.s
)
...
...
app/Makefile
View file @
cb4a49e0
...
...
@@ -41,38 +41,6 @@ endif # } PDIR
APPDIR
=
.
LDDIR
=
../ld
ifeq
($(OS),Windows_NT)
# WIN32
# We are under windows. Assume using xcc.
CCFLAGS
+=
-Os
--rename-section
.text
=
.irom0.text
--rename-section
.literal
=
.irom0.literal
ifeq
($(PROCESSOR_ARCHITECTURE),AMD64)
# ->AMD64
endif
ifeq
($(PROCESSOR_ARCHITECTURE),x86)
# ->IA32
endif
else
# We are under other system, may be Linux. Assume using gcc.
# Can we use -fdata-sections?
CCFLAGS
+=
-Os
-ffunction-sections
-fno-jump-tables
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),Linux)
# LINUX
endif
ifeq
($(UNAME_S),Darwin)
# OSX
endif
UNAME_P
:=
$(
shell
uname
-p
)
ifeq
($(UNAME_P),x86_64)
# ->AMD64
endif
ifneq
($(filter %86,$(UNAME_P)),)
# ->IA32
endif
ifneq
($(filter arm%,$(UNAME_P)),)
# ->ARM
endif
endif
TARGET_LDFLAGS
=
\
-nostdlib
\
...
...
app/include/user_config.h
View file @
cb4a49e0
...
...
@@ -38,6 +38,7 @@
#define ICACHE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
#define ICACHE_STORE_ATTR __attribute__((aligned(4)))
#define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".rodata.text")))
#define CLIENT_SSL_ENABLE
#define GPIO_INTERRUPT_ENABLE
...
...
app/lua/lrodefs.h
View file @
cb4a49e0
...
...
@@ -16,7 +16,7 @@
#undef LREGISTER
#if (MIN_OPT_LEVEL > 0) && (LUA_OPTIMIZE_MEMORY >= MIN_OPT_LEVEL)
#define LUA_REG_TYPE luaR_entry ICACHE_
FLASH
_ATTR
#define LUA_REG_TYPE luaR_entry ICACHE_
RODATA
_ATTR
#define LSTRKEY LRO_STRKEY
#define LNUMKEY LRO_NUMKEY
#define LNILKEY LRO_NILKEY
...
...
app/platform/flash_api.c
View file @
cb4a49e0
...
...
@@ -7,7 +7,7 @@
#include "flash_api.h"
#include "spi_flash.h"
static
volatile
const
uint8_t
flash_init_data
[
128
]
ICACHE_STORE_ATTR
ICACHE_
FLASH
_ATTR
=
static
volatile
const
uint8_t
flash_init_data
[
128
]
ICACHE_STORE_ATTR
ICACHE_
RODATA
_ATTR
=
{
0x05
,
0x00
,
0x04
,
0x02
,
0x05
,
0x05
,
0x05
,
0x02
,
0x05
,
0x00
,
0x04
,
0x05
,
0x05
,
0x04
,
0x05
,
0x05
,
0x04
,
0xFE
,
0xFD
,
0xFF
,
0xF0
,
0xF0
,
0xF0
,
0xE0
,
0xE0
,
0xE0
,
0xE1
,
0x0A
,
0xFF
,
0xFF
,
0xF8
,
0x00
,
...
...
ld/eagle.app.v6.ld
View file @
cb4a49e0
...
...
@@ -71,6 +71,7 @@ SECTIONS
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
*(.literal.* .text.*)
*(.rodata.text)
_irom0_text_end = ABSOLUTE(.);
_flash_used_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment