cancel
Showing results for 
Search instead for 
Did you mean: 

How could I read out the hex file from SPC560P34L1CEFA?

Zhang Lei
Associate II
Posted on October 26, 2017 at 09:07

How could I read out the hex file from SPC560P34L1CEFA?

#hex
10 REPLIES 10
Erwan YVIN
ST Employee
Posted on October 26, 2017 at 10:10

Hello Zhang ,

Yes , it should be ok for an uncensored chip.

for a censored one , you need the password.

You should take the hand with a debugger 

Example : for PLS , there is a Macro SaveHex <file> <range>

I have never tested this feature.

            Best Regards

                     Erwan

Posted on October 27, 2017 at 03:41

I got the following information:

'_______________________________________________________

'

'    SaveHEX command line function

'

'    generates intel-HEX file

'

'    command line SaveHex output-file range1 [range2] [range3] .....

'    range description:

'        <startaddress>,<length>

'_______________________________________________________

Sub SaveHEX(File,ParameterObj)

    set debugger = workspace.Coredebugger(0)

    set DisASMObj = debugger.DisASMObj

    If Not IsObject(ParameterObj) Then

          MsgBox ''Number of parameters wrong''

        Exit Sub         

    End If

    If IsNumeric(File) Then

          MsgBox ''File parameter wrong - '' & File

        Exit Sub         

    End If

    DisASMObj.OutputPath = CStr(File)

    bRetVal = DisASMObj.CreateStream(True,''UDE generated intel-Hex file of current Program'',False)

    If bRetVal = True Then

        ParmeterCnt = ParameterObj.ParameterCount

        If ParmeterCnt = 0 Then

              MsgBox ''Number of parameters wrong '' & ParmeterCnt

            Exit Sub         

        End If

        If ( ParmeterCnt Mod 2 ) <> 0 Then

              MsgBox ''Number of parameters wrong '' & ParmeterCnt

            Exit Sub         

        End If

        RangeCnt = ParmeterCnt/2

        ParamIndex = 0

        For Range = 0 To RangeCnt -1

            Address = CLng(ParameterObj.Parameter(ParamIndex))        

            Length = CLng(ParameterObj.Parameter(ParamIndex +1))

            ParamIndex = ParamIndex +2

             DisASMObj.AddRange Address,Length,0

        Next

        DisASMObj.HexFileModeFlag = True

        DisASMObj.WriteAllRanges(False)

    End If

End Sub

In the following, what should I insert into it? Could I insert something into it like this ''Application.hex 0x0~0x7FFF''?

0690X00000604AOQAY.jpg
Posted on October 27, 2017 at 04:04

The instructions suggest something more like

SaveHEX Application.hex 0,0x8000

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on October 27, 2017 at 04:13

I do it like this: Application.hex 0x0,0x8000

and I got the following error.

0690X00000604AdQAI.jpg
Erwan YVIN
ST Employee
Posted on October 27, 2017 at 10:39

Hello Zhang ,

You have to run the script

there is a button to do that

and check the Windows directory

      Best regards

                Erwan

Posted on October 27, 2017 at 09:38

Hello Zhang ,

You should enter Application.hex,0x0,0x8000

the hex file will be in c:\windows directory.

Are you administrator of your PC ?

           Best regards

  

                         Erwan

Posted on October 27, 2017 at 09:59

Yes, I'm the administrator of my PC and I can install some software in my PC. I enter ''Application.hex,0x0,0x8000'' and after the following it will go to the end.

0690X00000604AiQAI.jpg
Posted on October 27, 2017 at 10:50

I use the following buttons and there is no Application.hex in the Windows directory.

0690X00000604AnQAI.jpg0690X00000604AsQAI.jpg
Posted on October 27, 2017 at 14:01

Hello Zhang ,

No , You should run the macro script not the embedded software.

         Best regards

                            Erwan