I'm wondering how to use Pragam on MCUXpresso IDE (MKE16Z64xxx4). How should I proceed? I need to put an array of values in Flash.
#pragma ...
const float min_max [23] [2]
=
{
{3.1415, 2.54},
...
};
Solved! Go to Solution.
What kind of attribute do you want to use?
The standard way to tell the compiler special ways for gcc is using __attribute__ (see Using the GNU Compiler Collection (GCC): Common Variable Attributes ).
I hope this helps,
Erich
What kind of attribute do you want to use?
The standard way to tell the compiler special ways for gcc is using __attribute__ (see Using the GNU Compiler Collection (GCC): Common Variable Attributes ).
I hope this helps,
Erich
Read the MCUXpresso Usr Guide. NXP provide macros to help you do this, as described in the chapter on Placing specific code/data items. (Chapter 18.13 in latest user guide).
Erich,
//==================================================
How to allocate " const unsigned char texto[4][128] " in Flash and not in SRAM using MCUXpresso?
I'm using MKE16Z64VLF4
"data"
const unsigned char texto[4][128] = { {0xFF, 0xFF, ... }, {0xFF, 0xFF, ....}, {0xFF, 0xFF, ...}, {0xFF, 0xFF, ...} };
If you are using the default/standard SDK linker files, then all constant objects get placed in FLASH anyway, so you don't need any #pragma.
I hope this helps,
Erich