That depends. Are you now using gcc to compile the new code or Keil?
If it's gcc then you have to look at the linker script. I'm betting Keil uses a linker script also.
From what I can see here on Cube IDE with gcc, 2 linker scripts are provided. One for writing code to RAM and one for writing code to flash. GCC linker scripts have a *.ld file extension.
Not sure where Cube IDE installs GNU ARM GCC but the documentation is available in ld.pdf if you download and install the
GNU ARM Embedded Tool ChainOn windows its installed at "C:\Program Files (x86)\GNU Arm Embedded Toolchain\X XXXX-qX-update\share\doc\gcc-arm-none-eabi\pdf\ld.pdf"
X XXXX-qX will be what ever the latest version is you download
Just a word of warning however be careful the programmer doesn't do a full chip erase prior to writing your code to the appropriate place