AnsweredAssumed Answered

QE128 Paged memory and CodeWarrior ( C / C++)

Question asked by ricardo ricardo on Sep 9, 2009
Latest reply on Sep 10, 2009 by CompilerGuru

Hi guys

I have some doubts about paged memory model for QE128 using CW6.2

1- I understood the more efficient approach using paged memory is use small memory model AND so allocate some extra code into paged area.It would maked the code smaller and faster, since the extra handling of ppage and call would be perform only when accessing the paged area.., si it?


2- To allocate code into paged area, we can use CODE_SEG pragma.Is it necessary to add tha "far" word in front of each function of the code placed into this area? or the pragma is enough to CW?


3- I re-compiled my old smll memory model project tobanked mode and CW complains about the interruption vectors, wich could have data lost...

The orinal vector declaration is:


void (* near const _vect[])() @0xFFC0 = { // Interrupt vector table
         Cpu_Interrupt,               //  0 Vtpm3ovf (at FFC0)              Unassigned



4- I read about const data cannot be accessed between banked code (different pages), but only between non banked  / banked, or vice-versa,...comments?


5- Some has a code to read/erase and write the internal flash..considering the data cab be in ANY page (banked or not)..?


Thanks guys....


Ricardo Raupp


Message Edited by RicardoRaupp on 2009-09-09 01:11 PM