Hardware/compiler memory protection in sensor nodes