You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

5 years ago
  1. #flags common to all targets
  2. CFLAGS += -DCONFIG_GPIO_AS_PINRESET
  3. CFLAGS += -DBOARD_PCA10040
  4. CFLAGS += -DNRF52
  5. CFLAGS += -DBSP_DEFINES_ONLY
  6. CFLAGS += -mcpu=cortex-m4
  7. CFLAGS += -mthumb -mabi=aapcs --std=gnu99
  8. CFLAGS += -Wall -O3 -g3
  9. CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
  10. # keep every function in separate section. This will allow linker to dump unused functions
  11. CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
  12. CFLAGS += -fno-builtin --short-enums
  13. # keep every function in separate section. This will allow linker to dump unused functions
  14. LDFLAGS += -Xlinker -Map=$(LISTING_DIRECTORY)/$(OUTPUT_FILENAME).map
  15. LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
  16. LDFLAGS += -mcpu=cortex-m4
  17. LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
  18. # let linker to dump unused sections
  19. LDFLAGS += -Wl,--gc-sections
  20. # use newlib in nano version
  21. LDFLAGS += --specs=nano.specs -lc -lnosys
  22. # Assembler flags
  23. ASMFLAGS += -x assembler-with-cpp
  24. ASMFLAGS += -DBOARD_PCA10040
  25. ASMFLAGS += -DNRF52
  26. ASMFLAGS += -DBSP_DEFINES_ONLY
  27. ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET