We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everyone, I'm trying to force the CX51 compiler to put all the function from a specific module to ECODE memory space (to move it to external flash memory in future). But the compiler seems to apply some sort of optimization, i.e. it places some functions to CODE memory space and some to ECODE memory space, what is unacceptable. I read an artictcle about defining #pragma ROM(HUGE) before each function which should be placed in ECODE, but the compiler says that ROM directive can be defined only once per file. Though there is an option to make an assembly listing of each source file, and there manually define location of the segments, it's not a good solution, because assembly convertion is bugging (for example, RET instructions are placed instead of ERET). So, is there a way, to define, in C source code, in which memory space each function should be placed? Thank you, in advance...
No it's not. When you generate ASM file from C source (the linker is not involved in this process) you can see segment allocation (not the absolute address, but a memory space)