Skip to content

Commit 8fc0a7b

Browse files
committed
CYTFM_064B0S2_4343W: use cytfm_flash only if TFM and PSA are present
This fixes bare metal builds
1 parent 8f73c18 commit 8fc0a7b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYTFM_064B0S2_4343W/cytfm_flash_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "region_defs.h"
2727
#include "cytfm_flash_info.h"
2828

29-
#if DEVICE_FLASH
29+
#if DEVICE_FLASH && defined(TARGET_TFM) && MBED_CONF_PSA_PRESENT
3030

3131
#ifdef __cplusplus
3232
extern "C" {

targets/TARGET_Cypress/TARGET_PSOC6/cy_flash_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "flash_api.h"
1818
#include "cyhal_flash.h"
1919

20-
#ifdef TARGET_TFM
20+
#if defined(TARGET_TFM) && MBED_CONF_PSA_PRESENT
2121
#include "cytfm_flash_info.h"
2222
#endif
2323

@@ -32,7 +32,7 @@ int32_t flash_init(flash_t *obj)
3232
if (CY_RSLT_SUCCESS != cyhal_flash_init(&(obj->flash))) {
3333
return -1;
3434
}
35-
#ifdef TARGET_TFM
35+
#if defined(TARGET_TFM) && MBED_CONF_PSA_PRESENT
3636
cytfm_flash_get_info(&(obj->flash), &(obj->info));
3737
#else /* TARGET_TFM */
3838
cyhal_flash_get_info(&(obj->flash), &(obj->info));

0 commit comments

Comments
 (0)