Hi,
I've configured the memory model to HUGE and I have more than 64kb ROM space. I'm working on a project using C compiler. I noticed that if I declare the ECODE class, all functions will be placed in ECODE. Is there a way to force functions into CODE so that the compiler will use LCALL instead of ECALL to the functions?
Thanks in advance.
Was there a special reason you decided to use the huge memory model? Do you need it?
I used up all of the 64kb space of ROM.
these days, if your code does not fit in 64k, switch to an ARM
So, is it possible to force functions to CODE so that the compiler us LCALL to call it?
#pragma rom(large) void function (void) { }
I "think" this will work.
Jon
Ah, thanks.
I found out that the #pragma rom(mem_space) works if placed at the top in the source file and it applies to all functions in the source file. The problem now is, now it calls functions that supposed to be in the >64kb boundary using LCALL too. This is due to the fact that the header files included does not state where the functions are located.
Normally I would declare the following,
far void hello(void);
but C51 doesn't seem to accept that. Any help would be greatly appreciated.