Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler / firmware : references to other objects via #define don't work #15

Closed
rbrt23 opened this issue Oct 29, 2020 · 1 comment
Closed

Comments

@rbrt23
Copy link

rbrt23 commented Oct 29, 2020

I often ues a construction including #define to create a reference for multiple tables.
the purpose is to have a 'master' - object, holding these references,
and other 'slave' - objects that can resolve the references.
practical example:
the master- objects references sample waveform data, parameters and other stuff stored in different tables,
the slave- objects only needs to reference the master-object to have access to these tables
(instead of for example having to create a lot of attributes, but there are other benefits)

this is pretty critical for what I'm doing right now with axoloti,and doesn't work with AKSO.
example , created with the axoloti-patcher, attached.
define bug.zip

I read about a different bug with #include that might be related.

@rbrt23
Copy link
Author

rbrt23 commented Nov 16, 2020

latest findings:
using #define as in the above example also has some weird side-effects with axoliti:
the 'master' object has to be BEFORE the 'slave' object in axoliti's 'execution-order-geography',
otherwise the patch won't compile because the 'slaves' don't know what's defined in the 'master'
at the moment the patch starts running.
this seems buggy and even if it's not, I absolutely want to avoid this kind of thing,
since I don't feel like loosing my mind contemplating about 'realtime patching vs coding'.

after all, I got to learn a bit more about pointers, and found a way to pass references from 'master' to 'slave' via
pointers...which is probably also way more efficient/elegant.
so,CLOSED.

@rbrt23 rbrt23 closed this as completed Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant