From: Erik M. <J.A...@it...> - 2002-07-26 01:25:42
|
On Thu, Jul 25, 2002 at 04:56:44PM -0700, Christopher Hoover wrote: > > If you configure and compile for badge4, you'll find that including > sa1100.h in ledasm.S is necessary as badge4.h defines LED_GPIO as > GPIO_GPIOxx. That seems more perspicuous than a hex constant or even an > expression (1<<x). See my previous message. IMHO the advantage of cleaner code outweighs the disadvantage of having to use 1<<x. > But this isn't important and isn't the real reason I made those changes > -- > > I've got some additional assembly that I haven't checked in that depends > on sa1100.h. What kind of additional assembly needs to be in the first stage loader? Unless it does some very creepy things with memory banks, it can be easily put in the platform specific C files. The first stage loader is one of the hardest parts of blob *because* it's written in assembly. I did my utmost to get most of the platform dependencies out of the first stage loader into the second stage loader. The second stage loader is easier to understand because it's written in C. > Using that header is cleaner than continually duplicating > register bases and offsets already defined in sa1100.h. The main problem of SA-1100.h is that it doesn't use offsets. Therefore it's useless for assembly (see my previous message). > Or is it just the _ prefix you don't like? I don't like changes to fragile parts of the code, unless there is a very good reason for it. So far I haven't seen that reason. Erik [who goes zzz right now] -- J.A.K. (Erik) Mouw Email: J.A...@it... WWW: http://www-ict.its.tudelft.nl/~erik/ |