Hi Vaclav, > Have anybody tried with success to create a byte array bigger than 256 > bytes ? I need it for SD/MMC communication and for LAN packets as well. > I have a lot of space in 2kB of SRAM (I use PIC18F2550). But sdcc does > not allow me to declare bigger buffer.
In my experience, its the linker complaining about no target memory being available for section foobarbaz. In this case you need to patch the linker script to combine two (or more) DATABANKs into one large DATABANK. On 2009-02-25, we had a similar discussion on the sdcc-user-list in the "Larger than 256 byte arrays in PIC16"-thread: http://www.mail-archive.com/sdcc-user@lists.sourceforge.net/msg02150.html Basically, you need to (1) copy the 18f2550.lkr from the gputils/lkr path into your project (2) make sdcc/gplink use this script via -Wl,-s,/path/to/18f2550.lkr (3) change the local copy, combining two or more lines from DATABANK NAME=gpr1 START=0x100 END=0x1FF DATABANK NAME=gpr2 START=0x200 END=0x2FF or (if you do not use the USB memory) DATABANK NAME=usb6 START=0x600 END=0x6FF PROTECTED DATABANK NAME=usb7 START=0x700 END=0x7FF PROTECTED to DATABANK NAME=gpr12 START=0x100 END=0x2FF or DATABANK NAME=usb67 START=0x600 END=0x7FF The NAMEs do not matter, the END-address has changed to give you 0x200 or 512 bytes memory. Please read the referenced thread for a discussion of the potential problems with this approach. If any questions remain, feel free to ask again. Best regards Raphael ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user