Go to advanced search

by colinh
Fri Feb 07, 2014 8:05 pm
Forum: Bare metal, Assembly language
Topic: PS/2 keyboard driver in assembler
Replies: 13
Views: 5085

Re: PS/2 keyboard driver in assembler

OK, you don't like it. No problem. But you used some strong words about it. I was a little bit involved in the early times of USB. This was a big community and maybe still is it. Those people were not "insane" and neither is their standard. My apologies. Of course they're not insane. And USB is use...
by colinh
Fri Feb 07, 2014 7:56 pm
Forum: Bare metal, Assembly language
Topic: FIQ Size
Replies: 24
Views: 6392

Re: FIQ Size

Remember that at some stage (after kernel.img gets loaded) ATAGS get written at 0x100 (unless you disable this in config.txt <edit: not cmdline.txt> - but you don't do that for Linux, I guess). I suppose that's irrelevant though. But kernel.img isn't the kernel. It's a self-extracting bzImage which ...
by colinh
Fri Feb 07, 2014 4:39 am
Forum: Bare metal, Assembly language
Topic: PS/2 keyboard driver in assembler
Replies: 13
Views: 5085

Re: PS/2 keyboard driver in assembler

I didn't really think it was designed by deranged monkeys :) Backwards compatibility is a tricky thing. When a company (like Apple) doesn't give two hoots about it, making minimal changes to libraries for the fun of it, removing compatibility libraries and emulators just like that, telling me that I...
by colinh
Fri Feb 07, 2014 1:59 am
Forum: General discussion
Topic: BBC Newsnight: Year of code (train wreck)
Replies: 50
Views: 10397

Re: BBC Newsnight: Year of code (train wreck)

The problem is that to be a good programmer you also need to be fairly intelligent. If you're fairly intelligent you're probably pretty good at all subjects at school. At least, those you're interested in :-) You can then study pretty much whatever you want at university. Some people study that whic...
by colinh
Fri Feb 07, 2014 12:13 am
Forum: Bare metal, Assembly language
Topic: PS/2 keyboard driver in assembler
Replies: 13
Views: 5085

Re: PS/2 keyboard driver in assembler

I admit it is a standard. But that doesn't mean it's a good one. Where "good" is, of course, highly subjective. But there are also objective measures such as: a) overhead b) ease of implementation c) resulting size of implementation IIRC it took years before you could expect a Linux box to "do the r...
by colinh
Thu Feb 06, 2014 1:19 am
Forum: Bare metal, Assembly language
Topic: PS/2 keyboard driver in assembler
Replies: 13
Views: 5085

Re: PS/2 keyboard driver in assembler

Headache is mostly gone, but I've got my first brand new super duper DSO/MSO so... :oops: In the meantime, I've thought a little about the PS/2 keyboard protocol. And it's weirdnesses. It's not as insane as USB, but it was created by the same people that came up with EBCDIC (and FUD) so it's still n...
by colinh
Wed Feb 05, 2014 5:00 pm
Forum: Bare metal, Assembly language
Topic: GUI design what language suits best?
Replies: 15
Views: 28369

Re: GUI design what language suits best?

Wer lesen kann, ist klar im Vorteil. :lol:



Now me, I'd have recommended throwing out everyone else's gooey stuff - because it doesn't do precisely what you want, and code the whole thing in pure assembler on bare metal...
by colinh
Tue Feb 04, 2014 11:49 pm
Forum: General programming discussion
Topic: Bash countdown timer
Replies: 4
Views: 1595

Re: Bash countdown timer

You realise that this isn't a Raspberry PI related question, let alone a Bare Metal programming sort of thing? If it has to be a bash script, try typing man at and man date . If you want someone to write a custom program for you, you have to say how much you're willing to pay. You might find reading...
by colinh
Mon Feb 03, 2014 8:00 pm
Forum: Bare metal, Assembly language
Topic: PS/2 keyboard driver in assembler
Replies: 13
Views: 5085

PS/2 keyboard driver in assembler

(or "Is USB the most obnoxiously insane standard ever?") I've got my PS/2 driver nearly finished. It deals with nearly all keys (ie. also FN and cursor keys, Home/End, PgUp/PgDn etc, CTRL, ALT and SHIFT modifiers). I'm still ignoring PrtScrn and Pause/Brk -- but they're not doing anything unexpected...
by colinh
Mon Feb 03, 2014 7:32 pm
Forum: Bare metal, Assembly language
Topic: High speed pulse generation
Replies: 71
Views: 36318

Re: High speed pulse generation

Crumbs! This is getting interesting :-) As an aside, while it is nice to be able to use the GPIO pins, having to do so via reads and writes to the memory, where the GPU then notices and thinks about actually doing something with the pins, at some stage, isn't exactly ideal. I think an Atmel Xmega or...
by colinh
Thu Jan 30, 2014 8:02 pm
Forum: Bare metal, Assembly language
Topic: Looking for some tips to get started
Replies: 9
Views: 3026

Re: Looking for some tips to get started

Thanks for the responses all You're welcome :-) macro imm32 reg,immediate { ; mov reg,immediate and $FF ; orr reg,reg,immediate and $FF00 ; orr reg,reg,immediate and $FF0000 ; orr reg,reg,immediate and $FF000000 ; } ; That's horrible, but OK... So... Anyone know some good little things i can do to ...
by colinh
Thu Jan 30, 2014 2:42 am
Forum: Bare metal, Assembly language
Topic: Looking for some tips to get started
Replies: 9
Views: 3026

Re: Looking for some tips to get started

This had a HUGE insight on working with load & store as well as conditional suffixes *which i find extremely impressive considering x86 had nothing like that except for the Jump commands* Yes, the ARM instruction set is pretty cool. Look up http://en.wikipedia.org/wiki/Sophie_Wilson I'm guessing th...
by colinh
Thu Jan 30, 2014 2:18 am
Forum: Bare metal, Assembly language
Topic: Getting interrupts from GPIO (in assembler)
Replies: 9
Views: 7594

Re: Getting interrupts from GPIO (in assembler)

(There's only one GPPUD, because only GPIO0-31 have pullup/down resistors). There only needs to be one GPPUD, to hold the disable/down/up setting. To send pulls to GPIO32+, toggle the bits in GPPUDCLK1 instead of GPPUDCLK0. Yes. I was thinking of something else, I presume. Note that none of the GPI...
by colinh
Sun Jan 26, 2014 2:02 pm
Forum: Bare metal, Assembly language
Topic: Looking for some tips to get started
Replies: 9
Views: 3026

Re: Looking for some tips to get started

a) Here's a nice tutorial to get you started: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/index.html b) I also recommend this book to people interested in ARM assembler: http://www.peter-cockerell.net/aalp/ It's from 1987 (when the Acorn Archimedes computer was released) so it deals wi...
by colinh
Sun Jan 26, 2014 12:35 am
Forum: Off topic discussion
Topic: Multifunction PC based Oscilloscope/LogicAnalyzer
Replies: 5
Views: 2428

Re: Multifunction PC based Oscilloscope/LogicAnalyzer

I'm looking at getting a DSO/MSO myself. It's a tricky thing... :-) There are the well-known traditional companies like Agilent, Tektronix and LeCroy and then there are the cheap chinese things like Hantek, Rigol etc. which look like they're "just as good" at a fraction of the price. At the moment I...
by colinh
Fri Jan 24, 2014 2:13 pm
Forum: Bare metal, Assembly language
Topic: PL011 UART and receive interrupt (SOLVED)
Replies: 4
Views: 4477

Re: PL011 UART and receive interrupt

Well, to give you some things to investigate -- before dwelch or someone else actually gives you the answer... 1. are you clearing / re-enabling the relevant interrupt flags? 2. are you leaving IRQ mode? Is your program still running after it's printed the characters, or has it crashed? 3. does the ...
by colinh
Fri Jan 24, 2014 12:47 pm
Forum: Bare metal, Assembly language
Topic: Getting interrupts from GPIO (in assembler)
Replies: 9
Views: 7594

Re: Getting interrupts from GPIO (in assembler)

I edited the above post to reflect an oddity I've come across. To me it looks like a bug in the BCM2835 (or, at least, in the "documentation"). I'm looking to detect a falling edge on a GPIO pin in the first bank (ie on one of GPIO0 to GPIO31), in this case GPIO30. I set the relevant bit 30 in GPAFE...
by colinh
Thu Jan 23, 2014 11:14 pm
Forum: Bare metal, Assembly language
Topic: Getting interrupts from GPIO (in assembler)
Replies: 9
Views: 7594

Getting interrupts from GPIO (in assembler)

Hi there. I've read all the threads on this that I can find, and still can't see what I'm doing wrong :-( Edit: OK, I found my mistake which, of course, had nothing to do with anything interrupty. I'm posting this anyway as a how-to for anyone else interested in this. Most code available seems to be...
by colinh
Thu Jan 23, 2014 5:00 pm
Forum: Troubleshooting
Topic: Overclocking not working?
Replies: 8
Views: 1422

Re: Overclocking not working?

I tried the Mailbox interface... I was able to read the clock statuses and clock speeds ok, but trying to set the clock speed (for ARM) didn't work (ie. bit 31 wasn't set, as it was for the other requests and instead of the higher clock speed I'd put in the buffer was the original clock speed, 700 M...
by colinh
Thu Jan 16, 2014 8:52 pm
Forum: Troubleshooting
Topic: Overclocking not working?
Replies: 8
Views: 1422

Re: Overclocking not working?

I suppose I should have mentioned that I'm running bare metal, i.e. not linux.

If overclocking only works in conjunction with linux, that's not really clear form the RPiConfig page. The hdmi and boot options aren't linux dependent, for example.
by colinh
Mon Jan 13, 2014 9:40 am
Forum: Troubleshooting
Topic: Overclocking not working?
Replies: 8
Views: 1422

Overclocking not working?

Hi, I don't see any speedups (timings of loops and memory access) when I set overclocking options in the config.txt file. I'm using bootcode.bin and start.elf from the 2014-01-07-wheezy-raspbian image My config.txt file is arm_freq=1000 sdram_freq=500 core_freq=500 arm_freq_min=1000 sdram_freq_min=5...
by colinh
Mon Jan 13, 2014 9:05 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

Caching is now working and I'm getting 980 Mbyte/s, which is OK

But overclocking still isn't working, for me :-(
by colinh
Sat Jan 11, 2014 4:32 pm
Forum: Bare metal, Assembly language
Topic: Getting MMU configured (so that D-cache works)
Replies: 7
Views: 3647

Re: Getting MMU configured (so that D-cache works)

OK, the problem was a thinko (mental equivalent of a typo):

I knew the ttbr0 table had to be aligned to a multiple of its size.

4k entries ---> .align 12

Oops :oops:

4k * 4 bytes ---> .align 14 works much better. *sigh*
by colinh
Fri Jan 10, 2014 4:37 am
Forum: Bare metal, Assembly language
Topic: Getting MMU configured (so that D-cache works)
Replies: 7
Views: 3647

Re: Getting MMU configured (so that D-cache works)

Danke,

Ich schaue mal schnell. Bin gespannt welchen Fehler ich gemacht habe :mrgreen:

colin
by colinh
Thu Jan 09, 2014 1:13 pm
Forum: Bare metal, Assembly language
Topic: JTAG using P2 header
Replies: 4
Views: 1920

Re: JTAG using P2 header

Ohhhh.... that would explain why that's not working then... :oops: So, I'm just following dwelch's armjtag example instead, which works very nicely (*). I'm not even going to rewrite it in assembler :roll: colin (*) The pin numbering for the ARM jtag connector is inconsistent. Should be clear to any...

Go to advanced search