Hi Eric,

Have a look in this forum thread:
http://sourceforge.net/forum/forum.php?thread_id=1394648&forum_id=1865

Using an absolute segment seems the best option.

Greets,
Maarten

> I've combed through the documentation for sdcc several times, and I
> still can't figure out how to word-align a char array. I have the
> following: 
> 
> __code unsigned char DEVICE_DESCRIPTOR[] =
>   { 18,    // bLength, length of the descriptor
>     DTYPE_DEVICE,    // bDescriptorType, descriptor type
>     00,    // usb spec (L)
>     02,    // usb spec (H)
>     0xFF,  // Device class (vendor specific)
>     0xFF,  // Device sub-class (vendor specific
> ...
> 
> and the cypress FX2 I'm using requires that this descriptor be
> word-aligned (16-bit aligned). What is the easiest way to accomplish
> this? I thought about creating a separate .asm file and then using
> the .even directive, but I'm running into linking difficulties. Is there
> a good way of getting the alignment I want using C? 
> 
> Thanks!
>                       ...Eric


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to