 | Discussion Forum |  |
|
|
Is there really no one who knows this?Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Harri Siirtola Posted 18-Dec-2000 11:32 GMT Toolset C51 |  Is there really no one who knows this? Harri Siirtola Hi, I've asked this same question a couple of times before and haven't got a single answer. I'm surprised if nobody has ever done this. So, here it is again:
I have the 8k internal RAM of the EZ-USB FX chip to use. I debug with the monitor which takes up half the RAM. I want to have every byte that remains. There are gaps in the monitor memory usage, so how do I link to use them? Thanks, Harri
| | Read-Only Author Mark Odell Posted 18-Dec-2000 13:01 GMT Toolset C51 |  RE: Is there really no one who knows this? Mark Odell If they're truly gaps in RAM, that is space used to hold data variables and not executable code then they may be reserved by the monitor and thus not to be used by the user.
If you are sure that you can use those locations without corrupting the monitor, then use the _at_ directive to place variables at precise locations in memory. Or, just get an emulator and dispense with the monitor altogether.
- Mark | | Read-Only Author Harri Siirtola Posted 18-Dec-2000 13:51 GMT Toolset C51 |  RE: Is there really no one who knows this? Harri Siirtola Thanks Mark. What I really look for is to exclude the monitor areas with some linker directives. There's a map file of the monitor in the same package the monitor hex file is from. I'd like to use this info so that I can just add variables & code and the linker takes care of the allocations.
Is there a way to simulate eg. DON'T_USE(0x11c0-0x11df)?
Harri | | Read-Only Author Mark Odell Posted 18-Dec-2000 14:30 GMT Toolset C51 |  RE: Is there really no one who knows this? Mark Odell Is there a way to simulate eg. DON'T_USE(0x11c0-0x11df)?
Since the monitor is separately linked (I assume) you can use the following trick:
// Put this in your globals.c file
// and add to your project (g_ denotes a global var).
const unsigned char g_dontUse[0x11DF -0x11C0] _at_ 0x11C0;
The linker will think you have something here and will not attempt to allocate anything to this region.
- Mark | | Read-Only Author Mark Odell Posted 18-Dec-2000 14:31 GMT Toolset C51 |  RE: Is there really no one who knows this? Mark Odell WHOOPS! Don't for get the memory space qualifier like I did:
const unsigned char xdata g_dontUse[0x11DF -0x11C0] _at_ 0x11C0;
Sorry.
- Mark | | Read-Only Author tom mazowiesky Posted 18-Dec-2000 14:28 GMT Toolset C51 |  RE: Is there really no one who knows this? tom mazowiesky You could make a c module and just allocate memory at those area(s) using the _at_ directive. as an example:
char dummy[50] _at_ 0x1100;
You don't have to access the dummy array anywhere, but it will be reserved by the linker. | | Read-Only Author Keil Support Posted 18-Dec-2000 17:24 GMT Toolset C51 |  RE: Is there really no one who knows this? Keil Support You could specify the code ranges that are available to your program. Refer to the following knowledgebase entry for details:
http://www.keil.com/support/docs/1450.htm
Also, as far as I know, there are not any empty gaps in the monitor.
Keil Support | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|