Go to advanced search

by leiradel
Fri Feb 15, 2019 5:44 pm
Forum: Bare metal, Assembly language
Topic: RPi ARM boot problem
Replies: 7
Views: 1166

Re: RPi ARM boot problem

(default in 0x8000, this is bus address right? is the total 1GB SDRAM sit from 0x0 to 0x40000000 and kernel.img in 0x8000?) This is ARM physical address. But how the ARM knows where is the code in SDRAM, I mean after reset ARM should start load code from physical address 0x0 and how it jump to 0x80...
by leiradel
Fri Feb 15, 2019 4:01 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Re: Mini UART eats some characters

It seems they were timing-related. Yes, I also had trouble with timing, first because I decided to printf-debug the issues by sending message over to the PC via the UART :oops:, and then because I started to log message to a framebuffer, but scrolling it was making the code lose some characters in ...
by leiradel
Fri Feb 15, 2019 3:55 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Re: Mini UART eats some characters

The only part you got wrong was missing out the roll of the bootstubs Isn't it described here? 7. start.elf writes some ARM bootstrap code to RAM that will be executed before jumping to the kernel 8. start.elf loads kernel.img to address 0x8000 and releases the ARM CPU to execute the bootstrap code...
by leiradel
Thu Feb 14, 2019 10:10 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Re: Mini UART eats some characters

Let me offer you an alternative for the uart_canwrite function .. volatile unlike const does protect you from the optimizer. My understanding of volatile is that it makes the compiler read the value from memory every time it's needed, preventing it from being cached in a register, and this seems to...
by leiradel
Thu Feb 14, 2019 9:53 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Re: Mini UART eats some characters

So yeah, while trying to measure the system I've changed its state :oops:

I've added a framebuffer and was able to debug my IHEX parser until it worked. Well, kind of. I'm getting an undefined instruction exception trying to execute the downloaded file, but that's another issue.
by leiradel
Thu Feb 14, 2019 1:08 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Re: Mini UART eats some characters

I've rubber ducked the issue with a friend during lunch and I see that I'm missing characters because I'm writing characters to the UART in busy loops to log everything that is happening :oops: I'll log the messages to a memory buffer and dump its contents to the UART after the IHEX is read, or mayb...
by leiradel
Wed Feb 13, 2019 10:57 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1136

Mini UART eats some characters

Hello, I'm studying bare metal programming in the RPi, and now I'm trying to upload code via the UART to avoid constantly removing and inserting the memory card in order to copy the program. I've tested the Mini UART at 115200 transmitting from the RPi to Linux running minicom, and everything worked...

Go to advanced search