Problems with elf File generated by MCUXpresso

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

Problems with elf File generated by MCUXpresso

Jump to solution
1,805 Views
ChristofAbt
Contributor II

Good afternoon, 

due to problems with the on board debug probe on the FRDM-K66 board and problems of this board with Segger J-Link Plus, I want to use Segger's Ozone and generate the elf file with MCUXPresso. 

After Debug->Start Debug Session -> Download and Reset Program the program should start executing the function main(). The corresponding map file shows that main() starts at 0x428 in the program memory.

extract from frdmk66f_lwip_tcpecho_bm.map

.text.main 0x00000428 0x240 ./source/lwip_tcpecho_bm.o
0x00000428 main

In Ozone at the disassembly window everything looks alright but the code line in the file scope window does not match to the reset conditions. If I understand elf files correctly, the C-code and the corresponding executabble code are linked together. Here, the executable code starts at the right position but is not linked to the corresponding c-code which would be the first non comment or signal declaration line in main().

Thanks in advance for your help

Christof Abt

0 Kudos
Reply
1 Solution
1,763 Views
ChristofAbt
Contributor II

Hello all, 

I have just found out a working designflow with the FRDM-K66F evaluation board. The on board debugger often dies when the board is connected to a Windows 10 computer. I think it is a problem with the software on the additional microcontroller on the board. 

I connected a SEEGER J-link and the connection was established but afterwards the whole system stalled. Yesterday I updated the MCUXpresso IDE to version 24.12.148 and this combination of an external debugger, the FRDM-K66F and the MCUXpresso seems to work. 

My problem is solved!

Thanks for your support

View solution in original post

4 Replies
1,801 Views
ChristofAbt
Contributor II

Sorry, I have forgotten to add the screenshot

ResetOzone.PNG

0 Kudos
Reply
1,764 Views
ChristofAbt
Contributor II

Hello all, 

I have just found out a working designflow with the FRDM-K66F evaluation board. The on board debugger often dies when the board is connected to a Windows 10 computer. I think it is a problem with the software on the additional microcontroller on the board. 

I connected a SEEGER J-link and the connection was established but afterwards the whole system stalled. Yesterday I updated the MCUXpresso IDE to version 24.12.148 and this combination of an external debugger, the FRDM-K66F and the MCUXpresso seems to work. 

My problem is solved!

Thanks for your support

1,759 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello,

I am glad to hear that.  Any new issues, welcome to create a new post.

BRs,

Celeste

0 Kudos
Reply
1,771 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @ChristofAbt ,

Thanks for your post. We don't have Ozone on our side, so I'm unable to replicate your issue in the exactly same way. I used the on-board debugger to debug the axf file generated by MCUXPresso and didn't encounter any problems.

In the .map file:

.text.main 0x000005fc 0x188 ./source/lwip_tcpecho_bm.o

0x000005fc main

Celeste_Liu_0-1743585925978.png

Through the disassembly in the following way.

Celeste_Liu_2-1743586080853.png

 

You can see from the following picture that there is no problem.  

Celeste_Liu_3-1743586356769.png

 

You mentioned that your ELF file was generated by MCUXpresso. Could you please tell me how exactly you generated it?

BRs,

Celeste

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2071184%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblems%20with%20elf%20File%20generated%20by%20MCUXpresso%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2071184%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EGood%20afternoon%2C%26nbsp%3B%3C%2FP%3E%3CP%3Edue%20to%20problems%20with%20the%20on%20board%20debug%20probe%20on%20the%20FRDM-K66%20board%20and%20problems%20of%20this%20board%20with%20Segger%20J-Link%20Plus%2C%20I%20want%20to%20use%20Segger's%20Ozone%20and%20generate%20the%20elf%20file%20with%20MCUXPresso.%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20Debug-%26gt%3BStart%20Debug%20Session%20-%26gt%3B%20Download%20and%20Reset%20Program%20the%20program%20should%20start%20executing%20the%20function%20main().%20The%20corresponding%20map%20file%20shows%20that%20main()%20starts%20at%200x428%20in%20the%20program%20memory.%3C%2FP%3E%3CP%3Eextract%20from%20frdmk66f_lwip_tcpecho_bm.map%3C%2FP%3E%3CP%3E.text.main%200x00000428%200x240%20.%2Fsource%2Flwip_tcpecho_bm.o%3CBR%20%2F%3E0x00000428%20main%3C%2FP%3E%3CP%3EIn%20Ozone%20at%20the%20disassembly%20window%20everything%20looks%20alright%20but%20the%20code%20line%20in%20the%20file%20scope%20window%20does%20not%20match%20to%20the%20reset%20conditions.%20If%20I%20understand%20elf%20files%20correctly%2C%20the%20C-code%20and%20the%20corresponding%20executabble%20code%20are%20linked%20together.%20Here%2C%20the%20executable%20code%20starts%20at%20the%20right%20position%20but%20is%20not%20linked%20to%20the%20corresponding%20c-code%20which%20would%20be%20the%20first%20non%20comment%20or%20signal%20declaration%20line%20in%20main().%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20your%20help%3C%2FP%3E%3CP%3EChristof%20Abt%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2072764%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Problems%20with%20elf%20File%20generated%20by%20MCUXpresso%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2072764%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EI%20am%20glad%20to%20hear%20that.%26nbsp%3B%20Any%20new%20issues%2C%20welcome%20to%20create%20a%20new%20post.%3C%2FP%3E%0A%3CP%3EBRs%2C%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2072755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Problems%20with%20elf%20File%20generated%20by%20MCUXpresso%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2072755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20just%20found%20out%20a%20working%20designflow%20with%20the%20FRDM-K66F%20evaluation%20board.%20The%20on%20board%20debugger%20often%20dies%20when%20the%20board%20is%20connected%20to%20a%20Windows%2010%20computer.%20I%20think%20it%20is%20a%20problem%20with%20the%20software%20on%20the%20additional%20microcontroller%20on%20the%20board.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20connected%20a%20SEEGER%20J-link%20and%20the%20connection%20was%20established%20but%20afterwards%20the%20whole%20system%20stalled.%20Yesterday%20I%20updated%20the%20MCUXpresso%20IDE%20to%20version%2024.12.148%20and%20this%20combination%20of%20an%20external%20debugger%2C%20the%20FRDM-K66F%20and%20the%20MCUXpresso%20seems%20to%20work.%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20problem%20is%20solved!%3C%2FP%3E%3CP%3EThanks%20for%20your%20support%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2072751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Problems%20with%20elf%20File%20generated%20by%20MCUXpresso%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2072751%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F248592%22%20target%3D%22_blank%22%3E%40ChristofAbt%3C%2FA%3E%26nbsp%3B%2C%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EThanks%20for%20your%20post.%26nbsp%3BWe%20don't%20have%20Ozone%20on%20our%20side%2C%20so%20I'm%20unable%20to%20replicate%20your%20issue%20in%20the%20exactly%20same%20way.%20I%20used%20the%20on-board%20debugger%20to%20debug%20the%20axf%20file%20generated%20by%20MCUXPresso%20and%20didn't%20encounter%20any%20problems.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EIn%20the%20.map%20file%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3CDIV%20style%3D%22background-color%3A%20%23ffffff%3B%20padding%3A%200px%200px%200px%202px%3B%22%3E%0A%3CDIV%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23ffffff%3B%20font-family%3A%20'Courier%20New'%3B%20font-size%3A%2010pt%3B%20white-space%3A%20pre%3B%22%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CFONT%20size%3D%224%22%3E.text.main%200x000005fc%200x188%20.%2Fsource%2Flwip_tcpecho_bm.o%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CFONT%20size%3D%224%22%3E0x000005fc%20main%3C%2FFONT%3E%3C%2FP%3E%0A%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_0-1743585925978.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_0-1743585925978.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330971iD6A6B5024F3D507C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_0-1743585925978.png%22%20alt%3D%22Celeste_Liu_0-1743585925978.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FFONT%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EThrough%20the%20disassembly%20in%20the%20following%20way.%3C%2FFONT%3E%3C%2FP%3E%0A%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_2-1743586080853.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_2-1743586080853.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330973i0F4F88CDA7618FFE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_2-1743586080853.png%22%20alt%3D%22Celeste_Liu_2-1743586080853.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FFONT%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%3EYou%20can%20see%20from%20the%20following%20picture%20that%20there%20is%20no%20problem.%3C%2FFONT%3E%20%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_3-1743586356769.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_3-1743586356769.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330974i6BB56941C416C08F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_3-1743586356769.png%22%20alt%3D%22Celeste_Liu_3-1743586356769.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FFONT%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EYou%20mentioned%20that%20your%20ELF%20file%20was%20generated%20by%20MCUXpresso.%20Could%20you%20please%20tell%20me%20how%20exactly%20you%20generated%20it%3F%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EBRs%2C%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3ECeleste%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2071192%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Problems%20with%20elf%20File%20generated%20by%20MCUXpresso%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2071192%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESorry%2C%20I%20have%20forgotten%20to%20add%20the%20screenshot%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ResetOzone.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ResetOzone.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330549i64367733DEE0F16C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ResetOzone.PNG%22%20alt%3D%22ResetOzone.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E