Skip to content

Commit

Permalink
cortex-m0: newlib-nano: add CFLAGS for optimizing size
Browse files Browse the repository at this point in the history
  • Loading branch information
franzflasch committed Aug 4, 2023
1 parent d613b1d commit b8859fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configs/targets/cortex-m0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ function config_cortex-m0() {
)

NEWLIB_NANO_CONFIGURATION=(
"CFLAGS_FOR_TARGET=\"-ffunction-sections \
-fdata-sections \
-Os \
-fomit-frame-pointer \
-fno-unroll-loops \
-mabi=aapcs \
-DPREFER_SIZE_OVER_SPEED \
-D__OPTIMIZE_SIZE__ \
-DSMALL_MEMORY \
-D__BUFSIZ__=64 \
-D_REENT_SMALL\""
"${NEWLIB_NANO_BASE_CONFIGURATION[@]}"
"--with-cpu=cortex-m0"
"--with-mode=thumb"
Expand Down

0 comments on commit b8859fb

Please sign in to comment.