Skip to content

Commit

Permalink
Build NuttX optimized for size
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Nov 15, 2014
1 parent d4a5f34 commit 75bc813
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nuttx-configs/px4fmu-v1/nsh/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

MAXOPTIMIZATION = -O3
MAXOPTIMIZATION = -Os
ARCHCPUFLAGS = -mcpu=cortex-m4 \
-mthumb \
-march=armv7e-m \
Expand Down
2 changes: 1 addition & 1 deletion nuttx-configs/px4fmu-v2/nsh/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

MAXOPTIMIZATION = -O3
MAXOPTIMIZATION = -Os
ARCHCPUFLAGS = -mcpu=cortex-m4 \
-mthumb \
-march=armv7e-m \
Expand Down
3 changes: 2 additions & 1 deletion nuttx-configs/px4fmu-v2/scripts/ld.script
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@

MEMORY
{
flash (rx) : ORIGIN = 0x08004000, LENGTH = 2032K
/* disabled due to silicon errata flash (rx) : ORIGIN = 0x08004000, LENGTH = 2032K */
flash (rx) : ORIGIN = 0x08004000, LENGTH = 1008K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
ccsram (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
}
Expand Down
2 changes: 1 addition & 1 deletion nuttx-configs/px4io-v1/nsh/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

MAXOPTIMIZATION = -O3
MAXOPTIMIZATION = -Os
ARCHCPUFLAGS = -mcpu=cortex-m3 \
-mthumb \
-march=armv7-m
Expand Down
6 changes: 1 addition & 5 deletions nuttx-configs/px4io-v2/nsh/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump

MAXOPTIMIZATION = -O3
MAXOPTIMIZATION = -Os
ARCHCPUFLAGS = -mcpu=cortex-m3 \
-mthumb \
-march=armv7-m

# enable precise stack overflow tracking
#INSTRUMENTATIONDEFINES = -finstrument-functions \
# -ffixed-r10

# use our linker script
LDSCRIPT = ld.script

Expand Down

0 comments on commit 75bc813

Please sign in to comment.