OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:09 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: kernel.img from hello world tutorial
PostPosted: Fri Jul 04, 2014 6:42 pm 
Offline

Joined: Thu Jul 03, 2014 5:40 pm
Posts: 5
Hello all. Happy 4th of july :)


I have been trying out the tutorial that was provided for bare metal programming : [url]wiki.osdev.org/ARM_RaspberryPi_Tutorial_Cwiki.osdev.org/ARM_RaspberryPi_Tutorial_C.[/url]

When I make the files im getting errors on the flags that are in the make file. I tried compiling individually.I put all the functions of uart.c in main.c and compiled and linked the source files individually.But the kernel.img doesnt seem to work.Im getting only a rainbow screen when i boot up the rpi


Has anyone tried this tutorial and got the output. Can you please help me with it. Thanks. I appreciate it


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Fri Jul 04, 2014 7:41 pm 
Offline
Member
Member
User avatar

Joined: Fri Jul 16, 2010 2:16 pm
Posts: 117
Location: California
Excuse the rudeness, but you obviously did not read what a UART even is.
It is a serial device, not an output to the monitor. In other words it sends characters over serial, but does not send them to the monitor (there is no text mode like in x86 programming). To do that you need to learn about mailboxes and write a graphic terminal driver.
The rainbow screen is the expected output, as it's what the GPU is displaying by default. To get serial (UART) output from your Raspberry Pi, buy a GPIO to USB serial device and google how to connect it.

As for the flags causing errors, I can diagnose your problem: you haven't given me any information. You've given me your PC and then said "It's broken, fix it, bye" then left, leaving no explanation on what the problem is. Except in this case I can't look inside your PC as you are over the internet.

What compiler are you using, and what is the error?
I would also recommend you google "How to ask smart Questions" and read said document.

_________________
Cedille - Toy kernel


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Sat Jul 05, 2014 9:17 am 
Offline

Joined: Thu Jul 03, 2014 5:40 pm
Posts: 5
I am extremely sorry for being so blank. I completely understand your rudeness. Im from a different background and new to the field. I took this out of my own interest. And I should have known more about sending the characters to the screen through uart. Im sorry.


And I get the following errors when i make the files:


arm-none-eabi-gcc: fomit-frame-pointer: No such file or directory
cc1: error: unrecognized command line option "-Wno-unused-but-set-parameter"
cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"
cc1: error: unrecognized command line option "-Wno-unused-result"
cc1: error: include: No such file or directory
make: *** [main.o] Error 1

I use the GNU toolchain given in the cambridge tutorial at http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/downloads.html
Thanks


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Sat Jul 05, 2014 10:11 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
I'm afraid that you are blindly following a tutorial without really understanding what you are doing or the tools that you are using. This means that when you come across an error in that tutorial you are unable to recognize it. In this case the (first) error is the omission of a hyphen before the switch "fomit-frame-pointer" in the Makefile. If you knew how to use GCC, and how to interpret its output, the error should be glaringly obvious.

I would recommend that before playing about with programming at this level you should learn how to use the assembler, C compiler, linker, and make utility by writing simple programs on your Pi. Once you are familiar with generating assembler and C programs you can make more sense of low-level programming.


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Sat Jul 05, 2014 12:29 pm 
Offline

Joined: Thu Jul 03, 2014 5:40 pm
Posts: 5
thank you for the suggestion. I would do that. I thought of seeing the output and learning things from then on because it seemed interesting. I should have learnt before hand I guess. Thank you


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Sun Jul 06, 2014 12:57 pm 
Offline

Joined: Thu Jul 03, 2014 5:40 pm
Posts: 5
can someone please tell me what all I need to learn and have understanding on, for this tutorial.. Im planning to get knowledge on this field through these tutorials.. suggestions on topics , links are welcomed...
Thanks :)


Top
 Profile  
 
 Post subject: Re: kernel.img from hello world tutorial
PostPosted: Sun Jul 06, 2014 1:44 pm 
Offline
Member
Member

Joined: Mon Sep 07, 2009 12:01 pm
Posts: 149
Required Knowledge is a good starting point.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Google [Bot], Octocontrabass and 101 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group