AnsweredAssumed Answered

Problems porting AN4368 to Kinetis KN22

Question asked by Angelo Quattrociocchi on Aug 5, 2014
Latest reply on Aug 8, 2014 by Robert Hana

I have been trying to port the code in the AN4368 project from the K60 target to a K22 target.  I managed to get the project to compile after changing the definitions header and lcf, etc. as well as changing a number of register names throughout the code to work with the K22.  However when I go to program the device with a P&E Micro Multilink Universal, I get errors as shown below.  (I didn't change the name of the debug configuration from K60...)

 

I'm not sure if this is some issue with the linker, or my programmer settings?  Any thoughts?

 

 

 

=== CodeWarrior GDI protocol log ===

GDI DLL: C:\Freescale\CW MCU v10.2\MCU\bin\Plugins\Debugger\protocols\..\..\support\arm\gdi\arm_pne_gdi.dll

CPU: K20FN1M0

 

GDI: DiGdiOpen()

GDI: => DI_OK

GDI: DiGdiGetFeatures()

GDI: => DI_OK

GDI: Identification: ARM Cortex M4 P&E to GDI wrapper, Version: 1.0.1, MeeAvailable: true, NrCpusAvailable: 1

GDI: DiGdiAddCallBack(cb_type = 0x4000)

GDI: => DI_OK

GDI: DiGdiInitIO()

GDI: Mtwks Callback(MTWKS_CB_SETMEEID, 1) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : CWDBG, Entry : LaunchConfiguration, Value : Kinetis_MK60N512VMD100_bootloader_host MK60N512VMD100_INTERNAL_FLASH, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DO_DEBUG_OUTPUT, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DEPENDENCY_CHECK, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : UUID, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : CWDBG, Entry : Processor, Value : K20FN1M0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ERASE_PROGRAM_WITHOUT_ASKING, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : AUTO_SYNC, Value : 1, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DOTRIM, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : CURRENT_ALGORITHM_INDEX, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_START, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_END, Value : 3, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_ACTIVE, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_START, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_END, Value : 3, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_ACTIVE, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_START, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_END, Value : 3, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_ACTIVE, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : K20FN1M0, Entry : PRESERVE_EEPROM_START, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : K20FN1M0, Entry : PRESERVE_EEPROM_END, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : K20FN1M0, Entry : PRESERVE_EEPROM, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ALTERNATIVE_ALGORITHM_PATH, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ALTERNATIVE_ALGORITHM_CHECKBOX, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PARTITION_PARAM, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DO_PARTITIONING, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : CUSTOM_TRIM, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : K20FN1M0, Entry : TRIM_VALUE, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY, Value : 3276800, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ENABLE_FLASH_PROGRAMMING_DIALOG, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_OK

INF: Ethernet functionality not enabled - Socket Error # 10065  No route to host.

INF: Windows NT detected.

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : IO_DELAY_CNT, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP12, Entry : show_hstep_assembly_details, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : CWDBG, Entry : Connect, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : eclipse_show_connection_assistant, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_FX, Value : 4, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_NORMAL, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_OSJTAG, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_CYCLONE, Value : 3, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_TRACELINK, Value : 3, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_LIGHTNING, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : RESET_DELAY, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : PORT, Value : 21, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : interface_selection, Value : 1, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PORT, Entry : IP, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FORCE_MASS_ERASE, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : USE_SWD, Value : 0, R) => DI_OK

GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CPUTARGETTYPENAME, Value : HFSUIDFH5390FJIfnsdofnfjsdoiFHSIDO, R) => DI_ERR_NONFATAL

INF: P&E Interface detected - Flash Version 6.10

INF: Device is K20FN1M0.

INF: Mode is In-Circuit Debug.

GDI: => DI_OK

GDI: DiMeeConnect(exec_env_id = 1)

GDI: => DI_OK

GDI: DiExecGetStatus(cpu_status = (cause = GDI_WAIT_MISCELLANEOUS, brkpt_id = 0, reason = unknown state))

GDI: DiRegisterRead(PC (id:0xF))

GDI: => DI_OK

GDI: PC (id:0xF) -> 0xFFFFFFFE

GDI: DiRegisterRead(SP (id:0xD))

GDI: => DI_OK

GDI: SP (id:0xD) -> 0xFFFFFFFC

GDI: DiRegisterRead(LR (id:0xE))

GDI: => DI_OK

GDI: LR (id:0xE) -> 0xFFFFFFFF

GDI: DiRegisterRead(XPSR (id:0x10))

GDI: => DI_OK

GDI: XPSR (id:0x10) -> 0x1000000

GDI: DiMemoryRead(addr = 0xFFFFFF00, space = 1, mem_items = 256, size = 1)

GDI: => DI_ERR_NONFATAL

GDI: A bus error occurred while accessing memory

GDI: DiMemoryDownload(StartDownload)

GDI: => DI_ERR_FATAL

GDI: A bus error occurred while accessing memory

Outcomes