issues with devicetree in 2.2

Trevor Clarke

'm using Zephyr 2.2 for stm32 through platformio. I'm trying to use the newer device tree API to configure hardware through an overlay. 
I've got an overlay with:

&usart3 { current-speed = <31250>; };
/ { aliases { midi-port = &usart2; }; };

In devicetree_unfixed.h I get defines like DT_ALIAS_MIDI_PORT_BASE_ADDRESS so I know my overlay is being processed.

In my C code I do:

#define MIDI_DEV DT_ALIAS(midi_port)
struct device* midiin = device_get_binding(MIDI_DEV);

When I compile (complete clean and rebuild which re-runs cmake, etc.) I see:

warning: implicit declaration of function 'DT_ALIAS';

A search through my build artifacts and through the zephyr source shows no definie for DT_ALIAS. I'm following the examples in the documentation. Am I missing something?

Trevor R.H. Clarke
Computer Science House
Rochester Institute of Technology

Join to automatically receive all group messages.