user48278: I made a board for my project based on Arduino Pro Mini. The problem is, that I had to put the LED on pin 4 instead of pin 13.
What setting do I have to change to make pin 4 the default one? Or do I have to write my own Board Library?

user6936: Following on from Juraj's answer:

The blinking while uploading makes the bootloader. Arduino Mini uses
  Optiboot. The source codes are on GitHub. You would need to
  change the pin in pin_defs.h and make the bootloader. Then flash it to
  the 328p with a programmer over ICSP.

The line that you need to change in pin_defs.h is line number 27:
#define LED B5

As you can see it is currently set to B5. This is the fifth bit in port B which corresponds to pin 13
Pin 4 corresponds to PORTD bit 4, so the line would become
#define LED D4

The Arduino digital pins are connected to three different banks of 8 bits, known as ports (PORTD, PORTB and PORTC`). To see their relation, refer to this table from Arduino Playground - Pins




user37622: The blinking while uploading makes the bootloader. Arduino Mini uses Optiboot. The source codes are on GitHub. You would need to change the pin in pin_defs.h and make the bootloader. Then flash it to the 328p with a programmer over ICSP.
Details what to change are in Greenonline's answer.

48278: <p>I made a board for my project based on Arduino Pro Mini. The problem is, that I had to put the LED on pin 4 instead of pin 13.</p>

<p>What setting do I have to change to make pin 4 the default one? Or do I have to write my own Board Library?</p>
 6936: <p>Following on from <a href="https://arduino.stackexchange.com/questions/55279/how-do-i-change-the-default-led-pin-for-displaying-uploading#answer-55280">Juraj's answer</a>:</p>

<blockquote>
  <p>The blinking while uploading makes the bootloader. Arduino Mini uses
  Optiboot. The source codes are <a href="https://github.com/Optiboot/optiboot/blob/master/optiboot/bootloaders/optiboot/pin_defs.h" rel="nofollow noreferrer">on GitHub</a>. You would need to
  change the pin in pin_defs.h and make the bootloader. Then flash it to
  the 328p with a programmer over ICSP.</p>
</blockquote>

<p>The line that you need to change in <a href="https://github.com/Optiboot/optiboot/blob/master/optiboot/bootloaders/optiboot/pin_defs.h" rel="nofollow noreferrer"><code>pin_defs.h</code></a> is <a href="https://github.com/Optiboot/optiboot/blob/master/optiboot/bootloaders/optiboot/pin_defs.h#L27" rel="nofollow noreferrer">line number 27</a>:</p>

<pre><code>#define LED B5
</code></pre>

<p>As you can see it is currently set to <code>B5</code>. This is the fifth bit in port B which corresponds to pin 13</p>

<p>Pin 4 corresponds to <code>PORTD</code> bit 4, so the line would become</p>

<pre><code>#define LED D4
</code></pre>

<p>The Arduino digital pins are connected to three different banks of 8 bits, known as <em>ports</em> (<code>PORTD</code>, <code>PORTB</code> and PORTC`). To see their relation, refer to this table from <a href="https://playground.arduino.cc/Learning/Pins" rel="nofollow noreferrer">Arduino Playground - Pins</a></p>

<blockquote>
  <p><a href="https://i.stack.imgur.com/Jccjt.png" rel="nofollow noreferrer" title="Ports to Pins table"><img src="https://i.stack.imgur.com/Jccjt.png" alt="Ports to Pins table" title="Ports to Pins table"></a></p>
</blockquote>
 37622: <p>The blinking while uploading makes the bootloader. Arduino Mini uses Optiboot. The source codes are <a href="https://github.com/Optiboot/optiboot/blob/master/optiboot/bootloaders/optiboot/pin_defs.h" rel="nofollow noreferrer">on GitHub</a>. You would need to change the pin in pin_defs.h and make the bootloader. Then flash it to the 328p with a programmer over ICSP.</p>

<p>Details what to change are in <a href="https://arduino.stackexchange.com/questions/55279/how-do-i-change-the-default-led-pin-for-displaying-uploading#answer-55282">Greenonline's answer</a>.</p>
