Thanks for the patch, but...
Could you please elaborate which kludges you noticed and why one
would need this alignment? I must admit I know close to nothing about
the FX2. I assume this "the hardware" you're referring to. Is SDCC the
source code you're referring to or is it example code from Cypress?
One last thing: patches can just as easily be uploaded in the patches
area on SourceForge.
> I've recently started experimenting with some 8051 based projects which
> use the Cypress EZ-USB FX2 processor. While looking at the existing
> open source code and documentation I noticed the use of kludges to
> accommodate the memory alignment requirements of the hardware.
> Here is a patch which adds a new assembler directive which allows the
> alignment to be modified, the syntax is based on the .balign
> directive in gas.
> The patch is only for 8051 but I'll extend it to the other processors
> if it's suitable for inclusion.
> Robert Fitzsimons
> P.S. Here is the documentation.
> ?.?.? .balign Directive
> .balign align [, pad]
> where: align absolute expression for alignment in bytes.
> pad optional absolute expression for pad byte.
> The .balign directive is used to byte align and optionally pad the location
> counter to a given memory alignment.
> The location counter is advanced to a multiple of the absolute align
> expression in bytes, there is no change if the location counter is already
> The optional pad expression (least significant byte) is used to fill the
> memory that is skipped by the given alignment. If the pad expression is
> omitted the skipped memory will have an undefined value.