Browse Source

Add RAM location test

master
Starbeamrainbowlabs 1 year ago
parent
commit
cc2fe93ed8
Signed by: sbrl GPG Key ID: 1BE5172E637709C2
1 changed files with 28 additions and 0 deletions
  1. +28
    -0
      RamLocationTest/RamLocationTest.ino

+ 28
- 0
RamLocationTest/RamLocationTest.ino View File

@ -0,0 +1,28 @@
#include <Arduino.h>
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() {
}

Loading…
Cancel
Save