This PR adds the compiler definition ARDUINO_BOARD_RAM_SIZE, and sets it to the memory size of board being flashed. As a result, firmware code can refer to the expected total memory size when reporting memory usage percentages.
How has this been tested?
At the top of my memory utils header, I have:
#if !defined(ARDUINO_BOARD_RAM_SIZE)
#error "ARDUINO_BOARD_RAM_SIZE should have been defined by the build system"
#endif
When compiled with this patch, the build succeeds.
Description
This PR adds the compiler definition
ARDUINO_BOARD_RAM_SIZE
, and sets it to the memory size of board being flashed. As a result, firmware code can refer to the expected total memory size when reporting memory usage percentages.How has this been tested?
At the top of my memory utils header, I have:
When compiled with this patch, the build succeeds.
I also have the following function:
I've tested on the following boards: