how to upload firmware to melzi v2 board?

how to change the melzi v2 atmega1284p setting (upload frimware)?
I have installed arduno 1.0.5-r2 but I don't know where to start first.
How do I write configuration.h ? where to find the setting.
the melzi board(attach photo) got one reset near the chip. do i need to reset first?

I want to change the setting because:
My 3d printer use repetier host v1.61. I click the arrow it go right but never go left and go front but not back. I change the motor wiring green,black,red,blue to blue,red,green,black also the same movement right not left ,front not back.
please help thank.

hello euxvis,
I have installed arduino and merlin and found the configuration.h. what can I do next?
Is that the correct step!
1) run merlin
2) select tool--> board-->arduino mega atmega 1284(my board reprap melzi v2 1284p from china)
3)connect use cable to the 3dprinter board
4) load the configuration.h---> change the baurate to 115000
5) press upload
please confirm thank
note: these few days I found out my printer problem as follow:
I start repetier -host and connected.
when I manually press the x-axis arrow to +1 it go right when press -1 no action,but when hold and press down the microswitch and press -1 it go left. The y and z axis the same.
I can't change the switch setting.
How do I add setting to configuration.h? thank

First, use a continuity tester to find the (2) pairs of the motors. Connect them to the board, one pair on first two connectors and the other on the two lower connectors. Check which direction the motor moves. If backwards switch them or go into Repetier "Printer Settings", "Printer" and click "Invert Direction In Controls"

thank,
after I load merlin I go to tool board to find the configuration.h as attach.
Is that the correct configuration.h ?
I try to open other configuration.h file it show as attach.

I tested the stepper motors all can turn clockwise and anticlockwise.
only when fixed in the board melzi v2 and run repetier host in pronteface manually press +1 it go right -1 not moving. when hold down(not release) the microswitch press -1 it go left. please help thank

Hello, I can't to upload firmware onto Melzi Tronxy board. When I try to upload with closed 2-pin (autoreset switch) - Arduino IDE can't do it.
When upload without jumper then I see old firmware.
Can somebody help me?