SPT 8 fail to detect entry point of elf

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

SPT 8 fail to detect entry point of elf

Jump to solution
150 Views
mastupristi
Senior Contributor I

Hello,,

SPT seems to misdetect the entry point of one of my elf

mastupristi_0-1720695479200.png

the popup reports 0x0000 as the entry point while readelf correctly detects it at 0x30002101

mastupristi_1-1720695607271.png

even exporting the binary data from the .vector section I find the right entry point

mastupristi_2-1720696491877.png

The doubt I have is that my .vector section will have to reside in ITC (VMA 0x0000) and has LMA 0x300508c4

 

in linker script:

mastupristi_3-1720697163413.png

 

If this was the problem how can I deal with it?

 

EDIT:

I tried placing the .vector section in flash (at 0x30002000), modifying the linker script. By doing this, SPT 8 no longer detects problems. However we have to have the .vectors section in ITC for application needs, so I guess this must be considered a bug. Besides, SPT 7 and SPT 6 have always worked correctly with my elfs.

 

best regards

Max

 

 

0 Kudos
Reply
1 Solution
136 Views
liborukropec
NXP Employee
NXP Employee

Hello Massimiliano,

I did a quick test and I can see the same error in v8 and no error for the "upcoming" version. So without further deep analysis it looks like an error in the tool or underlying library, than in your application.

At this moment I do not see other workaround other than using fake source image, e.g.

  1. copy <SEC_INSTALL>\bin\_internal\data\targets\MIMXRT1176\source_images\evkmimxrt1170_iled_blinky_cm7_QSPI_FLASH.s19 to destination where the final SREC (if you can convert elf to SREC)
    1. conversion of elf to srec can be done using `nxpimage utils binary-image convert -i source.elf -o target.s19-f S19`
      nxpimage is located in <SEC_INSTALL>/bin/_internal/tools/spsdk
  2. select on Build tab this SREC, hit build button
  3. on Write tab write the application (or just update the write script)
  4. Close Sec GUI
  5. replace the SREC file with your application
  6. double check / tweak the BD file in the <workspace>/bd_files/<yourapp>.bd
  7. edit <workspace>/write_image_* script and manually tweak the erase region size (it will be bigger than the example app)
  8. manually execute the build and then write script from command line

 

Migrate to SEC to v9, once it is available (~1 month - I cannot promise exact date).

Regards,

Libor

View solution in original post

0 Kudos
Reply
1 Reply
137 Views
liborukropec
NXP Employee
NXP Employee

Hello Massimiliano,

I did a quick test and I can see the same error in v8 and no error for the "upcoming" version. So without further deep analysis it looks like an error in the tool or underlying library, than in your application.

At this moment I do not see other workaround other than using fake source image, e.g.

  1. copy <SEC_INSTALL>\bin\_internal\data\targets\MIMXRT1176\source_images\evkmimxrt1170_iled_blinky_cm7_QSPI_FLASH.s19 to destination where the final SREC (if you can convert elf to SREC)
    1. conversion of elf to srec can be done using `nxpimage utils binary-image convert -i source.elf -o target.s19-f S19`
      nxpimage is located in <SEC_INSTALL>/bin/_internal/tools/spsdk
  2. select on Build tab this SREC, hit build button
  3. on Write tab write the application (or just update the write script)
  4. Close Sec GUI
  5. replace the SREC file with your application
  6. double check / tweak the BD file in the <workspace>/bd_files/<yourapp>.bd
  7. edit <workspace>/write_image_* script and manually tweak the erase region size (it will be bigger than the example app)
  8. manually execute the build and then write script from command line

 

Migrate to SEC to v9, once it is available (~1 month - I cannot promise exact date).

Regards,

Libor

0 Kudos
Reply