Guest nomadicWhale Posted September 9, 2004 Report Share Posted September 9, 2004 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?thanksnW Quote Link to comment Share on other sites More sharing options...
TK. Posted September 9, 2004 Report Share Posted September 9, 2004 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. Quote Link to comment Share on other sites More sharing options...
Guest nomadicWhale Posted September 11, 2004 Report Share Posted September 11, 2004 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?thanksnW Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.