forked from xuos/xiuos
1. Remove the debugging information to reduce the size of the bin package
2. The compilation option optimization level is increased to 1
This commit is contained in:
parent
27e9613dcf
commit
616332962b
|
@ -62,10 +62,6 @@ PART += COMPILE_KERNEL
|
|||
else ifeq ($(CONFIG_COMPILER_APP)_$(CONFIG_COMPILER_KERNEL),y_y)
|
||||
PART := COMPILE_APP COMPILE_KERNEL
|
||||
|
||||
else ifeq ($(CONFIG_MCUBOOT_BOOTLOADER), y)
|
||||
PART := COMPILE_BOOTLOADER
|
||||
else ifeq ($(CONFIG_MCUBOOT_APPLICATION), y)
|
||||
PART := COMPILE_APPLICATION
|
||||
else
|
||||
PART :=
|
||||
|
||||
|
@ -77,9 +73,16 @@ ifeq ($(CONFIG_RESOURCES_LWIP), y)
|
|||
PART += COMPILE_LWIP
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MCUBOOT_BOOTLOADER), y)
|
||||
PART += COMPILE_BOOTLOADER
|
||||
else ifeq ($(CONFIG_MCUBOOT_APPLICATION), y)
|
||||
PART += COMPILE_APPLICATION
|
||||
else
|
||||
PART += COMPILE_ALL
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
all: $(PART)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export CROSS_COMPILE ?=/usr/bin/arm-none-eabi-
|
||||
|
||||
export CFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g -fgnu89-inline -Wa,-mimplicit-it=thumb
|
||||
export CFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O1 -fgnu89-inline -Wa,-mimplicit-it=thumb
|
||||
|
||||
export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb -gdwarf-2
|
||||
export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -x assembler-with-cpp -Wa,-mimplicit-it=thumb
|
||||
### if use USB function, use special lds file because USB uses ITCM
|
||||
|
||||
ifeq ($(CONFIG_LIB_MUSLLIB), y)
|
||||
|
@ -25,7 +25,7 @@ else
|
|||
export LFLAGS += -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-xidatong-arm32.map,-cref,-u,Reset_Handler -T $(BSP_ROOT)/link.lds
|
||||
endif
|
||||
|
||||
export CXXFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O0 -gdwarf-2 -g
|
||||
export CXXFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Dgcc -O1
|
||||
|
||||
export APPLFLAGS := -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ MEMORY
|
|||
m_interrupts (RX) : ORIGIN = 0x60100000, LENGTH = 0x00000400
|
||||
m_text (RX) : ORIGIN = 0x60100400, LENGTH = 0x000FFC00
|
||||
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00060000
|
||||
m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00060000
|
||||
|
||||
m_sdram (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000
|
||||
|
|
|
@ -60,7 +60,7 @@ MEMORY
|
|||
m_interrupts (RX) : ORIGIN = 0x60002000, LENGTH = 0x00000400
|
||||
m_text (RX) : ORIGIN = 0x60002400, LENGTH = 0x0007DC00
|
||||
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00060000
|
||||
m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00060000
|
||||
|
||||
m_sdram (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000
|
||||
|
|
|
@ -58,7 +58,7 @@ MEMORY
|
|||
|
||||
m_interrupts (RX) : ORIGIN = 0x60002000, LENGTH = 0x00000400
|
||||
m_text (RX) : ORIGIN = 0x60002400, LENGTH = 0x03FFDC00
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
|
||||
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00060000
|
||||
m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00060000
|
||||
|
||||
m_sdram (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000
|
||||
|
|
Loading…
Reference in New Issue