Keil Logo

C51: IN-SYSTEM FLASH PROGRAMMING WITH ROM SIZE > 64KB


Information in this article applies to:

  • C51 Version 7

QUESTION

I want to write code for in-system Flash programming on a Dallas DS80C390 or DS80C400 device. I have been trying the example project that comes with C51: IN-SYSTEM FLASH PROGRAMMING (PART 2).

It works well in Code ROM Size Large: 64K program (configured under Project -> Options for Target -> Target). But when I change the Code Rom Size to Contiguous Mode: 512 KB or 16MB program", I get linker errors like:

*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  _CODE_FLASHMEM_L_
    MODULE:  Srom.obj (SROM)

I want to use the internal 4kB SRAM of the device at 400000h for the Flash programming algorithm (stored in flash 0h - 80000h than copied to 400000h). Does the LX51 linker not support the contiguous mode with the SROM functionality?

ANSWER

The LX51 linker fully supports contiguous mode. However, you need to change all CODE_ references to ECODE_ since the memory class ECODE is used in the contiguous mode.

Another potential problem is that you should avoid far * pointer references since they generate calls to the C run-time library which may not be present at run time.

See the Attached Files section below to download an example demonstrating how to use the SROM memory classes for the Dallas DS80C400.

MORE INFORMATION

  • Refer to SEGMENTS in the LX51 User's Guide.

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Last Reviewed: Tuesday, May 12, 2015


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.