I have recently bought a Raspberry Pi 2 for my term project but I have no experience at all. So far, I had been looking for tutorials but I am not sure they are talking about what I want to do (they connect Raspberry Pi to a screen and install an operating system to it, I think. I'm not sure that is a must or if they just want to use it like a computer, that's why I didn't want to blindly follow anything and Im explicitly asking it now).
I want to know how to program it from scratch. I have Windows and I also can run Ubuntu on virtual box. What do I do to, say, make a LED blink on a particular pin, while avoiding functions that I will not use (like installing an operating system if it is not good for my goal)?
Lets make the question as specific as possible:
How do I blink a LED using Windows or Ubuntu assuming my Raspberry Pi is new? (it has no setup, if it needs any)
Do I just write a python code and save it something like
main.py and upload it to a SD card? How does it recognize which code to run? How does this work?