The present invention relates to compounds of general formula I, wherein the groups R1, LP, LQ, X1, X2, X3, A, n and m are as defined in the application, which have valuable pharmacological properties, and in particular bind to the GPR119 receptor and modulate its activity.