That function will be in the board BSP files in cubemx, something like stm32f746_discovery_sdram.c/h
Maybe the BSP packages are available as a library in platformio, if you're using mbed which it looks like you might be, they definitely are: https://os.mbed.com/teams/ST/code/BSP_DISCO_F746NG/