LavaFrog
Posts: 2
Joined: Sun Jan 20, 2013 5:04 am

Baking Pi screen02-04

Sun Jan 20, 2013 5:08 am

First off have to say i love this tutorial, tons of fun and really enjoying it. I have been having issues with screen 02 -04 lessons. I cant seem to get anything to show up on the screen. I have used the given solutions and still no results. I have also used kernel_old=1 and tried hdmi_safe =1. Yet still no, response on the screen. Any tips would be greatly appreciated!

mark_3094
Posts: 74
Joined: Mon Jul 02, 2012 8:38 am
Location: Australia
Contact: Website

Re: Baking Pi screen02-04

Sun Jan 20, 2013 7:08 am

I had a similar problem when I did this.

I found that there were some problems with the linker script, as I was using a 512MB RPi with the latest firmware at the time.

The linker script I used in the end was this (Alex Chadwick's script, with minor modifications):

Code: Select all

SECTIONS {
	/*
	* First and formost we need the .init section, containing the IVT.
	*/
	.init 0x8000 : {
		*(.init)
	}
	
	/* 
	* We allow room for the ATAGs and the stack and then start our code at
	* 0x9000.
	*/
	.text 0x9000 : {
		*(.text)
	}
	
	/* 
	* Next we put the data.
	*/
	.data : {
		*(.data)
	}

	/*
	* Finally comes everything else. A fun trick here is to put all other 
	* sections into this section, which will be discarded by default.
	*/
	/DISCARD/ : {
		*(*)
	}
}
The other change I made was to add 0x40000000 to the memory address of the framebuffer pointer. For example:

Code: Select all

	/*  Store values in structure  */
	fbInfoAddr .req R4
	PUSH	{R4, LR}
	LDR		fbInfoAddr, =FrameBufferInfo+0x40000000	/*  Memory address of structure is stored in R4  */
	STR		width, [R4, #0]					/*  Store values in structure  */
	STR		height, [R4, #4]
	STR		width, [R4, #8]
	STR		height, [R4, #12]
	STR		bitDepth, [R4, #20]
	.unreq	width
	.unreq	height
	.unreq	bitDepth
I hope this helps in your case too.

LavaFrog
Posts: 2
Joined: Sun Jan 20, 2013 5:04 am

Re: Baking Pi screen02-04

Sun Jan 20, 2013 8:58 pm

Thank you, i will try this once I get a chance to get back to my pi.

tvjon
Posts: 704
Joined: Mon Jan 07, 2013 9:11 am

Re: Baking Pi screen02-04

Mon Jan 21, 2013 11:50 pm

Thank you kindly mark_3094,

that does indeed appear to fix the problem examples :)

JustRaspberry
Posts: 20
Joined: Fri Oct 19, 2012 3:25 am

Re: Baking Pi screen02-04

Wed Jan 30, 2013 2:22 am

I have the same problem. So I follow up the solution posted here. I skipped the linker script (which file?) because it is a bit confusing. However I modified the framebuffer.s by adding +0x40000000. I also skipped the following command in config.txt file ' hdmi_safe =1 ' because it makes the text look blurred (low resolution). Hence , the changes that I made fixes the problem. Thanks for everyone here.

markymarc35
Posts: 10
Joined: Tue Oct 02, 2012 11:09 pm

Re: Baking Pi screen02-04

Mon Feb 18, 2013 8:48 pm

Hi,

I have a similar issue, screen02 works, i see the lines on screen but when i get to the screen03 or 04 with the text, the screen is blank.

I tried the add suggested here but still doesn't work.

Any help would be apreciated.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Baking Pi screen02-04

Mon Feb 18, 2013 11:29 pm

markymarc35 wrote:Hi,

I have a similar issue, screen02 works, i see the lines on screen but when i get to the screen03 or 04 with the text, the screen is blank.

I tried the add suggested here but still doesn't work.

Any help would be apreciated.
What boot files are you using and is your pi 512 ?
eg: start.elf and bootcode.bin
Batteries not included, Some assembly required.

markymarc35
Posts: 10
Joined: Tue Oct 02, 2012 11:09 pm

Re: Baking Pi screen02-04

Tue Feb 19, 2013 12:45 am

I do have a start.elf and bootcode.bin on the SD.

When i got the pi, i followed the instructions to install linux on it and that works.
I do not believe it's a 512, it has the ethernet port and 2 usb.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Baking Pi screen02-04

Tue Feb 19, 2013 1:34 am

markymarc35 wrote:I do have a start.elf and bootcode.bin on the SD.

When i got the pi, i followed the instructions to install linux on it and that works.
I do not believe it's a 512, it has the ethernet port and 2 usb.
Some ver of those boot loader break bare metal code.
So to test, save the old files (start.elf and bootcode.bin) and replace them with the files in this zip
http://www.dex-os.com/DexBasic/Test.zip
You will find them in the boot folder.
Also save and replace replace the config.txt and kernel.img with the one in the Test.zip.
Then test, if that works and you see the bmp image and printed text on screen.
Then add your original kernel.img and config.txt to see if it works.
Let me know what happens.
Batteries not included, Some assembly required.

markymarc35
Posts: 10
Joined: Tue Oct 02, 2012 11:09 pm

Re: Baking Pi screen02-04

Tue Feb 19, 2013 9:17 pm

Did exactlly what you asked.

I do not have the image on screen but i do see some dots beeing flashed at the bottom of the screen.
That wasn't there before.

The screenshot that i attached is what i had in my SD, the kernal.img is the linux one in that.
I tired with only replacing the files then keeping only the files you mentioned and i got the same result.

Would the resolution of my monitor be a factor? I'm using the DVI input with a HDMI to DVI convertor. This is a seprerate input from the VGA one my computer is connected to. The resultion is set (in windows) to 1680 x 1050
Attachments
FileList.png
FileList.png (8.16 KiB) Viewed 3779 times

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Baking Pi screen02-04

Wed Feb 20, 2013 2:49 am

When you got the dots, did you have kernel_old=1 in the config.txt ?, if so take it out or put # before it, like this
#kernel_old=1
If you did not have it in your config.txt when you had the dots, try it with it.
Let me know what you get.
Would the resolution of my monitor be a factor? I'm using the DVI input with a HDMI to DVI convertor. This is a seprerate input from the VGA one my computer is connected to. The resultion is set (in windows) to 1680 x 1050
thats fine, thats how mine is.
Batteries not included, Some assembly required.

markymarc35
Posts: 10
Joined: Tue Oct 02, 2012 11:09 pm

Re: Baking Pi screen02-04

Wed Feb 20, 2013 10:08 am

Who is the ugly dude in the image? :D

I didn't have kernel_old in my config.txt, added it and i got the image.
Changed the kernal.img for the one of screen03 and i got the text at the top of the screen.

I will continue with the tutorials and see what happends.

Thank you very much for your help.

BTW, love your Sheldon Copper avatar .....

Simius
Posts: 6
Joined: Thu Jan 24, 2013 11:33 am

Re: Baking Pi screen02-04

Sun Feb 24, 2013 5:05 pm

Hi,

I have the same Problem. However, the kernel.img from the Test.zip works for me but not the kernel.img from the Screen 03 lesson. Any suggestions?

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: Baking Pi screen02-04

Sun Feb 24, 2013 11:41 pm

Have you added
kernel_old=1
in the config.txt ?

Have done this http://www.raspberrypi.org/phpBB3/viewt ... 68#p264968
Batteries not included, Some assembly required.

User avatar
edargelies
Posts: 7
Joined: Sun Aug 09, 2015 11:47 pm
Location: Oakland, CA
Contact: Website

Re: Baking Pi screen02-04

Tue Oct 13, 2015 7:11 am

I know it's late, but I just completed screen03 on the raspberry pi 2 and had the same issue. I made a post about it on another thread. Hope this will be of some use to others. viewtopic.php?p=828386#p828386

Return to “Bare metal, Assembly language”