John Pitz

How to locate a variable to the top of a RAM page, Processor=MCF51JM128 Codewarrior Eclipse 6.3

Discussion created by John Pitz on Mar 3, 2011
Latest reply on Mar 10, 2011 by John Pitz
Hello, I am trying to implement a USB stack in a MCF51JM128 Coldfire 1 microcontroller using Codewarrior Eclipse 6.3 (version number read from start menu entry in winxp) and am having a bit of trouble. In order to implement a buffer descriptor table in RAM I need to be able to locate a data structure completely within a single page of RAM. How do you accomplish this? I think it is possible that the data structure also may need to be at the top of the page. Any advice as to the correct way to do this would be greatly appreciated. So far here is what I have tried, This was provided by a tech support person employed by Freescale, however it seems to be putting the variable into ROM. Their original just had R, I added the W for RW: #pragma define_section text ".text" far_absolute RW //RW for readable, writable? __declspec(text) struct BD_ENTRY bufferDescriptor[(NUMENDPOINTS*4)]; Thank you, John

Outcomes