Updating firmware by G-code

Hello

i know that it is possible to update the settings of the steps/mm in the firmware by the use of G-code (M92, M500, M501).

But is it also possible the update the acceleration by using M204 P… followed by the M500 code to store the code and finally M501 code?

Or do i really need the use the usb cable and update the firmware this way?

Thanks