The magnetic configuration hosting prominences can be a large-scale helical magnetic flux rope. As a necessary step towards future prominence formation studies, we report on a stepwise approach to study flux rope formation. We start with summarizing our recent three-dimensional (3D) isothermal magnetohydrodynamic (MHD) simulation where a flux rope is formed, including gas pressure and gravity. This starts from a static corona with a linear force-free bipolar magnetic field, altered by lower boundary vortex flows around the main polarities and converging flows towards the polarity inversion. The latter flows induce magnetic reconnection and this forms successive new helical loops so that a complete flux rope grows and ascends. After stopping the driving flows, the system relaxes to a stable helical magnetic flux rope configuration embedded in an overlying arcade. Starting from this relaxed isothermal endstate, we next perform a thermodynamic MHD simulation with a chromospheric layer inserted at the bottom. As a result of a properly parametrized coronal heating, and due to radiative cooling and anisotropic thermal conduction, the system further relaxes to an equilibrium where the flux rope and the arcade develop a fully realistic thermal structure. This paves the way to future simulations for 3D prominence formation.