The 1MB limit is related to the old silicon revision. This is no longer a problem with the rev. 3 silicon (hence why you want to replace your STM32F427 MCUs).
You can get the bootloader code from the Px4 bootloader GitHub repo: https://github.com/PX4/Bootloader.
The source code for the latest stable releases can also be found in the GitHub repo: https://github.com/PX4/Bootloader/releases
Once you have cloned the repo, run
make px4fmuv2_bl in the directory (just running
make will make all of the bootloaders - probably not what you need immediately). This should update the one submodule (libopencm3), and compile your bootloader. It will produce a
px4fmuv2_bl.bin file in the bootloader directory. You can flash this binary onto the new MCU to address
0x08000000 using your ST-Link.
Additional notes for replacing the MCU:
- If you have access to hot air, I would recommend that you use that to remove the chip. If you only have a soldering iron, be careful not to pull up any of the pads under the pins when you desolder them. If using hot air, use a low flow rate so as not to blow the surrounding components (mostly small capacitors) off of their pads.
- Needle-nose tweezers are also very useful for initially removing and positioning the new MCU.
- Once you have removed the chip, clean the pads using some solder wick, so that everything is clean and there are no shorts
- If you have access to a microscope, use it. It will make soldering the chip much much much easier
- If you have chip flux, use that when soldering. It will make your life easier, and will make it less likely that you create solder-bridges between the pins
- Once you have soldered on the new chip, check adjacent pins for solder bridges - preferably using a multimeter with fine-tipped probes - sometimes the solder bridges can be difficult to see unless you are using a microscope.
- Also make sure to check that you don't have a short between 3V3 and GND.
Once the bootloader is flashed onto the MCU, it should appear on your PC when you connect it via USB. If you are on Linux, you can just run
dmesg to see if it has shown up.
I hope that helps you.