Grbl has been ported to STM32F103, and this is out of the box made for controlling 3 stepper motors with G-code (RS-274), and this processor also has quadrature support in hardware on it's timers. It also has built in USB, 3x UsART and extra peripherals such as DMA to push more data around than the processor could do on it's own.
I think Grbl uses the USB in CDC mode, but you will have to modifiy / add code for the quadrature encoders.
STM32F103 does not have enough Uhmpf to run Linux on it's own, but it can easily be a "smart" peripheral to a linux board.