This is true of any processor. If you had the inclination and the proper hardware to facilitate loading the machine instructions, you could program the processor in your computer the same way.
The raspberry pi is a much more complex machine than the arduino. 32 bit instructions vs 8 bit, 700MHz vs 20MHz clock frequency, GPU vs no GPU, 512MB memory vs less than 1MB. There is so much going on in the pi's chip, that a thorough technical reference manual could easily exceed 5000 pages, where as everything you need to know about the arduino's processor will fit in less than 500.
You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial.
> The raspberry pi is a much more complex machine than the arduino. 32 bit instructions vs 8 bit, 700MHz vs 20MHz clock frequency, GPU vs no GPU, 512MB memory vs less than 1MB
I have no arduino experience and am happy to be educated, but I don't see how any of those things makes the pi harder to program. Maybe the instruction set's harder, but that only matters if you're writing asm. There's more stuff you can do, but that doesn't get in the way if you just want to code arduino-like stuff.
> You certainly can make LEDs blink with a raspberry pi with your own non-OS code, but the difference in the amount of code required vs doing it in an arduino is pretty substantial.
Here is some baremetal code that blinks LEDs on a pi:
It's not that bad, really. Admittedly some of the peripherals are much harder work than that. I should add that I have nothing against the Arduino, but as a n00b to baremetal / embedded style programming I'm not finding the pi particularly gruelling. Maybe I just don't know what I'm missing.
I haven't actually worked with the raspberry pi, but I'm currently working with a similar processor, a Texas Instruments ARM Cortex A8 that runs at 720MHz. On my processor, you have to set up the PLL to take the 24MHz external oscillator to 720MHz, configure several clocks for peripherals, set up the MMU with a huge table of memory addresses and their cache settings, configure the GPIO bank, Select the proper multiplexed setting for the actual pin that the signal is output to, etc. This is all in C as well.
Are you saying that the code you linked is loaded with some sort of JTAG device, and is the entirety of the code running on the chip, or is it run from the command line?
Maybe Texas Instruments are just a bunch of sadists.
> Are you saying that the code you linked is loaded with some sort of JTAG device, and is the entirety of the code running on the chip, or is it run from the command line?
That's all the code you need to write. You also need a firmware binary supplied by the raspberry pi people. You write your binary and the firmware binary to an SD card, and the pi boots and runs your code via some process that is frankly opaque to me. Alternatively you can stick a bootloader on the card and transfer your binary via an ftdi cable, which is a lot less hassle while developing. All this is detailed in the repo I linked if you're interested.
Using the onboard peripherals is admittedly fairly challenging, largely due to the paucity of documentation available. Hopefully more documentation and examples will emerge as more of us tinker with it.
I'm not yet in a position to compare and contrast to TI's stuff, but I have a Stellaris Launchpad I intend to start playing with soon. Will be interesting to see how it compares.
There's nothing to stop you programming the pi bare metal style like an arduino. It's not as well documented but it's perfectly doable and quite fun.
https://github.com/dwelch67/raspberrypi
http://www.raspberrypi.org/phpBB3/viewforum.php?f=72