On Nov 20, 2010, at 1:35 PM, Peter Bigot wrote: > A single report is fine. Thanks.
Will do! > Yes, it appears the USB section of RAM was not incorporated in the device > list I got from TI, so you should be safe from potential assignment > collisions. That's probably a pretty safe default behavior, since I would expect it to be uncommon for people to build for the USB-capable variants without using the USB hardware. > I'll look at the linker scripts in Code Composer when I deal with the bug, > but if that's the model they use those chips will always have a USB memory > section defined, and if you want to use it as normal RAM you'll have to > assign variables to it explicitly using the section attribute. That sounds reasonable. > You could probably avoid the assembler file with a simple: > > uint8_t USBMEM[2048] asm("0x1c00"); It'll take a few more lines than that since variables are defined for various endpoint buffers within the USB RAM, but that general technique looks like a clean way to handle it. The original code looks like this: #ifdef __IAR_SYSTEMS_ICC__ #pragma location = 0x2380 __no_init tDEVICE_REQUEST __data16 tSetupPacket; #pragma location = 0x0920 __no_init tEDB0 __data16 tEndPoint0DescriptorBlock; [...] #pragma location = OEP1_X_BUFFER_ADDRESS __no_init BYTE __data16 pbXBufferAddressEp1[EP_MAX_PACKET_SIZE]; [...] #endif #ifdef __TI_COMPILER_VERSION__ extern __no_init tDEVICE_REQUEST tSetupPacket; extern __no_init tEDB0 tEndPoint0DescriptorBlock; [...] #endif I'm presently using something like the __TI_COMPILER_VERSION__ block of extern declarations with the symbols defined with .set directives in an assembly file. I'll try doing it more like the __IAR_SYSTEMS_ICC__ block, using the asm directives in place of the pragmas. I may be able to ignore the __no_init and __data16 stuff since the linker shouldn't be allocating storage space. Back to the Secret Laboratory for more experiments! -- Mark J. Blair, NF6X <n...@nf6x.net> Web page: http://www.nf6x.net/ GnuPG public key available from my web page. ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users