Arduino IDE not compile .S program to board
There's four things I can see wrong (one of which is my fault, actually - I should have mentioned it in the previous question - nevermind).

Firstly you cannot include a .S file in a .INO file. A .S file is assembly, a .INO file is C++. You can't mix the two in one file (and including a file does just that - includes the file verbatim at that point). So remove that #include. Otherwise it would be like opening a book written in English only to find the preface is written in Klingon.

Secondly you need to give your function a name. It doesn't have one at the moment. Naming the file is not naming the function.

So you need to provide a label at the entry point:

  .section .text

blink:    ; &lt;&lt; This is the name of the function
  ldi r18, 0x20   ; loading 0x20 = 00100000 into register r18
  out DDRB, r18   ; making pin 5 of port B an output


Third you need to export that name as a global symbol:

  .section .text
  .global blink ; &lt;&lt; This exports the function name

blink:    ; &lt;&lt; This is the name of the function
  ldi r18, 0x20   ; loading 0x20 = 00100000 into register r18
  out DDRB, r18   ; making pin 5 of port B an output


And finally you have the problem of linkage name munging.  You're linking a C++ file with (ostensibly) a C file - and C++ munges names. So you have to tell your C++ file that the function is not a C++ function, but a C function (which is what I should have mentioned previously):

extern "C" void blink(); // &lt;&lt; Add the "C" to tell it not to munge the name

void setup() {
  // put your setup code here, to run once:
  blink();
}

void loop() {
  // put your main code here, to run repeatedly:
}