Kinetis K RAM sections

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Kinetis K RAM sections

跳至解决方案
850 次查看
jorged_avila
Contributor II

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!

标签 (1)
0 项奖励
1 解答
588 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

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:

SRAM

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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
4 回复数
589 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

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:

SRAM

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
588 次查看
jorged_avila
Contributor II

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

0 项奖励
588 次查看
mjbcswitzerland
Specialist V

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

588 次查看
mjbcswitzerland
Specialist V

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