diff --git a/RamLocationTest/RamLocationTest.ino b/RamLocationTest/RamLocationTest.ino new file mode 100644 index 0000000..e829c4a --- /dev/null +++ b/RamLocationTest/RamLocationTest.ino @@ -0,0 +1,28 @@ +#include + +struct Test { + uint32_t a; + char b; +}; + +Test global_var; + +void setup() { + Serial.begin(115200); + + Test stack; + Test* heap = new Test(); + + Serial.print(F("Stack location: ")); + Serial.println((uint32_t)(&stack), DEC); + + Serial.print(F("Heap location: ")); + Serial.println((uint32_t)heap, DEC); + + Serial.print(F("Global location: ")); + Serial.println((uint32_t)&global_var, DEC); +} + +void loop() { + +}