|
From: Muller J. <jjm...@su...> - 2005-07-01 14:00:49
|
The endpoint buffers are at 0x7b40-0x8000 and mapped to 0x1b40-1F40. To be safe, I can start my code at 0x8000, which gives it about 32KB of space to grow without any hassles. It works, except when the firmware gets bigger than 19000 bytes, so the problem must lie elsewhere. Any ideas? -----Original Message----- From: sdc...@li... [mailto:sdc...@li...] On Behalf Of Ernst Bachmann Sent: 01 July 2005 03:49 PM To: sdc...@li... Subject: Re: [Sdcc-user] code fails if it reaches certain size? Hi, On Friday 01 July 2005 15:31, Muller Jaco <jjm...@su...> wrote: > My firmware code is growing, and is working fine until its size=20 > reaches about 19000 bytes. The code is running on an EZ-USB FX microcontroller. > As soon as the size reaches this limit, the device cannot be=20 > enumerated (firmware not working..) Below this limit, the firmware can > be relocated anyware in external RAM without any problems. I am=20 > avoiding the memory areas of the EZ-USB used for buffer registers. > > The firmare size will grow beyond 19000 bytes, as I still need to=20 > implement more functions. I am completely baffled and don't even know=20 > where to start tracing the bug - does anyone have any idea where the=20 > problem could be? As far as I know, there is no code size limit in SDCC. My guess would be that your code somewhere overlaps with the endpoint buffers, making renumeration fail cause the buffers are filled with your code. But since those Buffers start at 0x7B40, there should be enough space below for your code. The EZUSB Chips also remap those buffers into a second memory area, but IIRC those would be at arround 0x2... so I guess you deactivated that already Maybe check the memory map as generated by the linker for overlap with some of the usb buffers? Luckily my project's firmware still fits in an AN2131SC without additional external ram, so I never looked closely at availabe memory areas. Greetings /Ernst ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick _______________________________________________ Sdcc-user mailing list Sdc...@li... https://lists.sourceforge.net/lists/listinfo/sdcc-user |