5
votes
Accepted
How do I read the cpuid in aarch64 asm?
On aarch64 the cpuid can be read using
__asm__("mrs %0, MIDR_EL1" : "=r"(arm_cpuid));
4
votes
Accepted
How can I run 32-bit compiled assembly code on Rasberry PI 4 B, if possible at all?
First of all to clear up ambiguities:
Aarch32/Aarch64: These are two main Instruction Set Architectures for ARM (Advanced RISC Machine) architecture processors.
Armv7-A/Armv8-A: These are the most ...
3
votes
Accepted
BCM2835 GPIO Pins vs. Physical Pin Numbers
After doing a bit of research, as well as testing things out, I discovered that I was misinterpreting what I was hearing about physical pin numbers. The GPIO Pin numbers listed in official pinouts as ...
3
votes
OS-less raspberry pi 2 debugging of Assembly language
I would recommend taking a look at this site http://www.makeuseof.com/tag/emulate-raspberry-pi-pc/ which describes how to emulate the original raspberry pi on a pc. You then should be able to debug ...
3
votes
Accepted
bootcode.bin RPi 3
This and the other resources in the Bare metal, Assembly forum are a great start.
3
votes
gcc does not compile code that compiles in 'as'
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 ...
2
votes
How can I run 32-bit compiled assembly code on Rasberry PI 4 B, if possible at all?
You can always run 32 bit programs/operating systems on a 64 bit architecture. That is downstream compatible. You cannot run 64 bit programs on a 32 bit architecture, of course. So it is no problem to ...
2
votes
Accepted
Is there a program to execute assembly code and check registers?
You may be able to do what you want with the debugger gdb.
Compile and link a small test program.
q.c
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
for (i=0; i<10; i++...
2
votes
BCM2835 datasheet addressing system
If you look at Section 1.2.3 of the same BCM2835 Peripherals Doc, it will tell you all about it.
2
votes
Accepted
Which raspberry pi nowadays is compatible with 32bit ARMv7 assembly code?
I'm not an assembly programmer, but the only model with a 32-bit ARMv7 core is the Pi 2. Unfortunately right now they are going to be hard to find and expensive (eg., while there are none on that ...
1
vote
Bare metal LED access on RPi 4
The other answers claiming that the ACT_LED on the pi4 is not connect to the gpio is wrong. However, this was true on a previous version of the pi. One of the 3 series boards. (likely the source of ...
1
vote
How can I run 32-bit compiled assembly code on Rasberry PI 4 B, if possible at all?
do you say that it does not matter if the the processor is 32 or 64 bit because if I have a 32-bit OS running on it, 32 bit programs will run just fine on it?
Yes; this is also true for x86-64: You ...
1
vote
Radio Transmission
You need to check your country's laws regarding wireless transmission systems. You need to make sure that you're not exceeding any limits in terms of, for example, power transmission, and that you are ...
1
vote
Read/Write GPIO
Ok found the solution. There were some coding issues.
This code is working now:
.section .init
.globl _start
_start:
@ Base adress for gpio controller
ldr r0, =0x20200000
@ Set GPIO 24 as ...
1
vote
Accepted
Why does adding a nop or constant break my code?
The solution lies in the config.txt.
After reading many forums and the RPi site, there is a config option called disable_commandline_tags.
If it is not set or is set to 0 in config.txt, ATAGS is ...
1
vote
Write an OS for Raspberry Pi in C
s-matyukevich/raspberry-pi-os
https://github.com/s-matyukevich/raspberry-pi-os
This awesome repo does both the C bootstraping, and goes into pretty complex topics.
Furthermore, it looks into how ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
assembly × 36arm × 10
bare-metal × 10
gpio × 8
pi-2 × 3
c × 3
operating-systems × 3
pi-4 × 2
led × 2
raspbian × 1
pi-3 × 1
boot × 1
linux × 1
kernel × 1
remote × 1
windows-iot × 1
cpu × 1
modules × 1
radio × 1
64-bit × 1
gcc × 1
debug × 1
virtualization × 1
encryption × 1
board-leds × 1