Jump to content

available memory for application


Guest nomadicWhale

Recommended Posts

Guest nomadicWhale

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest nomadicWhale

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...