This command can be found in PEmicro's PROG software and within NXP's Codewarrior or Kinetis Design Stuio (KDS) Debug Configurations under the Advanced Options. Users should read the chip's reference manual for the Flash Memory Module and look at the EEPROM Data Set Size Register and the FlexNVM Partition Code register.
The EEPROM data Set size may have the EEESPLIT register. If the EEESPLIT register is missing for your chip, then assume the value of 0x3. But all chips have the EEESIZE register. Figure out how much EEPROM you wish to use and determine the hex value (from 0x0 to 0xF). Combine the EEESPLIT and EEESIZE register values to have a 6-bit hex value (from 0x00 to 0x3F).
The FlexNVM Partition Code has just one register called DEPART. This value ranges from 0x00 to 0x0F.
Combine the EEPROM Data Set Register value with the FlexNVM Partition Code Register value and you have the 4 hex values you need to send to the Partition command. Giving an invalid 4-hex value will give an error and not partition the FlexNVM. When using PEmicro's PROG software, after calling the partition command with valid values use the erase command EM (erase module) to complete the partition process.
For example on the K20DX128m5, the value of 0x3308 means EEEPROM is split half and half between subsystem A and B. The EEPROM Size as 2,048 Bytes or 0x800. The DEPART value is set to 0 KB of DFLASH and 64 KB of EEPROM backup. After partitioning, you will see that there is no DFLASH at address 0x10000000 - 0x10007FFF, and max EEPROM size at address 0x14000000 - 0x140007FF.
Within Codewarrior or KDS software, there will also be an option to preserve the partitioning after each attempt to flash program. With this checkbox the debugger will not repartition the FlexNVM. However the contents of DFLASH and EEPROM will still be erased. See Preserve Range on how to preserve data. Note, preserving data that is no longer valid in new partitioned memory will cause a program failure.
Within PEmicro's software, as long as the DFLASH algorithm indicates Preserve Partition, then the partitioning will not be changed unless the partitioning command is called.