Flashing fails for S32K142

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flashing fails for S32K142

940 Views
robot_wrangler
Contributor I

I am trying to flash a custom PCB that has an S32K142 controller on it. I am using S32DS (3.6.1) and a PE Micro Multilink Universal FX (Rev C) to flash it via the debug option in S32DS. I have been able to compile the project and have the .elf file generated. When I try to run the debug option, I see the following error on the Console:

 
Connection from "127.0.0.1" via 127.0.0.1. Connection from port "62108" to 6224

Connection from "127.0.0.1" via 127.0.0.1. Connection from port "62109" to 7224

Telnet server running on 127.0.0.1:51794

Requesting next symbol pxCurrentTCB

 Symbol pxCurrentTCB found. (0x200000F4)

Requesting next symbol pxReadyTasksLists

 Symbol pxReadyTasksLists found. (0x20000100)

Requesting next symbol xDelayedTaskList1

 Symbol xDelayedTaskList1 found. (0x200001B8)

Requesting next symbol xDelayedTaskList2

 Symbol xDelayedTaskList2 found. (0x200001CC)

Requesting next symbol xPendingReadyList

 Symbol xPendingReadyList found. (0x200001EC)

Requesting next symbol uxCurrentNumberOfTasks

 Symbol uxCurrentNumberOfTasks found. (0x200001A0)

Requesting next symbol uxDeletedTasksWaitingCleanUp

 Symbol uxDeletedTasksWaitingCleanUp found. (0x200001A4)

Requesting next symbol xSuspendedTaskList

 Symbol xSuspendedTaskList found. (0x20000204)

Requesting next symbol xSchedulerRunning

 Symbol xSchedulerRunning found. (0x20000200)

Requesting next symbol FreeRTOSDebugConfig

 Symbol FreeRTOSDebugConfig not found.

Requesting next symbol _tx_thread_current_ptr

 Symbol _tx_thread_current_ptr not found.

Requesting next symbol _tx_thread_created_ptr

 Symbol _tx_thread_created_ptr not found.

Requesting next symbol _tx_thread_created_count

 Symbol _tx_thread_created_count not found.

Requesting next symbol _tx_thread_system_state

 Symbol _tx_thread_system_state not found.

USING FREERTOS CORTEX-M DRIVERS

Successfully initialized kernel symbols. FreeRTOS analysis enabled.

Unable to load libusb0.dll 

Copyright 2025 P&E Microcomputer Systems,Inc.

Command Line :C:\NXP\S32DS.3.6.1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne.expansion_6.0.3.202506131845\win32\pegdbserver_console -device=NXP_S32K1xx_S32K142WF256M8 -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK �

PEmicro Interface detected - Flash Version 11.52 



CMD>RE



Initializing.

INFO: DAP IDCODE = 0x2BA01477 

INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000040 

Target has been RESET and is active.

CMD>CM C:\NXP\S32DS.3.6.1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne.expansion_6.0.3.202506131845\supportFiles_ARM\NXP\S32K1xx\nxp_s32k142wf256m8_pflash_dflash_eeprom.arp



Initializing.

INFO: DAP IDCODE = 0x2BA01477 

INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000040 

Initialized.



;version 1.02, 09/13/2024, Copyright 2024 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [s32k142wf256m8_x_pflash_dflash_eeprom]



;device nxp, s32k142wf256m8, pflash_dflash_eeprom



;begin_cs device=$00000000, length=$14001000, ram=$1FFFC000



Loading programming algorithm ... 

Done.

Programming sequency is : erase, blank check, program, and verify {default} 

CMD>VC

Verifying object file CRC-16 to device ranges ... 

 block 00000000-000079E3 ... 

Calculated CRC-16 does not match block. (File = $CA0D, Device = $3416) 

Current content of flash does not match application to be programmed 



CMD>EM



Erasing.

Module has been erased.

Reloading programming algorithm ... 

done.

CMD>PM



Programming.



Checking range of data. 

Checked.

Processing Object File Data ... 





. 

Programmed.

CMD>VC

Verifying object file CRC-16 to device ranges ... 

 block 00000000-000079E3 ... 

Calculated CRC-16 does not match block. (File = $CA0D, Device = $3416) 

Error verifying flash of device 

Error occured during Flash programming. 

INFO: DAP IDCODE = 0x2BA01477 

INFO: DAP successfully powered up. DP CTRL/STAT = 0xF0000040 



PEmicro GDB Launch Failure : Error during flash programming. Terminating debug session.



PE-ERROR: Error downloading to the device. Terminating debug session.

Number of threads 1 (Scheduler not yet running)

Number of threads 1 (Scheduler not yet running)

Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "62108" from 6224

Disconnected from "127.0.0.1" via 127.0.0.1. Disconnection by port "62109" from 7224

INFO: DAP IDCODE = 0x2BA01477 

Target Disconnected.


Under the Problems tab, I see 1 warning:

Unknown referenced nature: com.freescale.processorexpert.core.expertprojectnature.


Under the Debugger Console, I see the following:

 
GNU gdb (GDB build.sh rev=g01b30c3 s=L631 -i /opt/freescale Earmv7 -V release_g01b30c3_build_Fed_Earmv7 (BLD = 1620)) 7.12.1

Copyright (C) 2017 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word".

monitor setexceptioncatching 2033

monitor selectcore 0

continue

The program is not being run.

monitor refreshviews

"monitor" command not supported by this target.

continue

The program is not being run.


I am not sure where to begin trying to debug this issue. I understand the error itself, but I don't know if it's because of an IDE config issue or a hardware issue. How do I debug this? Any help would be appreciated.

0 Kudos
Reply
4 Replies

530 Views
Jason88619
Contributor II

How did you solve this problem? I'm now facing the same issue as you.

0 Kudos
Reply

904 Views
robot_wrangler
Contributor I
@davidtosenovjan I will reach out to them, but I also see the CRC-16 issue. Could you help me understand how I can resolve this issue, or point me to any NXP resources for the issue?
0 Kudos
Reply

802 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you tried to create new empty project for S32K142 and test ti with that? 

0 Kudos
Reply

911 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

According error message "Unable to load libusb0.dll" I would try to re-install PeMicro MULTILINK driver.

Possibly you could try to contact PeMicro support, they certainly could know the right solution for this:
https://www.pemicro.com/support/index.cfm

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2166020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFlashing%20fails%20for%20S32K142%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2166020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20trying%20to%20flash%20a%20custom%20PCB%20that%20has%20an%20S32K142%20controller%20on%20it.%20I%20am%20using%20S32DS%20(3.6.1)%20and%20a%20PE%20Micro%20Multilink%20Universal%20FX%20(Rev%20C)%20to%20flash%20it%20via%20the%20debug%20option%20in%20S32DS.%20I%20have%20been%20able%20to%20compile%20the%20project%20and%20have%20the%20.elf%20file%20generated.%20When%20I%20try%20to%20run%20the%20debug%20option%2C%20I%20see%20the%20following%20error%20on%20the%20Console%3A%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EConnection%20from%20%22127.0.0.1%22%20via%20127.0.0.1.%20Connection%20from%20port%20%2262108%22%20to%206224%0A%0AConnection%20from%20%22127.0.0.1%22%20via%20127.0.0.1.%20Connection%20from%20port%20%2262109%22%20to%207224%0A%0ATelnet%20server%20running%20on%20127.0.0.1%3A51794%0A%0ARequesting%20next%20symbol%20pxCurrentTCB%0A%0A%20Symbol%20pxCurrentTCB%20found.%20(0x200000F4)%0A%0ARequesting%20next%20symbol%20pxReadyTasksLists%0A%0A%20Symbol%20pxReadyTasksLists%20found.%20(0x20000100)%0A%0ARequesting%20next%20symbol%20xDelayedTaskList1%0A%0A%20Symbol%20xDelayedTaskList1%20found.%20(0x200001B8)%0A%0ARequesting%20next%20symbol%20xDelayedTaskList2%0A%0A%20Symbol%20xDelayedTaskList2%20found.%20(0x200001CC)%0A%0ARequesting%20next%20symbol%20xPendingReadyList%0A%0A%20Symbol%20xPendingReadyList%20found.%20(0x200001EC)%0A%0ARequesting%20next%20symbol%20uxCurrentNumberOfTasks%0A%0A%20Symbol%20uxCurrentNumberOfTasks%20found.%20(0x200001A0)%0A%0ARequesting%20next%20symbol%20uxDeletedTasksWaitingCleanUp%0A%0A%20Symbol%20uxDeletedTasksWaitingCleanUp%20found.%20(0x200001A4)%0A%0ARequesting%20next%20symbol%20xSuspendedTaskList%0A%0A%20Symbol%20xSuspendedTaskList%20found.%20(0x20000204)%0A%0ARequesting%20next%20symbol%20xSchedulerRunning%0A%0A%20Symbol%20xSchedulerRunning%20found.%20(0x20000200)%0A%0ARequesting%20next%20symbol%20FreeRTOSDebugConfig%0A%0A%20Symbol%20FreeRTOSDebugConfig%20not%20found.%0A%0ARequesting%20next%20symbol%20_tx_thread_current_ptr%0A%0A%20Symbol%20_tx_thread_current_ptr%20not%20found.%0A%0ARequesting%20next%20symbol%20_tx_thread_created_ptr%0A%0A%20Symbol%20_tx_thread_created_ptr%20not%20found.%0A%0ARequesting%20next%20symbol%20_tx_thread_created_count%0A%0A%20Symbol%20_tx_thread_created_count%20not%20found.%0A%0ARequesting%20next%20symbol%20_tx_thread_system_state%0A%0A%20Symbol%20_tx_thread_system_state%20not%20found.%0A%0AUSING%20FREERTOS%20CORTEX-M%20DRIVERS%0A%0ASuccessfully%20initialized%20kernel%20symbols.%20FreeRTOS%20analysis%20enabled.%0A%0AUnable%20to%20load%20libusb0.dll%20%0A%0ACopyright%202025%20P%26amp%3BE%20Microcomputer%20Systems%2CInc.%0A%0ACommand%20Line%20%3AC%3A%5CNXP%5CS32DS.3.6.1%5Ceclipse%5Cplugins%5Ccom.pemicro.debug.gdbjtag.pne.expansion_6.0.3.202506131845%5Cwin32%5Cpegdbserver_console%20-device%3DNXP_S32K1xx_S32K142WF256M8%20-startserver%20-singlesession%20-serverport%3D7224%20-gdbmiport%3D6224%20-interface%3DUSBMULTILINK%20%EF%BF%BD%0A%0APEmicro%20Interface%20detected%20-%20Flash%20Version%2011.52%20%0A%0A%0A%0ACMD%26gt%3BRE%0A%0A%0A%0AInitializing.%0A%0AINFO%3A%20DAP%20IDCODE%20%3D%200x2BA01477%20%0A%0AINFO%3A%20DAP%20successfully%20powered%20up.%20DP%20CTRL%2FSTAT%20%3D%200xF0000040%20%0A%0ATarget%20has%20been%20RESET%20and%20is%20active.%0A%0ACMD%26gt%3BCM%20C%3A%5CNXP%5CS32DS.3.6.1%5Ceclipse%5Cplugins%5Ccom.pemicro.debug.gdbjtag.pne.expansion_6.0.3.202506131845%5CsupportFiles_ARM%5CNXP%5CS32K1xx%5Cnxp_s32k142wf256m8_pflash_dflash_eeprom.arp%0A%0A%0A%0AInitializing.%0A%0AINFO%3A%20DAP%20IDCODE%20%3D%200x2BA01477%20%0A%0AINFO%3A%20DAP%20successfully%20powered%20up.%20DP%20CTRL%2FSTAT%20%3D%200xF0000040%20%0A%0AInitialized.%0A%0A%0A%0A%3Bversion%201.02%2C%2009%2F13%2F2024%2C%20Copyright%202024%20P%26amp%3BE%20Microcomputer%20Systems%2C%20Inc.%20All%20rights%20reserved.%20www.pemicro.com%20%5Bs32k142wf256m8_x_pflash_dflash_eeprom%5D%0A%0A%0A%0A%3Bdevice%20nxp%2C%20s32k142wf256m8%2C%20pflash_dflash_eeprom%0A%0A%0A%0A%3Bbegin_cs%20device%3D%2400000000%2C%20length%3D%2414001000%2C%20ram%3D%241FFFC000%0A%0A%0A%0ALoading%20programming%20algorithm%20...%20%0A%0ADone.%0A%0AProgramming%20sequency%20is%20%3A%20erase%2C%20blank%20check%2C%20program%2C%20and%20verify%20%7Bdefault%7D%20%0A%0ACMD%26gt%3BVC%0A%0AVerifying%20object%20file%20CRC-16%20to%20device%20ranges%20...%20%0A%0A%20block%2000000000-000079E3%20...%20%0A%0ACalculated%20CRC-16%20does%20not%20match%20block.%20(File%20%3D%20%24CA0D%2C%20Device%20%3D%20%243416)%20%0A%0ACurrent%20content%20of%20flash%20does%20not%20match%20application%20to%20be%20programmed%20%0A%0A%0A%0ACMD%26gt%3BEM%0A%0A%0A%0AErasing.%0A%0AModule%20has%20been%20erased.%0A%0AReloading%20programming%20algorithm%20...%20%0A%0Adone.%0A%0ACMD%26gt%3BPM%0A%0A%0A%0AProgramming.%0A%0A%0A%0AChecking%20range%20of%20data.%20%0A%0AChecked.%0A%0AProcessing%20Object%20File%20Data%20...%20%0A%0A%0A%0A%0A%0A.%20%0A%0AProgrammed.%0A%0ACMD%26gt%3BVC%0A%0AVerifying%20object%20file%20CRC-16%20to%20device%20ranges%20...%20%0A%0A%20block%2000000000-000079E3%20...%20%0A%0ACalculated%20CRC-16%20does%20not%20match%20block.%20(File%20%3D%20%24CA0D%2C%20Device%20%3D%20%243416)%20%0A%0AError%20verifying%20flash%20of%20device%20%0A%0AError%20occured%20during%20Flash%20programming.%20%0A%0AINFO%3A%20DAP%20IDCODE%20%3D%200x2BA01477%20%0A%0AINFO%3A%20DAP%20successfully%20powered%20up.%20DP%20CTRL%2FSTAT%20%3D%200xF0000040%20%0A%0A%0A%0APEmicro%20GDB%20Launch%20Failure%20%3A%20Error%20during%20flash%20programming.%20Terminating%20debug%20session.%0A%0A%0A%0APE-ERROR%3A%20Error%20downloading%20to%20the%20device.%20Terminating%20debug%20session.%0A%0ANumber%20of%20threads%201%20(Scheduler%20not%20yet%20running)%0A%0ANumber%20of%20threads%201%20(Scheduler%20not%20yet%20running)%0A%0ADisconnected%20from%20%22127.0.0.1%22%20via%20127.0.0.1.%20Disconnection%20by%20port%20%2262108%22%20from%206224%0A%0ADisconnected%20from%20%22127.0.0.1%22%20via%20127.0.0.1.%20Disconnection%20by%20port%20%2262109%22%20from%207224%0A%0AINFO%3A%20DAP%20IDCODE%20%3D%200x2BA01477%20%0A%0ATarget%20Disconnected.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3EUnder%20the%20Problems%20tab%2C%20I%20see%201%20warning%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EUnknown%20referenced%20nature%3A%20com.freescale.processorexpert.core.expertprojectnature.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3EUnder%20the%20Debugger%20Console%2C%20I%20see%20the%20following%3A%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGNU%20gdb%20(GDB%20build.sh%20rev%3Dg01b30c3%20s%3DL631%20-i%20%2Fopt%2Ffreescale%20Earmv7%20-V%20release_g01b30c3_build_Fed_Earmv7%20(BLD%20%3D%201620))%207.12.1%0A%0ACopyright%20(C)%202017%20Free%20Software%20Foundation%2C%20Inc.%0A%0ALicense%20GPLv3%2B%3A%20GNU%20GPL%20version%203%20or%20later%20%26lt%3B%26gt%3B%0A%0AThis%20is%20free%20software%3A%20you%20are%20free%20to%20change%20and%20redistribute%20it.%0A%0AThere%20is%20NO%20WARRANTY%2C%20to%20the%20extent%20permitted%20by%20law.%20Type%20%22show%20copying%22%0A%0Aand%20%22show%20warranty%22%20for%20details.%0A%0AThis%20GDB%20was%20configured%20as%20%22--host%3Di686-w64-mingw32%20--target%3Darm-none-eabi%22.%0A%0AType%20%22show%20configuration%22%20for%20configuration%20details.%0A%0AFor%20bug%20reporting%20instructions%2C%20please%20see%3A%0A%0A%26lt%3B%26gt%3B.%0A%0AFind%20the%20GDB%20manual%20and%20other%20documentation%20resources%20online%20at%3A%0A%0A%26lt%3B%26gt%3B.%0A%0AFor%20help%2C%20type%20%22help%22.%0A%0AType%20%22apropos%20word%22%20to%20search%20for%20commands%20related%20to%20%22word%22.%0A%0Amonitor%20setexceptioncatching%202033%0A%0Amonitor%20selectcore%200%0A%0Acontinue%0A%0AThe%20program%20is%20not%20being%20run.%0A%0Amonitor%20refreshviews%0A%0A%22monitor%22%20command%20not%20supported%20by%20this%20target.%0A%0Acontinue%0A%0AThe%20program%20is%20not%20being%20run.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3EI%20am%20not%20sure%20where%20to%20begin%20trying%20to%20debug%20this%20issue.%20I%20understand%20the%20error%20itself%2C%20but%20I%20don't%20know%20if%20it's%20because%20of%20an%20IDE%20config%20issue%20or%20a%20hardware%20issue.%20How%20do%20I%20debug%20this%3F%20Any%20help%20would%20be%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2188753%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flashing%20fails%20for%20S32K142%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2188753%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHow%20did%20you%20solve%20this%20problem%3F%20I'm%20now%20facing%20the%20same%20issue%20as%20you.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2167907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flashing%20fails%20for%20S32K142%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2167907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECould%20you%20tried%20to%20create%20new%20empty%20project%20for%26nbsp%3BS32K142%20and%20test%20ti%20with%20that%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2166106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flashing%20fails%20for%20S32K142%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2166106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52613%22%20target%3D%22_blank%22%3E%40davidtosenovjan%3C%2FA%3E%20I%20will%20reach%20out%20to%20them%2C%20but%20I%20also%20see%20the%20CRC-16%20issue.%20Could%20you%20help%20me%20understand%20how%20I%20can%20resolve%20this%20issue%2C%20or%20point%20me%20to%20any%20NXP%20resources%20for%20the%20issue%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2166061%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flashing%20fails%20for%20S32K142%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2166061%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAccording%20error%20message%20%22Unable%20to%20load%20libusb0.dll%22%20I%20would%20try%20to%20re-install%20PeMicro%20MULTILINK%20driver.%3C%2FP%3E%0A%3CP%3EPossibly%20you%20could%20try%20to%20contact%20PeMicro%20support%2C%20they%20certainly%20could%20know%20the%20right%20solution%20for%20this%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.pemicro.com%2Fsupport%2Findex.cfm%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.pemicro.com%2Fsupport%2Findex.cfm%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E