Skip to content

Commit aae6462

Browse files
committed
pbio/drv/config: Fix broken size check.
This still applies, but there is no longer a cross platform way to check it.
1 parent 0e3a782 commit aae6462

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

lib/pbio/drv/block_device/block_device_ev3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
#if PBDRV_CONFIG_BLOCK_DEVICE_EV3
1818

19+
#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_EV3_SIZE + 2048
20+
#error "Application RAM not big enough."
21+
#endif
22+
1923
#include <stdbool.h>
2024
#include <stdint.h>
2125
#include <string.h>

lib/pbio/drv/block_device/block_device_flash_stm32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
#if PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32
99

10+
#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32_SIZE + 2048
11+
#error "Application RAM not big enough."
12+
#endif
13+
1014
#include <stdint.h>
1115
#include <string.h>
1216

lib/pbio/drv/block_device/block_device_w25qxx_stm32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
#if PBDRV_CONFIG_BLOCK_DEVICE_W25QXX_STM32
99

10+
#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_W25QXX_STM32_SIZE + 2048
11+
#error "Application RAM not big enough."
12+
#endif
13+
1014
#include <stdbool.h>
1115
#include <stdint.h>
1216
#include <string.h>

lib/pbio/include/pbdrv/config.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,4 @@
5757
#define PBDRV_CONFIG_HAS_PORT_4 (0)
5858
#endif
5959

60-
#if PBDRV_CONFIG_BLOCK_DEVICE
61-
// Application RAM must enough to load ROM and still do something useful.
62-
#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_ROM_SIZE + 2048
63-
#error "Application RAM must be at least ROM size + 2K."
64-
#endif
65-
#endif
66-
6760
#endif // _PBDRV_CONFIG_H_

0 commit comments

Comments
 (0)