Go to advanced search

by mrvn
Sat Feb 14, 2015 12:23 pm
Forum: C/C++
Topic: Compiling for Raspberry Pi 2
Replies: 25
Views: 46225

Re: Compiling for Raspberry Pi 2

Under Debian (jessie/sid) one can use the gcc-arm-none-eabi cross compiler package. That gcc is compiled with a number of libgcc flavour for different cpu cores. One has to pick the right flags to get the optimized libgcc for the RPi2 and to optimize the source itself. /usr/share/doc/gcc-arm-none-ea...
by mrvn
Sat Feb 14, 2015 11:35 am
Forum: Bare metal, Assembly language
Topic: Confused by the Device Tree (shipped with raspian)
Replies: 4
Views: 4845

Re: Confused by the Device Tree (shipped with raspian)

Those are the bus addresses as referenced in the BCM2835 data book. There must be another entry somewhere in the device tree that contains the mapping. You are both right and wrong. ranges = <0x7e000000 0x00000004 0x00000004>; Means, as far as I figured out now, that the device is at bus address 0x...
by mrvn
Fri Feb 13, 2015 8:36 pm
Forum: Bare metal, Assembly language
Topic: Confused by the Device Tree (shipped with raspian)
Replies: 4
Views: 4845

Confused by the Device Tree (shipped with raspian)

Hi, I've got the LED blinking and the UART saying hello on my RPi 2 so I'm all set to do more bare metal work. But before I continue I wanted to do things right and support both the RPi and RPi 2. But I've run into a bunch of problems: At boot R1 should contain an unique device ID. For the RPi this ...
by mrvn
Fri Feb 13, 2015 10:09 am
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 31383

Re: BCM 2836 and the RPi 2 ?

This thread is realy depressing. Pretty much right from the start you figured out that the BCM 2836 is pretty much like the old BCM2835 except at a new base address. And while the complex code to figure out the address from the device tree is nice the one thing nobody seem to have mentioned is THE N...
by mrvn
Mon Jun 16, 2014 10:28 pm
Forum: General discussion
Topic: Use initramfs?
Replies: 58
Views: 45960

Re: Use initramfs?

Never mind the bss problem. that is at my end.

But multiple ramdisks would still be nice.
by mrvn
Thu May 29, 2014 3:45 pm
Forum: General discussion
Topic: Use initramfs?
Replies: 58
Views: 45960

Initramfs overlaps kernel

There still seems to be a problem with loading the initramfs. The loader seems to ignore the BSS section and places the initramfs 8 MiB after the end of the text segment: Sections: Idx Name Size VMA LMA File off Algn 0 .text 00001364 80008000 00008000 00008000 2**2 CONTENTS, ALLOC, LOAD, READONLY, C...
by mrvn
Sun Feb 24, 2013 3:10 pm
Forum: Bare metal, Assembly language
Topic: About constructors on arm-eabi-gcc (c / c++)
Replies: 1
Views: 2370

Re: About constructors on arm-eabi-gcc (c / c++)

Update: In the linker script one can use:

Code: Select all

.init_array : ALIGN(4) {
    _init_array_start = .;
        *(.init_array)
        *(SORT_BY_INIT_PRIORITY(.init_array.*))
    _init_array_end = .;
}
by mrvn
Sun Feb 24, 2013 9:33 am
Forum: Bare metal, Assembly language
Topic: About constructors on arm-eabi-gcc (c / c++)
Replies: 1
Views: 2370

About constructors on arm-eabi-gcc (c / c++)

I've recently discussed the background workings of constructors in gcc on irc and looked into details how it works on arm eabi gcc-4.7. First some examples what this is about: void bazz(void) __attribute__((constructor(102))); void bazz(void) { ... } int foo(void) { return 1; } int x = foo(); class ...
by mrvn
Sun Feb 24, 2013 8:22 am
Forum: Bare metal, Assembly language
Topic: Std libs with arm-eabi-gcc
Replies: 21
Views: 9286

Re: Std libs with arm-eabi-gcc

Hi, following the advice from dwelch67 ( https://github.com/dwelch67/raspberrypi ) saying not to use standard libs, i made the fuction for myself as strcat(), strlen(), pwr(), when i needed them. but I really want to use the standard libs, to have less work like this to do. And he is right, that is...
by mrvn
Sat Feb 23, 2013 10:48 am
Forum: Bare metal, Assembly language
Topic: PL011 UART & interrupts problem
Replies: 12
Views: 5377

Re: PL011 UART & interrupts problem

ARRGGGSSS Mystery solved. I just noticed that I had a typo in the address for my IRQ registers. So they didn't do anything usefull on write and didn't show anything usefull on read. So here is some debug output with correct addresses: After boot and some UART output: IRQ basic enable : 0x000000ff I...
by mrvn
Thu Feb 21, 2013 11:38 am
Forum: Bare metal, Assembly language
Topic: Detection 256 or 512 Mb RPI
Replies: 9
Views: 2638

Re: Detection 256 or 512 Mb RPI

The RPi follows the ARM linux boot protocol. Which means that on start the registers contain the following: R0 = 0 R1 = RPi magic R2 = address of ATAGs The ATAGs (google for it) contain a block for the memory size and one for the boot command line, which also includes information on the memory size....
by mrvn
Thu Feb 21, 2013 11:07 am
Forum: Bare metal, Assembly language
Topic: Scrolling Text
Replies: 15
Views: 4689

Re: Scrolling Text

Hi, I'm wondering what ideas you have for scrolling text. This is what I'm currently doing: When the cursor reaches the end of the screen (or when a new line moves off the screen, etc), I have a function called 'linewrap()' which copies each line of text to the previous line (overwriting the previo...
by mrvn
Mon Feb 18, 2013 5:06 pm
Forum: Bare metal, Assembly language
Topic: kernel.img placement in memory (not being placed at 0x0)
Replies: 5
Views: 1746

Re: kernel.img placement in memory (not being placed at 0x0)

@mvrn: Yes using the base pointer is more flexable, though also more limiting. If you end up working on system with an older ARM it may not support this. For this reason I would recomend copying your table down to 0x00 or using kernel_old=1 , this gives more flexability as to the target. Of cource ...
by mrvn
Mon Feb 18, 2013 8:30 am
Forum: Bare metal, Assembly language
Topic: PL011 UART & interrupts problem
Replies: 12
Views: 5377

Re: PL011 UART & interrupts problem

jojopi wrote:
mrvn wrote:Small add on: It looks like Linux uses the mini UART but mapped to the same pins (alt5 instead of alt0)
I am not seeing that on any of my Linux Pi. GPIO14,15 are set to FSEL 100₂, which is ALT0.
Can you see what interrupt it uses?
by mrvn
Mon Feb 18, 2013 8:28 am
Forum: Bare metal, Assembly language
Topic: kernel.img placement in memory (not being placed at 0x0)
Replies: 5
Views: 1746

Re: kernel.img placement in memory (not being placed at 0x0)

As you discovered the kernel is loaded at 0x8000 because before that the bootloader (on the GPU) places configuration information. You do want those because they tell you about the amount of memory you have (minus whatever the gpu is configured to use) and the command line. Also tells you about an i...
by mrvn
Sun Feb 17, 2013 10:43 pm
Forum: Bare metal, Assembly language
Topic: PL011 UART & interrupts problem
Replies: 12
Views: 5377

Re: PL011 UART & interrupts problem

Small add on: It looks like Linux uses the mini UART but mapped to the same pins (alt5 instead of alt0)
by mrvn
Sun Feb 17, 2013 7:10 pm
Forum: Bare metal, Assembly language
Topic: PL011 UART & interrupts problem
Replies: 12
Views: 5377

PL011 UART & interrupts problem

Hi, I'm having problems getting the interrupts for the PL011 UART configured (Chapter 13 of the BCM2835 ARM Peripherals manual). That is the one with registers at 0x20201000. Where Linux prints boot messages and runs a getty. I have the UART properly initialized and working in polling mode. So I kno...
by mrvn
Wed Feb 06, 2013 9:44 am
Forum: General discussion
Topic: Raspberry Pi logo license question
Replies: 1
Views: 598

Raspberry Pi logo license question

Hi, I'm working on a baremetal tutorial for the Raspberry Pi. For the part on video output I would like to display something on the framebuffer. And what would be better than a raspberry? So I'm wondering: What is the license is on the Raspberry Pi logo? Or is there an open use logo like Debian has ...
by mrvn
Wed Feb 06, 2013 9:31 am
Forum: General discussion
Topic: RaspBerry Pi(e) Model C (imaginations & wants)
Replies: 431
Views: 155882

Re: RaspBerry Pi(e) Model C (imaginations & wants)

There is one thing that should be realy cheap, have no additional power draw and that I'm realy starting to miss while doing baremetal work:

A reset button.

A on/off button would be nice too.

MfG,
Mrvn
by mrvn
Thu Jan 24, 2013 9:22 pm
Forum: Bare metal, Assembly language
Topic: Floating point in bare metal code
Replies: 11
Views: 6572

Re: Floating point in bare metal code

Exactly :) BUT .. i would suggest: - this is a Co Processor. add a flag into your task structure "bool fpu". The task has to get the resource FPU, set it to true, and only if you see a task with true, take the 32 registers (16 double/32 single) with you. How do you prevent from using the fpu withou...
by mrvn
Mon Jan 21, 2013 7:01 pm
Forum: Bare metal, Assembly language
Topic: Implementing a USB Driver
Replies: 86
Views: 21568

Re: Implementing a USB Driver

You know what's missing from this thread?

An url for the latest driver (from Gordon who has the specs).

Mrvn
by mrvn
Mon Jan 21, 2013 1:38 pm
Forum: General discussion
Topic: Pi as main computer?
Replies: 83
Views: 15843

Re: Pi as main computer?

I connected the Raspberry USB out to the monitors USB3 in, monitors USB3 out to the Raspberry power input, HDMI to the monitor, combined keyboard/mouse bluetooth adaptor (monitors USB3) and added a wireless adaptor. So alltogether just 3 cables between Raspberry and monitor. To tidy up I used some c...
by mrvn
Mon Jan 21, 2013 12:54 pm
Forum: Bare metal, Assembly language
Topic: Fonts - post your fonts here
Replies: 6
Views: 2517

Re: Fonts - post your fonts here

Mullard SAA5050 teletext character set. 5x9 characters in a 6x10 matrix. It's probably copyrighted to somebody, but it's been thoroughly copied over the years. http://www-uxsup.csx.cam.ac.uk/~bjh21/BBCdata/SAA5050.pdf A copyright violations is maybe not the best way to start your own baremetal OS. ...
by mrvn
Mon Jan 21, 2013 12:44 pm
Forum: Bare metal, Assembly language
Topic: Fonts - post your fonts here
Replies: 6
Views: 2517

Re: Fonts - post your fonts here

tufty wrote:You'll need to rasterise it offline, obviously, as it's a truetype font.
The homepage says the font has embedded bitmaps for sizes 10, 11, 12 and 13. Any tips on how to extract those in a easy to use format?
by mrvn
Sun Jan 20, 2013 6:21 pm
Forum: Bare metal, Assembly language
Topic: Fonts - post your fonts here
Replies: 6
Views: 2517

Fonts - post your fonts here

Hi, like many I've mastered activating the UART, sayed my first "Hello World". After that my eyes turned to the framebuffer. After struggling through understanding the mailbox protocol and talking to the GPU I'm left with a nice big empty screen and nothing to put on it. I want to paint a nice "Hell...

Go to advanced search