Go to advanced search

by dpotop
Wed Jun 17, 2015 9:49 pm
Forum: Bare metal, Assembly language
Topic: Camera capture in bare metal?
Replies: 1
Views: 682

Camera capture in bare metal?

Hello everybody, I was wondering if someone has managed to read images from the camera in bare metal. I searched the forums for 2 days and only found pages saying it's quasi-impossible (because the binary driver expects a complex execution environment, including pthreads). So, if you know something,...
by dpotop
Mon Feb 23, 2015 2:26 pm
Forum: Bare metal, Assembly language
Topic: System timer: black magic by dwelch
Replies: 2
Views: 1071

Re: System timer: black magic by dwelch

Thanks barda.
Dumitru
by dpotop
Mon Feb 23, 2015 7:44 am
Forum: Bare metal, Assembly language
Topic: Register Access
Replies: 4
Views: 1207

Re: Register Access

If you are going to use "normal" memory accesses instead of read/write functions you are going to have to be very careful when activating your caches.
by dpotop
Tue Feb 17, 2015 5:32 pm
Forum: Bare metal, Assembly language
Topic: How do I use interrupts
Replies: 6
Views: 1488

Re: How do I use interrupts

Have you tried the valvers tutorial ? It's the one I started with in building my OS, and I seem to remember it went to using timer IRQs to trigger code. Pretty neat. The first one is here, and you have to navigate to the last ones, where they use timers. http://www.valvers.com/open-software/raspberr...
by dpotop
Tue Feb 17, 2015 4:38 pm
Forum: Bare metal, Assembly language
Topic: System timer: black magic by dwelch
Replies: 2
Views: 1071

System timer: black magic by dwelch

Hello, I'm moving from the arm timer to the system timer (for precision purposes). I did manage to make it work by mimicking this example from dwelch: https://github.com/dwelch67/raspberrypi/tree/master/blinker07 However, I don't fully understand what I'm doing (and he'd doing), maybe you can help. ...
by dpotop
Tue Feb 17, 2015 4:34 pm
Forum: Bare metal, Assembly language
Topic: System Frequency and MMU
Replies: 4
Views: 984

Re: System Frequency and MMU

Hello,

The MMU does work in bare metal.
You just have to initialize it. Take a look here:

http://stackoverflow.com/questions/3439 ... en-physica

Dumitru
by dpotop
Thu Feb 12, 2015 5:30 pm
Forum: Bare metal, Assembly language
Topic: Ethernet, DMA, FIQ
Replies: 1
Views: 726

Ethernet, DMA, FIQ

Helo everybody, I'm thinking about adding Ethernet support to my nice mini-OS (which now has hierarchic scheduling and memory protection). I was hoping you can answer two questions which can help me understand how to start: 1. Do I need to use DMA in order to have efficient Ethernet? 2. Should I put...
by dpotop
Fri Feb 06, 2015 8:19 pm
Forum: Bare metal, Assembly language
Topic: Trying Bare Metal on Raspberry Pi 2
Replies: 98
Views: 35460

Re: Trying Bare Metal on Raspberry Pi 2

Ok, so if **all** other peripherals function in the same way,
the "cortex a programmer manual" and "cortex a7 TRM"
should be enough to do bare metal. Cool!

Still, your question 4 (on the peripherals that overlap with
RAM) remains unanswered.

Dumitru
by dpotop
Fri Feb 06, 2015 2:39 pm
Forum: Bare metal, Assembly language
Topic: Trying Bare Metal on Raspberry Pi 2
Replies: 98
Views: 35460

Re: Trying Bare Metal on Raspberry Pi 2

Thanks krom for your example. It seems that your code is single-core.
Can one make the assumption that only core 0 is active when the RPi
starts executing kernel.img?

Yours,
Dumitru
by dpotop
Thu Feb 05, 2015 1:54 pm
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30348

Re: BCM 2836 and the RPi 2 ?

... Bare metal - your choice! ... urm... this is a 'bare-metal' forum though... so I guess I am not entirely alone... No, you're not alone. To add my thoughts about this: I want to use the RPis for education in order to teach real-time systems, and I **do** need bare metal programming to port a nic...
by dpotop
Tue Feb 03, 2015 7:55 am
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30348

BCM 2836 and the RPi 2 ?

Hello guys, I think you are all excited by the new Raspberry Pi 2. However, with new hardware comes the need for new documentation. Do you happen to know where the peripheral guide of the new BCM 2836 can be found ? It may be quite similar to the BCM 2835, but I'd say that at least the interrupt con...
by dpotop
Wed Jan 14, 2015 7:59 pm
Forum: Bare metal, Assembly language
Topic: MMU and multitasking
Replies: 5
Views: 1821

Re: MMU and multitasking

Thanks rst !
Now it makes sense.
Dumitru
by dpotop
Mon Jan 12, 2015 8:12 pm
Forum: Bare metal, Assembly language
Topic: MMU and multitasking
Replies: 5
Views: 1821

Re: MMU and multitasking

n my hobby OS, each task has memory allocated with only user access. Access to kernel memory only happens through software interrupts (SWI) which switch into kernel mode, then back to user mode when they finish. Each user task has its own virtual address space starting at 0, so one task cannot acce...
by dpotop
Sun Jan 11, 2015 7:44 pm
Forum: Bare metal, Assembly language
Topic: MMU and multitasking
Replies: 5
Views: 1821

Re: MMU and multitasking

Ok, I think I have found a solution, but I really don't like
it because I have to let tasks have read-only access to
one page of non-task code. I will start my implementation,
but let me know if you already have some other solution.

Cheers,
Dumitru
by dpotop
Sun Jan 11, 2015 1:10 am
Forum: Bare metal, Assembly language
Topic: MMU and multitasking
Replies: 5
Views: 1821

MMU and multitasking

Hello again, My RPi mini-kernel is now up and running, with time-sharing multithreading (very simple), with programs loaded from the SD card, and I now have the MMU and caches working. And of course the nice UART console. :) I want to thank you all for the information you posted here and elsewhere, ...
by dpotop
Fri Jan 09, 2015 7:19 am
Forum: Bare metal, Assembly language
Topic: gcc bug or me not understanding ARM EABI ?
Replies: 3
Views: 1300

Re: gcc bug or me not understanding ARM EABI ?

Thanks a lot, guys. :)
Not only I understand, but the code is simpler.
Dumitru
by dpotop
Thu Jan 08, 2015 9:55 pm
Forum: Bare metal, Assembly language
Topic: gcc bug or me not understanding ARM EABI ?
Replies: 3
Views: 1300

gcc bug or me not understanding ARM EABI ?

Hello, I have implemented the following functions: __aeabi_uidivmod __aeabi_uidiv __aeabi_idivmod __aeabi_idiv They work perfectly if I'm not optimizing the code (-O0). When compiling with -O2 the results are not correct if the arguments are expressions over constants. For instance, the following ca...
by dpotop
Thu Dec 18, 2014 7:22 pm
Forum: Bare metal, Assembly language
Topic: Which mmio_read/write is better ?
Replies: 3
Views: 972

Re: Which mmio_read/write is better ?

Hello dwelch, I did read the ARM doc, and the gcc doc, and I'm asking because I'm really have an understanding problem. As I understand it, a memory barrier has 2 functions: - prevent the compiler from performing certain optimizations - prevent the hardware from reordering some operations due to pip...
by dpotop
Thu Dec 18, 2014 11:18 am
Forum: Bare metal, Assembly language
Topic: Which mmio_read/write is better ?
Replies: 3
Views: 972

Which mmio_read/write is better ?

Hello again, While browsing various pieces of RPi code I have found several implementations of memory_barrier, mmio_read, and mmio_write, and I'm having difficulties comparing them. From the GCC documentation, the simplest way of doing a memory barrier is: asm volatile ("" : : : "memory"); and then,...
by dpotop
Mon Dec 15, 2014 7:25 pm
Forum: Bare metal, Assembly language
Topic: Mailbox buffer address: weird behavior
Replies: 3
Views: 1063

Re: Mailbox buffer address: weird behavior

Ok, I did some more experiments, I contribute them to the community. It appears that indeed on my RPi B+ the out-of-the box configuration without MMU activation allows the ARM to see all bus addresses, with the mapping provided in the BCM... document. Furthermore, the behavior I told you about, conc...
by dpotop
Mon Dec 15, 2014 8:28 am
Forum: Bare metal, Assembly language
Topic: Mailbox buffer address: weird behavior
Replies: 3
Views: 1063

Re: Mailbox buffer address: weird behavior

Hello rpdom, Yes, this was my understanding of the thing. I'm now reading stuff on the memory model of the RPi (mainly from the 2835-ARM-Peripherals.pdf document) and what I seem to understand is even more puzzling. It seems that rpi-boot is using Bus addresses (cf. page 5 of the document I mentione...
by dpotop
Sun Dec 14, 2014 10:25 pm
Forum: Bare metal, Assembly language
Topic: Mailbox buffer address: weird behavior
Replies: 3
Views: 1063

Mailbox buffer address: weird behavior

Hello, I'm struggling with a weird problem related to mailboxes and memory allocation. I work on a B+ and I am doing some bare metal programming. I started playing with the mailboxes in order to configure the SD card acces. I'm actualy trying to mimick what rpi boot (by jcronin) is doing, and I try ...
by dpotop
Thu Nov 27, 2014 7:33 pm
Forum: Bare metal, Assembly language
Topic: Introducing USPi - A bare metal USB driver written in C
Replies: 73
Views: 21659

Re: Introducing USPi - A bare metal USB driver written in C

Ok, I understand, thank you.
My interest is in directly using Ethernet. I guess 100Hz will be enough if the frequence of
sending frames is small enough. Then, I'll just have to test in order to find the good frequency for the throughput I need.
It's good to know that it was tested.

Yours,
Dumitru
by dpotop
Thu Nov 27, 2014 5:06 pm
Forum: Bare metal, Assembly language
Topic: Which ROM device is the simplest to write?
Replies: 3
Views: 917

Re: Which ROM device is the simplest to write?

Take a look here for the SD card part (one of the comments provides a link towards a simple SD card driver).
http://www.raspberrypi.org/forums/viewt ... 72&t=56361

Of course, you will have to add a FAT driver.

Dumitru
by dpotop
Thu Nov 27, 2014 4:28 pm
Forum: Bare metal, Assembly language
Topic: Introducing USPi - A bare metal USB driver written in C
Replies: 73
Views: 21659

Re: Introducing USPi - A bare metal USB driver written in C

[ Second: I have a question: While reading uspios.h I saw that you require a 100Hz timer. Is this enough to handle Ethernet ? This definition can be changed. In fact the timer resolution is set by the environment not by USPi. If your timer runs at 1000Hz you have to set HZ to 1000. USPi needs this v...

Go to advanced search