Shop OBEX P1 Docs P2 Docs Learn Events
Mixing memory models? — Parallax Forums

Mixing memory models?

Jack BuffingtonJack Buffington Posts: 115
edited 2012-11-16 22:14 in Propeller 1
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.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-11-16 22:14
    ... 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. ...

    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.

Sign In or Register to comment.