Energy-Efficiency and Security for TinyML and EdgeAI: A Cross-Layer Approach