I suppose to setting an environment from scratch for developing firmware on a stm32f4 board.
I use emacs, openocd, gdb and arm gnu toolchain.
Maybe that is recommended ?
And What documents should i read ?
This device is based on Cortex-M4.
This guide could be a good place to start:
https://developer.arm.com/documentation/dui0553
STM uses CMSIS Packs for their example code, and configuring the device with STMCubeMX. I recommend reading their tooling documentation.
https://www.arm.com/technologies/cmsis.