C51: IN-SYSTEM FLASH PROGRAMMING WITH ROM SIZE > 64KB
Information in this article applies to:
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?
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.
Request the files attached to this knowledgebase article.
Last Reviewed: Tuesday, May 12, 2015
of your data.