Mixing memory models?
Jack Buffington
Posts: 115
I hope you guys aren't getting tired of all of my questions... Let me know if I am pushing it.
I think that I know the answer to this one but want to make sure. Is it possible to mix memory models? In my situation, I would like the program for one COG to compile in COG mode because I need some raw speed and can't afford to compile under LMM. On the other hand, another COG will need to handle driving a display and doing graphics so I'm not sure that it can compile down to fit into one COG. I would assume that I would need to compile in LMM mode for that COG. Is it possible for these two situations to exist inside of one project?
I see from the toggle demos that I can mix assembly and LMM code, which would give me the speed and code size that I am looking for but it would be much nicer to just write things in C for all of the COGs.
I think that I know the answer to this one but want to make sure. Is it possible to mix memory models? In my situation, I would like the program for one COG to compile in COG mode because I need some raw speed and can't afford to compile under LMM. On the other hand, another COG will need to handle driving a display and doing graphics so I'm not sure that it can compile down to fit into one COG. I would assume that I would need to compile in LMM mode for that COG. Is it possible for these two situations to exist inside of one project?
I see from the toggle demos that I can mix assembly and LMM code, which would give me the speed and code size that I am looking for but it would be much nicer to just write things in C for all of the COGs.
Comments
Yes. You can have .cogc files in a project that run in cogs. This is one example.
That example the toggle_fw.c file is the COG program.