Hi, there! I'm a beginner with Kinetis. I'm looking for information on how to create/use different RAM sections. I found in the help files a description of "#pragma define section" and "#pragma section begin/end", but I couldn't make it work.
I have 2 purposes for this:
1. Allocate data in external RAM using the FlexBus - I should use adresses 6000-0000 and on;
2. Use the URAM bitband alias region = addresses 2200-0000 and on.
Any tip is welcome. Thansk!
Solved! Go to Solution.
Hello:
Mark is correct that this depends on the compiler.
- For Freescale Kinetis build tools, I recommend you to check application note AN4498.
- When using GCC compiler/linker, you may check the document provided by my colleague Carlos Musich in the next thread:
Such document even includes a FlexBus initialization code.
Or there is also a tutorial by colleague Erich Styger:
Defining Variables at Absolute Addresses with gcc | MCU on Eclipse
I hope this information helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello:
Mark is correct that this depends on the compiler.
- For Freescale Kinetis build tools, I recommend you to check application note AN4498.
- When using GCC compiler/linker, you may check the document provided by my colleague Carlos Musich in the next thread:
Such document even includes a FlexBus initialization code.
Or there is also a tutorial by colleague Erich Styger:
Defining Variables at Absolute Addresses with gcc | MCU on Eclipse
I hope this information helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, Mark & Jorge,
Thank you very much for your comments and links! I'll sure check them!
Your answers raise another question for me:why TWO tool chains? What are the pros/cons in using one or the other? I assume that if one was clearly superior, there would be only this one, right? Please comment!
Best regards,
Jorge d'Avila
Jorge
Freescale has recently (within last year or two) "standardised" on GCC for CW and KDS so generally this is what is used.
However there are many compilers - some which produce tighter code or which are approved for safety critical work (if that is possible) which may be used instead in projects with high demands (or out of general preference).
Regards
Mark
Jorge
The method is compiler dependent so you will need to specifiy your tool chain (if CodeWarrior there are Metroworks and GCC compilers used which use different methods - it is also probably better to post in the CodeWarrrior forum for such questions).
If possible, it is more portable to use pointers to address the ranges so that there are no special configurations needed.
Regards
Mark