You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #74, where we could do this automatically in some places.
Like with avr-gcc, programmers should be able to explicitly opt-in to having some data automatically reside in flash.
This may not be strictly necessary depending on whether there is an actual need for marking progmem data explicitly if the compiler does it automatically mostly (as might be the case in #74).
or any number different syntaxes; no thought has really been put into it yet AFAIK.
No changes needed to type system for address space specific references
We won't need to do anything special to the type system to support anything like references that are specific to an address space (i.e. an optional address space quantifier on references &'a [progmem] my_var). If we simply add addrspace(1) attributes to immutable static/constant variables, LLVM will constantly track the address space of all pointers to that variable, and so it will always use the correct memory instructions (i.e. RAM: ld, ldd, program mem: lpm) whenever the pointers are dereferenced.
The text was updated successfully, but these errors were encountered:
Related to #74, where we could do this automatically in some places.
Like with avr-gcc, programmers should be able to explicitly opt-in to having some data automatically reside in flash.
This may not be strictly necessary depending on whether there is an actual need for marking progmem data explicitly if the compiler does it automatically mostly (as might be the case in #74).
Arbitrary example
It could be an attribute like this
or any number different syntaxes; no thought has really been put into it yet AFAIK.
No changes needed to type system for address space specific references
We won't need to do anything special to the type system to support anything like references that are specific to an address space (i.e. an optional address space quantifier on references
&'a [progmem] my_var
). If we simply addaddrspace(1)
attributes to immutable static/constant variables, LLVM will constantly track the address space of all pointers to that variable, and so it will always use the correct memory instructions (i.e. RAM:ld
,ldd
, program mem:lpm
) whenever the pointers are dereferenced.The text was updated successfully, but these errors were encountered: