From 49845bb72dc9f3591a558db9975baf70296e94c6 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 8 May 2020 16:25:28 +0200 Subject: [PATCH] Fixed compile flags for psoc6 --- arch.mk | 1 + hal/psoc6.ld | 106 +++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/arch.mk b/arch.mk index fb8eff89..861a94d1 100644 --- a/arch.mk +++ b/arch.mk @@ -152,6 +152,7 @@ ifeq ($(TARGET),stm32wb) endif ifeq ($(TARGET),psoc6) + CORTEX_M0=1 PKA_EXTRA_OBJS+= $(CYPRESS_PDL)/drivers/source/cy_flash.o \ $(CYPRESS_PDL)/drivers/source/cy_ipc_pipe.o \ $(CYPRESS_PDL)/drivers/source/cy_ipc_sema.o \ diff --git a/hal/psoc6.ld b/hal/psoc6.ld index 5c44dd0c..8fc6c097 100644 --- a/hal/psoc6.ld +++ b/hal/psoc6.ld @@ -1,53 +1,53 @@ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x10000000, LENGTH = ##WOLFBOOT_PARTITION_BOOT_ADDRESS## - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -SECTIONS -{ - - .text : - { - _start_text = .; - KEEP(*(.isr_vector)) - . = ALIGN(0x400); - *(.text*) - *(.rodata*) - *(.init*) - *(.fini*) - . = ALIGN(4); - _end_text = .; - } > FLASH - - .edidx : - { - . = ALIGN(4); - *(.ARM.exidx*) - } > FLASH - - _stored_data = .; - - .data : AT (_stored_data) - { - _start_data = .; - KEEP(*(.data*)) - . = ALIGN(4); - _end_data = .; - } > RAM - - .bss (NOLOAD) : - { - _start_bss = .; - __bss_start__ = .; - *(.bss*) - *(COMMON) - . = ALIGN(4); - _end_bss = .; - __bss_end__ = .; - _end = .; - } > RAM - . = ALIGN(4); -} - -END_STACK = ORIGIN(RAM) + LENGTH(RAM); +MEMORY +{ + FLASH (rx) : ORIGIN = 0x10000000, LENGTH = ##WOLFBOOT_PARTITION_BOOT_ADDRESS## + RAM (rwx) : ORIGIN = 0x08000000, LENGTH = 64K +} + +SECTIONS +{ + + .text : + { + _start_text = .; + KEEP(*(.isr_vector)) + . = ALIGN(0x400); + *(.text*) + *(.rodata*) + *(.init*) + *(.fini*) + . = ALIGN(4); + _end_text = .; + } > FLASH + + .edidx : + { + . = ALIGN(4); + *(.ARM.exidx*) + } > FLASH + + _stored_data = .; + + .data : AT (_stored_data) + { + _start_data = .; + KEEP(*(.data*)) + . = ALIGN(4); + _end_data = .; + } > RAM + + .bss (NOLOAD) : + { + _start_bss = .; + __bss_start__ = .; + *(.bss*) + *(COMMON) + . = ALIGN(4); + _end_bss = .; + __bss_end__ = .; + _end = .; + } > RAM + . = ALIGN(4); +} + +END_STACK = ORIGIN(RAM) + LENGTH(RAM);