Hi, I have a simple application such as a microcontroller having internal ROM, an ext. RAM placed from 0x8000-0xEFFF, and an EPROM placed from 0x0000 - 0x1FFF. The EPROM is purposed to hold only display messages defined in the c code such as char const xdata Message[] ="Hello"; I don't want to have any other code in that EPROM. I want besides the genarated program code to have a separate HEX file for these messages ready for the EPROM. For example in format HEX-80. How am I to configure the settings using uVison? I have read the artıcles and the thread: http://www.keil.com/forum/docs/thread2074.asp Also, all related threads or similar. However, I haven't understood: am I able to use XCONST type constants in an external memory and genarate a HEX file only containing them without having a code Banking? So far some of my setings are as follow: Checked boxes: OPTIONS-Device-Use Extended Linker(LX51) instead of BL51 OPTIONS-Target-Use On Chip ROM(0x0-0xFFFF) OPTIONS-Target-Off-chip Xdata Memory 0x8000 size 0x7000 OPTIONS-C51-Misc Controls: XCROM OPTIONS-LX51 Locate-Use Memory Layout from Target Dialog checked User Classes: XCONST (X:0x0000-X:0x3FFF) Thanks in advance for your concern! BR Oktay
char const xdata Message[] ="Hello";
Hi A.W.Neil, Thanks for advise! I have multiple C files and only 1 linker output file. The definitions takes place in one of the C files. I have already tried to have the CONST data HEX file by adding a command in 'After Make' such as OHX51 lcd.obj HEXFILE (lcd.hex) H386 RANGE(0x0000-0x1FFF) OFFSET(0) but this gave an error, as it would be expected, as lcd.obj is not an absolute object file. So, probably I would need another 'After Make' command to have only this C file compiled and linked as absolute object file. Am I wrong or could you advise me on how to set this up? Thanks in advance! BR Oktay
and an EPROM placed from 0x0000 - 0x1FFF. The EPROM is purposed to hold only display messages defined in the c code such as char const xdata Message[] ="Hello"; As I read it This indicates that your EPROM is located in the DATA space, you aare trying to make tools designed to store in CODE space put data there. Erik
My EPROM is located in External Memory Space NOT DATA Space. I use the XCROM directive to have the const xdata set as defined message in XDATA space but as a ROM and not requiring pre-initialisation. Isn't it the purpose of the XCROM directive? I think this is OK! Nothing to be surprised here.
View all questions in Keil forum