Is possible to burn ADUINO bootloader by ICSP while SPI devices are connected?

Hi all,

I am designing a electronic board with ARDUINO and several sensors connected via SPI to the microcontroller. Due to project requirements, I cannot use a commercial Arduino board since I need a specific shape with concrete dimensions for it, so I have decided to design a board based on Arduino schematic, adding the rest of circuitry needed (sensors mainly). In addition, and also because of space requeriments, I need to use only SMD components.

I know that it is possible to buy the ATMega with Arduino bootloader previously uploaded, but I don't know if the IC can be "deprogrammed" while soldering it, so I added to my designed board an ICSP port for a later upload of the Arduino bootloader when the board is assembled. However, I'm afraid that it will not work considering that the sensors will be connected with the MCU trough SPI port, which uses MOSI, MISO and SCK lines, same than ICSP port.

So the question is; How can I manage this? I have several solutions in mind;

1- Soldering all devices and trust that everything will work fine (รด_O)
2- Soldering all devices in the board in exception to the sensors. Once the MCU is programmed, the sensors can be soldered.

I would like to use solution 1 because the components are very small and I have not large experience soldering components with this packaging. The best choice for being succes implementing the system would be to order the PCB fabrication + assembly.

Waiting for your opinion/advices.
Thanks in advance.

The responses to this thread probably apply to your situation:
http://forum.arduino.cc/index.php?topic=330976.0
I recommend designing your board so you know ICSP programming will work after final assembly. You can make sure the sensor chip select lines are held high so they will not interfere with the programming (and verify that works by prototyping/breadboarding, or you can use jumpers to add or remove the sensors on demand, or a combination of both methods. Note that you don't really need a bootloader if you just want to upload the software to the processor using ICSP. The Arduino IDE has an Upload Using Programmer menu option for that. You only need to use a bootloader if you need to upload using a different method such as serial. [edit--although you will want to burn the bootloader at least once even if you end up using Upload Using Programmer, because it is during the Burn Bootloader function of the IDE that the fuses get set.]

Another thread with relevant info:
http://forum.arduino.cc/index.php?topic=340211.0

i had good luck using an usbasp programmer with tft, oleds, and rf modules still attached. programmer pins have nearly order of magnitude more drive than slave miso. worst case temporary garbage on the displays but no interference with flashing. i suspect same for any arduino-as-isp.

however hard to go wrong following the chip select pull-up advice. fraction of a penny and almost no board space.