Yes, that's difficult, isn't it? The following product page:
MCF51Jx Product Summary Page
States:
"The ColdFire+ MCF51Jx portfolio is defined by two families that scale from 32 KB to 128 KB of flash with innovative FlexMemory, configurable embedded EEPROM."
There is no match for "eeprom" or "FlexMemory" in any of the MCF51J, MCF51M or MCF51Q Reference Manuals I've got downloaded. There's no App Notes either.
I've now found out that's because I had the MCF51JE and JM manuals, and these features are in the JF, JU, QF and QU parts.
Searching for "FlexMem" does get a match on CodeWarrior, specifically:
http://cache.freescale.com/files/soft_dev_tools/doc/support_info/CW_MCU_10.2_FAQ.pdf?fsrch=1&sr=4
Says :
Additional Example Projects are available on the Web. They can be found in the Self-
Paced Training section on the Training & Support tab of the CW MCU Web page.
http://www.freescale.com/webapp/sps/site
prod_summary.jsp?code=CW-MCU10&tab=Design_Support_Tab)
• Processor Expert Example Project for TWR-K60N512: Includes a CW MCU v10.1
... etc ... and then:
Example Projects for TWR-K40X256-KIT and TWR-K60N512-KIT: Includes CW
MCU v10.1 bare board (no RTOS) projects for TWR-K40X256-KIT and TWRK60N512KIT.
The projects for each kit include: adc_demo, can_loopback_node,
crc_demo, dac12bit_demo, flexbus, flexmem, gpio, hello_world, hscmp, i2c, lptmr,
mcg_demo, pdb_adc_demo, pmc, rtc, sci2can, slcd, tsi, USB_DCD, USB_device,
USB_dual_role, USB_HOST, USB_MAX3353.
That points to:
http://www.freescale.com/files/microcontrollers/software/app_software/code_examples/CW_MCU_v10_1_Exa...
There's a file in there called "flexmem_demo.c" that might do what you want, but it is referencing registers like "FTFL_FCNFG" that I couldn't find in my manuals (but which are in the JF manuals). Searching for "FTFL_FCNFG" gets matches on the ARM-based K50 CPUs, and now looking above at the CW quote above shows it only refers to K40 and K60 parts and not ColdFire ones.
It looks like these features were first put into the "K" parts, and may have recently been added to the MCF51JF and other parts.
You may be able to adapt the Kinetis software I found above to work on the parts you have.
But your first approach should be to find why the Processor Expert code isn't working. That's meant to be the quick way to a working system and is worth pursuing.
If you search in the Processor Expert Forum for "FlexNVM you'll get 20 hits .Read them and ask questions there.
Tom