19

Depends on how much assembler you want to write. If you want to write only small snippets embedded in C code, than gcc is indeed what you are looking for. Examples of how to use the asm directive in C see inline asm reference at: ARM GCC Inline Assembler Cookbook If on the other hand you want to write more than just small snippets than you'll be better of ...


8

Here is a 12 part course about writing an OS for the Raspberry Pi from scratch. Part 6 is about graphics. I did not see OpenGL described there, but the examples talk about drawing pixels, then lines, and then text. The first lessons describe how to get the Raspberry to load and run your code.


4

I started my adventure with ARM assembly code not too long ago myself and here are my resources: Cambridge University published a very decent set of tutorials here: Baking Pi. It includes a template for your own OS, complete code examples for every tutorial and all instructions on how to build and run your code. Additionally, this hefty book should cover ...


3

I'm not solving all your problems, but you can use GPIO to activate LEDs and recieve input from buttons. There is a good video about using GPIO here, and a google search should help. You could try getting a breadboard here (very cheap!), or again, google will do no end of good. I actually have these two LED kits, which are nice for their variation of ...


3

Although I am quite comfortable with command line interface, I could not resist the convenience of GUI. A while ago, I discovered that I could use CodeBlocks IDE to develop ARM assembly language programs in a Raspberry Pi. So I wrote a tutorial and appended it to the Raspberry Pi assembly programming tutorial I wrote for the Mazidi ARM Assembly book website: ...


3

I looked into this, the ARM has 'ldrex and 'strex' instructions, the strex will return a fail result if exclusivity is lost (or may have been lost) since the ldrex, which includes a context switch (or another processor modifying the same register in a multi-processor environment). So it can be done using that; if the strex fails you loop up, and re-do the ...


3

Since you are using a cross binutils, try arm-xxx-xxx-objdump -D --target binary -marm With the actual name of your appopriate cross objdump. You may also need to play with -mthumb depending on what instruction set you have targeted - during execution arm and thumb mode can be distinguished, but it's not always possible to tell when just looking at ...


3

You need to tell gcc the architecture when just assembling like this. So gcc -march=native -o test test.s tells it to assemble for your native architecture (arm on a RPi). This will yield link errors about multiple definitions of _start and crt1.o. Gcc expects to link in the C runtime which actually provides _start normally and that then calls main. You can ...


1

It appears that FASMARM is a cross-compiler to ARM (from x86), i.e. it allows a fasm installation on an x86 machine to compile to ARM machine code. While FASMARM can compile to ARM machine code, it doesn't allow fasm itself to run on ARM. Since fasm is written in Assembly, this makes porting it or compiling it for ARM challenging. I would not expect there ...


1

Learn with runnable examples I am working on: https://github.com/cirosantilli/arm-assembly-cheat Features: the exact same assembly can be run on a Linux host with QEMU user mode, so you can try stuff out faster on your host before going native on the Pi covers both ARMv7 and ARMv8 good GDB setup out of the box, both on host and native has asserts that ...


1

GCC is installed by default. If you're this new to Raspberry Pi I recommend you look at an easier programming language than ARM assembly. There aren't any IDEs for assembly so you'll have to use a text editor and assemble it through terminal. I recommend Gedit for ease of use. Though to get syntax highlighting for assembly I had to go to github, ...


Only top voted, non community-wiki answers of a minimum length are eligible