Skip to content

Commit 424fd78

Browse files
committed
flash: fix flash algo generated - protect with DEVICE_FLASH
1 parent 70f3252 commit 424fd78

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/flash_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
0xb5104935, 0x60084449, 0x21004834, 0x48356001, 0x44484a33, 0x22016002, 0x04926041, 0x02926082,
@@ -99,3 +101,5 @@ void flash_set_target_config(flash_t *obj)
99101
obj->flash_algo = &flash_algo_config;
100102
obj->target_config = &flash_target_config;
101103
}
104+
105+
#endif

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/flash_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
0xb5104938, 0x60084449, 0xf24c4837, 0x81c15120, 0x1128f64d, 0x880181c1, 0x0101f021, 0x48348001,
@@ -85,3 +87,5 @@ void flash_set_target_config(flash_t *obj)
8587
obj->flash_algo = &flash_algo_config;
8688
obj->target_config = &flash_target_config;
8789
}
90+
91+
#endif

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/flash_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
0xf3c04601, 0x28203007, 0x2204bf24, 0x1050eb02, 0x2810d205, 0x2203bf26, 0x1010eb02, 0xf4110880,
@@ -72,3 +74,5 @@ void flash_set_target_config(flash_t *obj)
7274
obj->flash_algo = &flash_algo_config;
7375
obj->target_config = &flash_target_config;
7476
}
77+
78+
#endif

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/device/flash_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
0xf3c04601, 0x28203007, 0x2204bf24, 0x1050eb02, 0x2810d205, 0x2203bf26, 0x1010eb02, 0xf4110880,
@@ -72,3 +74,5 @@ void flash_set_target_config(flash_t *obj)
7274
obj->flash_algo = &flash_algo_config;
7375
obj->target_config = &flash_target_config;
7476
}
77+
78+
#endif

targets/TARGET_STM/TARGET_STM32F4/TARGET_UBLOX_EVK_ODIN_W2/flash_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
0xf3c04601, 0x28203007, 0x2204bf24, 0x1050eb02, 0x2810d205, 0x2203bf26, 0x1010eb02, 0xf4110880,
@@ -72,3 +74,5 @@ void flash_set_target_config(flash_t *obj)
7274
obj->flash_algo = &flash_algo_config;
7375
obj->target_config = &flash_target_config;
7476
}
77+
78+
#endif

tools/flash_algo/c_blob_mbed.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
// This file is automagically generated
2222

23+
#if DEVICE_FLASH
24+
2325
// This is a flash algo binary blob. It is PIC (position independent code) that should be stored in RAM
2426
static uint32_t FLASH_ALGO[] = {
2527
{{algo.format_algo_data(4, 8, "c")}}
@@ -54,3 +56,4 @@ void flash_set_target_config(flash_t *obj)
5456
obj->target_config = &flash_target_config;
5557
}
5658

59+
#endif

0 commit comments

Comments
 (0)