Compiling to RAM

I’m trying to compile a program in Dynamic C 9.52 to run in RAM.

The program is part of a boot loader which we wrote some time ago to
program a RCM2260 RabbitCore from an external flash memory card.
The original program was written in Dynamic C 7.25P and has been
working for our application.

When the program is compiled using the earlier version, the file
compiles to a BIN file with only a warning message indicating that BIN
files were intended for programming FLASH and not for running in RAM.
The BIN file however worked for our purposes.

The problem I’ve run into is when the very same program is compiled
the BIN using Dynamic C 9.52 the resulting BIN file does not work.
Through some investigation of my own I’ve found that even though I’ve
selected “Code and BIOS in RAM” when I go to compile the BIN file the
compiler compiles to FLASH and not RAM.

While Dynamic C 9.52 has the option to compile to RAM under the
“Compile to Target” menu option, Dynamic C 9.52 only has compile to
flash options under the “Compile to bin” menu option.

Is it possible with Dynamic C 9.52 to create a BIN file that will run
in RAM? If so, what options or definitions do I need to include in
the compile? If not, then will any of the newer versions of Dynamic C
have this ability?

Is it possible to override the FLASH_COMPILE or RAM_COMPILE macros and
generate a BIN file for use in RAM? I tried a custom BIOS defining
RAM_COMPILE in place of FLASH_COMPILE but that resulted in several
compile errors.

If there is a alternate C compiler for the Rabbit modules available we
might consider switching from Dynamic C but only as a last resort.
The only problem with switching compilers is compatibility with
existing code. We’ve developed several libraries and have modified
some of the Dynamic C libraries and any new compiler would need to be
compatible.

Any suggestions will be appreciated.

Ken Hendrix
AGM Electronics Inc.