atsamd: Enable HAVE_LIMITED_CODE_SIZE on small atsamd chips

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2025-04-09 22:48:29 -04:00
parent 61bbd455cf
commit 51311948be
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ config ATSAMD_SELECT
select HAVE_CHIPID
select HAVE_STEPPER_OPTIMIZED_BOTH_EDGE
select HAVE_BOOTLOADER_REQUEST
select HAVE_LIMITED_CODE_SIZE if FLASH_SIZE < 0x10000
config HAVE_SERCOM
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI

View File

@ -7,6 +7,7 @@ dirs-y += src/atsamd src/generic lib/fast-hash
MCU := $(shell echo $(CONFIG_MCU) | tr a-z A-Z)
CFLAGS-$(CONFIG_HAVE_LIMITED_CODE_SIZE) += -Os
CFLAGS-$(CONFIG_MACH_SAMC21) += -mcpu=cortex-m0plus -Ilib/samc21/samc21/include
CFLAGS-$(CONFIG_MACH_SAMD21) += -mcpu=cortex-m0plus -Ilib/samd21/samd21a/include
CFLAGS-$(CONFIG_MACH_SAMD51) += -Ilib/samd51/samd51a/include