All RAIL example projects rely on UART since
retargetserial.c is added to the project automatically by HAL library plugin - even it the particular example does not use UART at all (like Simple TRX ).
Disabling UART and all the serial port related items in AppBuilder or Hardware Configurator (see the screenshots below) does not result in removing the UART dependency.
The root cause is that
retargetserialhalconfig.h which end in
#error "Invalid UART type" if no valid UART is defined in
hal-config.h. Thus the compilation will fail with the following (or similar) error:
The solution is to exclude
retargetserial.c (which is located in hal-efr32) from the project. After exclusion the project should compile cleanly.
There is one drawback however, regenerating the project files by AppBuilder will reset the exclusion, thus the file must be exclude after generation again.