The invention provides new heterocyclic compounds having the general formula (I) wherein A, L, X, m, n, R 1 and R 2 are as described herein, compositions including the compounds, processes of manufacturing the compounds and methods of using the compounds.