Target Processor: K22F 1M flash, 64 pin.
Tools: KDS and FRDM-K22F
Debugger Hardware: Have them all.
I want to store large amounts of data to the upper regions of flash memory. For example, audio wave data from 128K up to maximum of FRDM-K22F (512K).
Note that I do not want to use any flash programming function in my code. I want to place it in upper memory as a static object.
I can do this with uVison and uLink by loading the .bin data file, setting the memory locations, and using the integrated uVision flash tool. I then set my linker file to the end of code address of 128K-1 and I can load and debug the program without disturbing the data.
Now I want to do this with KDS and FRDM-K22F. But don't know if this is possible.
Please advise.
解決済! 解決策の投稿を見る。
I have a solution.
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000198
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0 //was 0x0007FBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
Hi BC Stewart,
Please refer to this document, it will help you to solve you problems:
https://community.nxp.com/docs/DOC-104433
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
You still don't understand my question.
I want to place binary data into the upper flash memory. This data will
remain static. The linker will be changed.
*How do I directly program binary data into flash? * Code Warrior used
to have a flash utility program.
Hi BC,
If you just want to download the binary data to the flash, you don't need to use the KDS.
After checking it with our KDS engineer, the KDS have the .bin file download problem.
I suggest you generate the .bin file at first, then use the JLINK commander associated with JLINK debugger to download it.
The JLINK commander can input this command to download the code:
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you. That is a good solution.
Brad
Hi Brad,
If you still have question about it, please kindly let me know.
If your question is solved, please help me to mark the correct answer, just to close this case, thank you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I have a solution.
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000198
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0 //was 0x0007FBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
This only answers part of the question.
How do I program data directly to Flash memory from the flash programmer
in KDS?
Brad
Hi Brad,
As you know, if you want to use the KDS download the code to the flash, you need to download the whole project generated code to the flash, not just partial.
So, you need to add modify the ld file, then defined the data to the defined flash area, then when you download the whole project to the flash, your data will be also downloaded to the specific flash address.
In KDS, after build the code, configure the debug configuration, select the according debugger which you are using, then click debug button, you will download all the project code to the flash.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------