Dear sdcc developers and users,

I have an "advanced?" question:
I need to define a fixed length array in the ram of the pic18F25J50.

It is a descriptor block for the internal USB peripheral of the mcu and should 
be placed exactly to 0x400 address in ram.
Of course this place should be kept clear by the linker and compiler when 
assign place to the other variables.

The best way should be define a special section in the linker script but I do 
not know how to do this, and did not found any information mregarding this. (In 
gputils doc)
Write this into the lkr file should work?:
DATABANK   NAME=usb       START=0x400              END=0x420
How should I assign an array in C source to this section?
Could you please provide the syntax?

Other (less professional ?) way is use the __at (0x400) directive, but I'm not 
sure it is safe enough:
Will this place kept clear from other variables?

volatile unsigned char[32] __at (0x400) usbDP;

Did anybody tried this, and have any experience?

Best regards,
Tamas Butuza


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to