Jump to content

available memory for application


Recommended Posts

Guest nomadicWhale
Posted

Hi,

I'm a bit confused about the memory structure in mios/pic.

What is the total amount of memory I can use in my appliation?

what is the code size avaiable?

what is the data size available?

can I put data segments in in the code segments? how?

thanks

nW

Posted

Hi,

I guess that you are refering to the C wrapper, no? Thats an important detail ;-)

the memory allocation is documented in the project.lkr file. All memory locations which are not protected are free for your application.

Data in code segment: in assembler you would just write the data via "dw" directive into the code memory, and access it via tblrd*+ and TABLAT. In C you have to declare a global array with initial data, e.g.

  unsigned char my_table[] = {0x01, 0x02, 0x03};

everything else will be handled by the compiler. Further informations about data handling should be available in the SDCC documentation.

Best Regards, Thorsten.

Guest nomadicWhale
Posted

Thanks TK.

Well, my questions did come from working with the C wrapper though they might interest asm mios programmers.

Cleared things up I think.

From what I understand we have ~18.9KB for code  (that is a lot) and 879 bytes for data. I'm I correct?

thanks

nW

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...