Go to advanced search

by Joeboy
Sun Mar 03, 2013 10:07 am
Forum: Bare metal, Assembly language
Topic: New Raspberry Pi bootloader (rpi-boot)
Replies: 46
Views: 11799

Re: New Raspberry Pi bootloader (rpi-boot)

Thanks Dex and jnc100, am busy with real life at the moment but I'll be checking this out as soon as I have some time.
by Joeboy
Fri Mar 01, 2013 11:58 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Audio over I2C for guitar effect pedal possible?
Replies: 15
Views: 7425

Re: Audio over I2C for guitar effect pedal possible?

This is where I'm hopefully heading with http://www.joebutton.co.uk/blog/baremet ... spberrypi/ , although I'm sadly not finding time to work on it at the moment.
by Joeboy
Sun Feb 24, 2013 3:43 pm
Forum: Bare metal, Assembly language
Topic: Std libs with arm-eabi-gcc
Replies: 21
Views: 8562

Re: Std libs with arm-eabi-gcc

the float seems to work, using the hard float unit, but i can't do a unsigned int division (undefined reference to '__aeabi_uidiv')... The cpu doesn't have integer division instructions, so you have to implement that function, or use a lib that implements it. Although I've just been doing skanky ca...
by Joeboy
Sun Feb 24, 2013 3:36 pm
Forum: Bare metal, Assembly language
Topic: Std libs with arm-eabi-gcc
Replies: 21
Views: 8562

Re: Std libs with arm-eabi-gcc

well i just suceeded in compiling some math functions i found there: http://www.netlib.org/fdlibm/ I'm getting a 403 at that url, which is a shame as I'm probably going to be looking for some math functions. I really need a fairly complete libc implementation though, as I'm writing something that's...
by Joeboy
Sun Feb 24, 2013 1:54 pm
Forum: Bare metal, Assembly language
Topic: Std libs with arm-eabi-gcc
Replies: 21
Views: 8562

Re: Std libs with arm-eabi-gcc

Incidentally I wrote my own malloc and printf before deciding to get newlib working, and it turns out they're really not that hard at all, at least to create bodged versions. malloc in particular can be really trivial if you don't care about freeing memory, which many baremetal projects won't need to.
by Joeboy
Sun Feb 24, 2013 1:50 pm
Forum: Bare metal, Assembly language
Topic: Std libs with arm-eabi-gcc
Replies: 21
Views: 8562

Re: Std libs with arm-eabi-gcc

I think you want to build a toolchain with newlib (or uclibc, or one of the other libc implementatons). Which as it happens is what I'm trying to do right now, and finding it extremely painful. If anybody out there has a build script that'll create a vfp / hard float abi toolchain with gcc and newli...
by Joeboy
Thu Feb 21, 2013 5:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 900
Views: 436633

Re: I2S: Anyone got it running?

Thanks. The I2C control thing is a bit annoying but that looks like it should be sufficient to get the software side working.
by Joeboy
Wed Feb 20, 2013 11:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 900
Views: 436633

Re: I2S: Anyone got it running?

Does anybody know of a board with i2s audio I/O that would be usable with the pi for musical instrument / stompbox applications? I haven't been able to find one, but it seems like one ought to exist...
by Joeboy
Mon Feb 18, 2013 9:52 am
Forum: Bare metal, Assembly language
Topic: Is there a video or book on how to make your own rpi os?
Replies: 10
Views: 2359

Re: Is there a video or book on how to make your own rpi os?

Not sure if you're more interested in the "OS design" aspect or the "getting the pi to do stuff" aspect. If the latter, I'd definitely suggest going through David Welch's stuff at https://github.com/dwelch67/raspberrypi
by Joeboy
Tue Feb 05, 2013 7:31 pm
Forum: Bare metal, Assembly language
Topic: Interfacing a JPEG TTL interface camera to the mini uart
Replies: 6
Views: 2618

Re: Interfacing a JPEG TTL interface camera to the mini uart

I'm currently interfacing to a midi device via the mini uart, and I did it initially in Linux so I could debug over ssh. Don't know if that approach might be useful for you.
by Joeboy
Tue Feb 05, 2013 2:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: The I2S sound thread.
Replies: 900
Views: 436633

Re: I2S: Anyone got it running?

Not really following, but this might also be of interest:

https://github.com/Joeboy/pixperiments/ ... pi/audio.c
by Joeboy
Sat Feb 02, 2013 6:34 pm
Forum: Bare metal, Assembly language
Topic: BBC Basic/Assembler
Replies: 13
Views: 4025

Re: BBC Basic/Assembler

To generate a tone, replace the MainLoop section of DexOs's code with something that feeds the FIFO a waveform rather than the sample data. You can very easily generate a square wave by just alternating between two values at whatever frequency you want the tone to be (eg. middle A = ~440Hz).
by Joeboy
Sat Feb 02, 2013 8:06 am
Forum: Bare metal, Assembly language
Topic: BBC Basic/Assembler
Replies: 13
Views: 4025

Re: BBC Basic/Assembler

Regarding baremetal audio in asm, you should have a look at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=72&t=30896 You might also want to look at https://github.com/Joeboy/pixperiments/blob/master/pitracker/includes/pi/audio.c , which implements DMA and a ringbuffer. It's in C but should help ...
by Joeboy
Sun Jan 20, 2013 1:26 am
Forum: Bare metal, Assembly language
Topic: Interfacing with more hardware
Replies: 4
Views: 1207

Re: Interfacing with more hardware

Not asm, but here's a baremetal audio project: https://github.com/Joeboy/pixperiments/ ... /pitracker

includes/pi/audio.c is probably a good place to start looking.
by Joeboy
Fri Jan 18, 2013 5:22 pm
Forum: Bare metal, Assembly language
Topic: Undefined reference with new lib
Replies: 19
Views: 3934

Re: Undefined reference with new lib

Thanks David. What I'm finding (and I've just tested this) is that if I have: int z = 23; in global scope, z gets set to 23 when it's first used. This seems to happen reliably. However with int z = 0; the instructions to zero z aren't generated (presumably because the compiler expects z to be 0 by d...
by Joeboy
Fri Jan 18, 2013 11:38 am
Forum: Bare metal, Assembly language
Topic: Undefined reference with new lib
Replies: 19
Views: 3934

Re: Undefined reference with new lib

On a slight tangent - I'm finding that when I initialize global / static variables to 0, gcc helpfully optimizes out the assignment, leading to confusing bugs. Is there any way to make it not do that (aside from zeroing the bss)?
by Joeboy
Mon Dec 24, 2012 12:19 pm
Forum: C/C++
Topic: Audio programming
Replies: 3
Views: 3663

Re: Audio programming

I guess you probably want to write code that runs in Linux, in which case you're probably best off looking into alsa and/or jackd. I had a stab at getting audio output on bare metal, and the result is here: https://github.com/Joeboy/pixperiments/tree/master/pitracker I need to get back to it and fix...
by Joeboy
Thu Dec 20, 2012 11:02 pm
Forum: Bare metal, Assembly language
Topic: RIOS : a task scheduler written entirely in C
Replies: 2
Views: 2818

Re: RIOS : a task scheduler written entirely in C

For the timer / interrupt functions you might want to have a look at https://github.com/dwelch67/raspberrypi ... /blinker07 and possibly other examples in dwelch's awesome repo, if you haven't found it already.
by Joeboy
Mon Dec 17, 2012 10:55 am
Forum: Bare metal, Assembly language
Topic: FatFs - Generic FAT File System Module
Replies: 16
Views: 4393

Re: FatFs - Generic FAT File System Module

Ok that's cool. Looking forward to unzipping my xmas present.
by Joeboy
Sun Dec 16, 2012 11:29 pm
Forum: Bare metal, Assembly language
Topic: FatFs - Generic FAT File System Module
Replies: 16
Views: 4393

Re: FatFs - Generic FAT File System Module

I'd like to see your disk I/O code if you're up for posting it, DexOs. Cheers.
by Joeboy
Sun Dec 16, 2012 5:10 pm
Forum: Bare metal, Assembly language
Topic: Quick Question (Bare metal sound)
Replies: 12
Views: 5240

Re: Quick Question (Bare metal sound)

Glad you like it. It was a lot of fun to do. To be honest I'm not really planning to turn it into a fully featured tracker or anything, it was just an experiment that got out of hand (you know how it is...). You're very welcome to fork it or nick bits of it to work on yourself though.
by Joeboy
Sun Dec 16, 2012 3:40 pm
Forum: Bare metal, Assembly language
Topic: Quick Question (Bare metal sound)
Replies: 12
Views: 5240

Re: Quick Question (Bare metal sound)

I accidentally started writing a sequencer. God help me.

It's not big or clever but it kind of works:

https://github.com/Joeboy/pixperiments/ ... /pitracker
by Joeboy
Sat Dec 15, 2012 2:09 am
Forum: Bare metal, Assembly language
Topic: Quick Question (Bare metal sound)
Replies: 12
Views: 5240

Re: Quick Question (Bare metal sound)

Ok, here's some code that outputs a gnarly sawtooth wave to the audio jack, but I think the pwm needs to be driven by a faster clock in order to get decent quality audio. Hope it's of some use, and maybe somebody can provide some enlightenment as to how to do it properly. Enjoy. extern void PUT32 ( ...
by Joeboy
Fri Dec 14, 2012 5:45 pm
Forum: Bare metal, Assembly language
Topic: Quick Question (Bare metal sound)
Replies: 12
Views: 5240

Re: Quick Question (Bare metal sound)

I've just been investigating this, and not getting very far. I managed to get some bleeping noises out of the headphone jack by using 'oscillator' as the clock source to the pwm. I can share the code for this if you like, but I'm fairly sure I'm not doing it right. I tried reading PWM_CLOCK_CNTRL in...

Go to advanced search