MCU User Forum
  USB
  HID Example Blinky: ERROR L107: ADDRESS SPACE OVERFLOW

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   HID Example Blinky: ERROR L107: ADDRESS SPACE OVERFLOW
Wauschi
New Member
posted September 20, 2006 07:08 PM     Click Here to See the Profile for Wauschi     Edit/Delete Message
I have tried to compile the HID Example "Blinky" for the F340. After applying all changes according the ReadMe.txt the project compiles fine (Keil 8.01).

But the linker refused...

*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: ?DT?F3XX_USB0_DESCRIPTOR

followed by several more linker errors.
*** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL
*** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT

Has anybody experienced or solved something similar?

BR,
Wauschi

[This message has been edited by Wauschi (edited September 20, 2006).]

IP: Logged

Tsuneo
Member
posted September 20, 2006 07:28 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
"After applying all changes according the ReadMe.txt"

Did you use the example in this folder?
C:\SiLabs\MCU\Examples\C8051F34x\USB_HID\

Then no need to change it.
Copy the whole project folder to your working place on your disk.

Tsuneo

IP: Logged

Wauschi
New Member
posted September 21, 2006 09:54 AM     Click Here to See the Profile for Wauschi     Edit/Delete Message
Hello Tsuneo,

I know there is nothing to change. I just wanted to somehow state I have even read the ReadMe but it does not work.

I just copied the folder to c:\ and everything compiled fine. It just does not link.

Maybe I should try it with a different compiler or linker version.

BR,
Wauschi

IP: Logged

Tsuneo
Member
posted September 21, 2006 11:24 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Surely, the USB_HID Blinky_Example is compiled by Keil eval version from SiLabs, but not in full version greater than Keil v8.0

Modify it as follows. This modification fixes at least linker errors.

Add 'code' to the declaration of descriptors

F3xx_USB0_Descriptor.c
code const device_descriptor DEVICEDESC =
code const hid_configuration_descriptor HIDCONFIGDESC =
code const hid_report_descriptor HIDREPORTDESC =
unsigned char* code STRINGDESCTABLE [] =

Match the extern declaration to the original.

F3xx_USB0_Standard_Requests.c
//-----------------------------------------------------------------------------
// Variables
//-----------------------------------------------------------------------------
extern code const device_descriptor DEVICEDESC; // These are created in F3xx_USB0_Descriptor.h
extern unsigned char* code STRINGDESCTABLE[];

// Additional declarations for HID:
extern code const hid_configuration_descriptor HIDCONFIGDESC;
extern code const hid_report_descriptor HIDREPORTDESC;

Tsuneo

[This message has been edited by Tsuneo (edited September 21, 2006).]

IP: Logged

BillD
Administrator
posted September 21, 2006 12:51 PM     Click Here to See the Profile for BillD   Click Here to Email BillD     Edit/Delete Message
We have also observed the same behavior recently. We think that there must have been some change in the way that Keil's compiler handles the "const" declaration when you run out of RAM space, but have not been able to find documentation about it on Keil's web site yet.

Tsuneo's recommendation on declaring the "const" variables in code space is the best way to fix this error when compiling with the newest Keil tools. We will be modifying the code example in this way for future releases.

-Bill Durbin

IP: Logged

Tsuneo
Member
posted September 22, 2006 03:21 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
From Keil on-line manual,
http://www.keil.com/support/man/docs/c51/c51_le_const.htm
Const
"The Cx51 Compiler conforms to the ANSI definition of const objects.

  • Variables declared with the const type qualifier alone are stored in the memory area
    (data, idata, xdata, and so on) associated with their definition.

  • Variables you want to locate in ROM must be declared with the code memory type.
    For example:
    code char test[] = "This is a text string";
    ...
"

Tsuneo

[This message has been edited by Tsuneo (edited September 22, 2006).]

IP: Logged

Wauschi
New Member
posted October 02, 2006 01:09 PM     Click Here to See the Profile for Wauschi     Edit/Delete Message
This forum is just great!

After using "Find in Files" and replacing 'const' with 'code' the project compiles perfectly. (Just the 'const' belonging to the descriptors which I think they should be located in the ROM).

One must not forget to also add 'code' at the declaration or you will get: "ERROR L103: EXTERNAL ATTRIBUT DO NOT MATCH PUBLIC"

Thank you,
Wauschi

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b

Site Guide Privacy Legal