Configure microcontroller flash memory as ram?
No, flash is flash, RAM is RAM.

The micro can probably program its own flash if you needed to calculate a look up table or similar, but you can't use it as you would a RAM.

The RAM you do have can probably be configured as stack and heap, these sections will be defined in a linker script, the format for which is toolchain dependant so check your compiler and linker's manual.