Skip to content

Commit

Permalink
Add compiler definition ARDUINO_BOARD_RAM_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
eigendude committed Mar 4, 2022
1 parent 953b2e6 commit 6892bbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Arduino/System/BoardToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ function (SetupBoardToolchain boards_namespace board_id generate_dir)
string(TOUPPER "${pl_arch}" ARDUINO_BOARD_BUILD_ARCH)
_board_get_platform_property("/pl_path" ARDUINO_BOARD_RUNTIME_PLATFORM_PATH)

# Get board RAM size
_board_get_property("upload.maximum_data_size" board_ram_size)

# Inherit the platform.txt from the referenced platform. This gets
# overriden later, if the platform provides its own platform.txt.
_board_get_property("build.core" _prop_value QUIET)
Expand Down Expand Up @@ -530,6 +533,7 @@ function (SetupBoardToolchain boards_namespace board_id generate_dir)
set(ARDUINO_BOARD_IDENTIFIER "${_short_id}")
set(ARDUINO_BOARD_NAME "${board_name}")
set(ARDUINO_GENERATE_DIR "${generate_dir}")
set(ARDUINO_BOARD_RAM_SIZE "${board_ram_size}")

set(templates_dir "${ARDUINO_TOOLCHAIN_DIR}/Arduino/Templates")
configure_file(
Expand Down
1 change: 1 addition & 0 deletions Arduino/Templates/ArduinoSystem.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set(ARDUINO_CORE_SPECIFIC_PLATFORM_PATH "@ARDUINO_CORE_SPECIFIC_PLATFORM_PATH@")
set(ARDUINO_BOARD_BUILD_CORE_PATH "@ARDUINO_BOARD_BUILD_CORE_PATH@")
set(ARDUINO_BOARD_BUILD_VARIANT_PATH "@ARDUINO_BOARD_BUILD_VARIANT_PATH@")
set(ARDUINO_BOARD_HOST_NAME "@ARDUINO_BOARD_HOST_NAME@")
set(ARDUINO_BOARD_RAM_SIZE "@ARDUINO_BOARD_RAM_SIZE@")

@ARDUINO_SEL_MENU_SET_LIST@

Expand Down

0 comments on commit 6892bbb

Please sign in to comment.