Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/pbio/drv/block_device/block_device_ev3.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

#if PBDRV_CONFIG_BLOCK_DEVICE_EV3

#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_EV3_SIZE + 2048
#error "Application RAM not big enough."
#endif

#include <stdbool.h>
#include <stdint.h>
#include <string.h>
Expand Down
4 changes: 4 additions & 0 deletions lib/pbio/drv/block_device/block_device_flash_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

#if PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32

#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32_SIZE + 2048
#error "Application RAM not big enough."
#endif

#include <stdint.h>
#include <string.h>

Expand Down
4 changes: 4 additions & 0 deletions lib/pbio/drv/block_device/block_device_w25qxx_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

#if PBDRV_CONFIG_BLOCK_DEVICE_W25QXX_STM32

#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_W25QXX_STM32_SIZE + 2048
#error "Application RAM not big enough."
#endif

#include <stdbool.h>
#include <stdint.h>
#include <string.h>
Expand Down
7 changes: 0 additions & 7 deletions lib/pbio/include/pbdrv/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,4 @@
#define PBDRV_CONFIG_HAS_PORT_4 (0)
#endif

#if PBDRV_CONFIG_BLOCK_DEVICE
// Application RAM must enough to load ROM and still do something useful.
#if PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE < PBDRV_CONFIG_BLOCK_DEVICE_ROM_SIZE + 2048
#error "Application RAM must be at least ROM size + 2K."
#endif
#endif

#endif // _PBDRV_CONFIG_H_
6 changes: 3 additions & 3 deletions lib/pbio/platform/ev3/pbdrvconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
#define PBDRV_CONFIG_BATTERY_EV3 (1)

#define PBDRV_CONFIG_BLOCK_DEVICE (1)
#define PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE (10 * 1024)
#define PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE (1 * 1024 * 1024)
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3 (1)
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3_SIZE (8 * 1024) // TBD, can be a few MB
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3_SIZE (1 * 1024 * 1024 * 3 / 4)
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3_SIZE_USER (512)
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3_START_ADDRESS (10 * 1024 * 1024) // TBD
#define PBDRV_CONFIG_BLOCK_DEVICE_EV3_START_ADDRESS (10 * 1024 * 1024)

#define PBDRV_CONFIG_IOPORT (1)
#define PBDRV_CONFIG_IOPORT_HAS_ADC (1)
Expand Down