Go to advanced search

by mister_wavey
Sat Sep 08, 2012 12:50 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

I have a question regarding Lesson 5. I did the code myself, and got bootup flickering, then a solid LED light, rather than the morse code effect. I pored over my code again and again. Then I compared it to the model answer, and it looked very similar. Still puzzled, I built and ran the model answer...
by mister_wavey
Sat Sep 08, 2012 5:55 am
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

That's very odd.

Mine shows:

Code: Select all

oscar:os stuart$ which make
/Users/stuart/yagarto-4.7.1/tools/make
oscar:os stuart$ which arm-none-eabi-as
/Users/stuart/yagarto-4.7.1/bin/arm-none-eabi-as
oscar:os stuart$ 
by mister_wavey
Fri Sep 07, 2012 6:52 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

hmm. just for completeness, do a
which make
and
which arm-none-eabi-as
by mister_wavey
Fri Sep 07, 2012 1:10 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

what error did you get under OSX? I didn't have any trouble on MBP running 10.8.1
by mister_wavey
Thu Sep 06, 2012 9:05 pm
Forum: User groups and events
Topic: Bristol Raspberry Jam
Replies: 16
Views: 4734

Re: Bristol Raspberry Jam

be awesome to see Piana in action! I'll be there!
by mister_wavey
Thu Sep 06, 2012 6:22 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

Did you untar your toolchain as root? Looks like it ended up in / if so, no one else will be able to read it. If it didn't end up in / then you need to edit your PATH to say where it really is. Plus it looks like you missed the /bin part of the arm2008q3 path maybe follow http://www.cl.cam.ac.uk/fre...
by mister_wavey
Thu Sep 06, 2012 3:44 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

your error: make: arm-none-eabi-as: Command not found

means that make still isn't finding your toolchain in the path.

can you echo $PATH and see if it contains 2 dirs for yagarto tools and bin?
by mister_wavey
Thu Sep 06, 2012 3:04 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

I don't think so. Just rename the kernel.img on the SD card to kernel_old.img then copy your newly created one onto the SD Card.
by mister_wavey
Thu Sep 06, 2012 2:54 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

ok, the build directory has vanished. Just create a new one like you created the source one.
by mister_wavey
Thu Sep 06, 2012 2:47 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

that error is saying there is no directory called 'build' in your template directory. Can you check? Can you paste here the contents of that directory? type 'dir' to see the contents.
by mister_wavey
Thu Sep 06, 2012 2:38 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

yes 'in'. We usually view directories/folders in a hierarchy, so we often use the terms 'under' etc.

The folder containing the makefile should have a 'build' folder and 'source' folder inside it.
by mister_wavey
Thu Sep 06, 2012 2:30 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

can you confirm that your 'source' directory is under the template directory?

Is the main.s inside the source directory?

are you sure everything is lowercase?
by mister_wavey
Thu Sep 06, 2012 1:58 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

create one. and move your main.s into there.
by mister_wavey
Thu Sep 06, 2012 1:10 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

one thing to watch out for when writing source files on windows is to make sure the editor (e.g. notepad) doesn't add a .txt extension to your files, or the makefile won't be able to find the file you want it to compile. Use 'dir' in the command window to look at the created filename to be sure.
by mister_wavey
Thu Sep 06, 2012 12:54 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

according to the Baking Pi installation instructions, you use http://www.yagarto.de/#download to download the assembler toolchain for your platform. For windows, there are three packages in the table of download packages on the webpage: try using just the first two. The IDE (Integrated Development E...
by mister_wavey
Thu Sep 06, 2012 12:00 pm
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

for windows, I suspect you don't *need* the IDE part - I'll bet you can do it all on the commandline with just the yagarto tools and gnu toolchain. I certainly didn't install the IDE for running this on the mac.
by mister_wavey
Thu Sep 06, 2012 10:44 am
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

you need to create a 'source' directory inside the template one (the tutorial didn't really make that clear). Your main.s needs to be moved inside that source directory. The parent directory (where you type 'make') is the top one you're in (or make would complain there is no makefile found).
by mister_wavey
Thu Sep 06, 2012 10:30 am
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

OK, looks like it just isn't in your path then. What platform are you on? Windows/mac/linux?
by mister_wavey
Thu Sep 06, 2012 10:24 am
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

lesson 1 says to install the gnu toolchain, which your error suggests, you are missing.
by mister_wavey
Thu Sep 06, 2012 9:58 am
Forum: Bare metal, Assembly language
Topic: Baking Pi
Replies: 168
Views: 30087

Re: Baking Pi

I'm loving it too. Seeing the LED flash at the end of lesson 2 (and understanding why) was a real rush :)

Thanks so much for these.
by mister_wavey
Tue Sep 04, 2012 4:22 pm
Forum: Bare metal, Assembly language
Topic: calling puts vs printf in asm
Replies: 10
Views: 3711

Re: calling puts vs printf in asm

thanks all - I can confirm this works without the \n

Code: Select all

.globl main
.align 2
.section .rodata
hello:
    .asciz "hello"
.text
main:
    stmfd sp!, {lr}
    ldr r0, =hello
    bl printf
    mov r3, #0
    mov r0, r3
    ldmfd sp!, {lr}
you guys are an awesome resource.
by mister_wavey
Tue Sep 04, 2012 3:29 pm
Forum: Bare metal, Assembly language
Topic: calling puts vs printf in asm
Replies: 10
Views: 3711

Re: calling puts vs printf in asm

worked like a charm. Thx, that was driving me mental.
by mister_wavey
Tue Sep 04, 2012 3:02 pm
Forum: Bare metal, Assembly language
Topic: calling puts vs printf in asm
Replies: 10
Views: 3711

calling puts vs printf in asm

Hi guys I've been trying to learn some asm on the Rpi emulator (which is running fine). Some of the tutorials I've been reading through use puts and some use printf. While I can get the puts one to work, I can't for the life of me get the printf ones to work. Take the following tiny program: .globl ...

Go to advanced search