-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pbdrv/block_device: Set size in header.
Instead of using a getter function to get the size from a linker file (Powered Up) or platform data (SPIKE) , set it as a PBDRV configuration variable. This will allow us to do compile-time checks, and use it to derive the correct values for config values such as PBSYS_APP_USER_PROGRAM_SIZE (this will be done in the next commits). This way have to set only one program size constraint (based on ROM size) and one tuning variable to balance heap/stack, instead of many interdependent settings. See pybricks/support#739
- Loading branch information
1 parent
7d7434f
commit 5d7b056
Showing
21 changed files
with
69 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2020-2022 The Pybricks Authors | ||
|
||
#include "pbdrvconfig.h" | ||
|
||
#define PBSYS_CONFIG_BATTERY_CHARGER (0) | ||
#define PBSYS_CONFIG_BLUETOOTH (1) | ||
#define PBSYS_CONFIG_HUB_LIGHT_MATRIX (0) | ||
#define PBSYS_CONFIG_MAIN (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_PROGRAM_DATA_SIZE (20 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_OVERLAPS_BOOTLOADER_CHECKSUM (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_RAM_SIZE (20 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_ROM_SIZE (PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32_SIZE) | ||
#define PBSYS_CONFIG_STATUS_LIGHT (1) | ||
#define PBSYS_CONFIG_STATUS_LIGHT_BATTERY (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2020-2022 The Pybricks Authors | ||
|
||
#include "pbdrvconfig.h" | ||
|
||
#define PBSYS_CONFIG_BATTERY_CHARGER (0) | ||
#define PBSYS_CONFIG_BLUETOOTH (1) | ||
#define PBSYS_CONFIG_HUB_LIGHT_MATRIX (0) | ||
#define PBSYS_CONFIG_MAIN (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_PROGRAM_DATA_SIZE (7 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_OVERLAPS_BOOTLOADER_CHECKSUM (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_RAM_SIZE (7 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_ROM_SIZE (PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32_SIZE) | ||
#define PBSYS_CONFIG_STATUS_LIGHT (1) | ||
#define PBSYS_CONFIG_STATUS_LIGHT_BATTERY (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2020-2022 The Pybricks Authors | ||
|
||
#include "pbdrvconfig.h" | ||
|
||
#define PBSYS_CONFIG_BATTERY_CHARGER (0) | ||
#define PBSYS_CONFIG_BLUETOOTH (1) | ||
#define PBSYS_CONFIG_HUB_LIGHT_MATRIX (0) | ||
#define PBSYS_CONFIG_MAIN (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_PROGRAM_DATA_SIZE (32 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_OVERLAPS_BOOTLOADER_CHECKSUM (1) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_RAM_SIZE (32 * 1024) | ||
#define PBSYS_CONFIG_PROGRAM_LOAD_ROM_SIZE (PBDRV_CONFIG_BLOCK_DEVICE_FLASH_STM32_SIZE) | ||
#define PBSYS_CONFIG_STATUS_LIGHT (1) | ||
#define PBSYS_CONFIG_STATUS_LIGHT_BATTERY (0) |
Oops, something went wrong.