problems debugging elf file

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

problems debugging elf file

Jump to solution
1,250 Views
hugohabicht
Contributor II

Hi,

we would like to use LPCxpresso for debugging an ELF file. The ELF file is created using a system build outside LPCxpresso.

IWe installed the IDE with no problems and we imported the ELF file. But when starting debug I get the following error message:

RedlinkServerException

Reason:

Cannot write to server: not open

What am I missing?

Any help would be appreciated.

Regards,

0 Kudos
1 Solution
902 Views
hugohabicht
Contributor II

I did a bit more research....

1. lpcscrypt_CMSIS just hangs.   After 15 minutes and half a screen of dots I gave up.   The script uses an undocumented 'print' parameter for lpcscrypt which seems to want to write to a USB serial port which is not there (may work fine under the imho obsolete windows operating system).   The VID/PID of the LPCLink2 changes to 1fc9:0083 which isn't even included in the udev rules.   Adding it did not make any difference.

2. I tried your 'redlinkserv -commandline' which was the key to the solution (see below).  I got the error message version "GLIBC_2.15 not found".   So it seems the whole software is compiled with a newer shared library than included in our operating system distribution.    I really like to know what was included in 2.15 that was required for the software.  Unfortunately software developers assume that everybody always has the latest and greatest version of all the software they are using available.

Of course all of this is hidden by the "IDE" (Integrated Deception Environment).   I know why I never liked them...

SOLUTION: LPCXpresso DOES NOT RUN under RHEL6 / CentOS6.   We will now look into SGS Thompson (ST) ARM CPUs for our designs now.

@Fall Guy: Thank you very much for your help!

View solution in original post

0 Kudos
9 Replies
903 Views
hugohabicht
Contributor II

I did a bit more research....

1. lpcscrypt_CMSIS just hangs.   After 15 minutes and half a screen of dots I gave up.   The script uses an undocumented 'print' parameter for lpcscrypt which seems to want to write to a USB serial port which is not there (may work fine under the imho obsolete windows operating system).   The VID/PID of the LPCLink2 changes to 1fc9:0083 which isn't even included in the udev rules.   Adding it did not make any difference.

2. I tried your 'redlinkserv -commandline' which was the key to the solution (see below).  I got the error message version "GLIBC_2.15 not found".   So it seems the whole software is compiled with a newer shared library than included in our operating system distribution.    I really like to know what was included in 2.15 that was required for the software.  Unfortunately software developers assume that everybody always has the latest and greatest version of all the software they are using available.

Of course all of this is hidden by the "IDE" (Integrated Deception Environment).   I know why I never liked them...

SOLUTION: LPCXpresso DOES NOT RUN under RHEL6 / CentOS6.   We will now look into SGS Thompson (ST) ARM CPUs for our designs now.

@Fall Guy: Thank you very much for your help!

0 Kudos
902 Views
hugohabicht
Contributor II

Debugging an ELF file is "advanced"?

Using the IDE for building our software is definitely a no-go area; too inefficient and not fit for our purpose.

But I did as you suggested, simple loop everything created by LPCxpresso.   Same result.   So why is LPCxpresso is not finding the LPC-LINK2?   It certainly does something initially. (LED starts blinking).   Are there any log files written somewhere where I can follow what is going on hidden by this IDE?

Screenshot-3.png

0 Kudos
902 Views
thefallguy
Contributor IV

Log file is in <workspace>/.metadata/.log

I would guess that linkerver is probably crashing. From the command line, try running 

  • /usr/local/lpcxpressso(version)/lpcxpresso/bin/redlinkserv -commandline

and then typing 

  • probelist
  • exit
0 Kudos
902 Views
hugohabicht
Contributor II

Yes, I did read the users guide.   Problem is that the debug option in the quick start is ghosted, so cannot be selected.   I clicked on the green creepy-crawly on the top of the screen.

Is there any documentation how this probe "booting" works and what it does?

I wanted to use lpcsrypt first but I could not figure out what firmware I need.   All I found was "use the GUI to get the correct command line options".    So where do I find the documentation that tells me what firmware to use?

0 Kudos
902 Views
thefallguy
Contributor IV

Sounds like you are trying to go straight to 'advanced' use without understanding how it works in the first place. Why not start with a simple project (completely in the IDE) to get used to what it does, and how, before moving on to your more esoteric requirements.

AFAIK, the latest version of LPCScrypt includes the latest version of the firmware that you need. just use the "program_CMSIS" script.

0 Kudos
902 Views
hugohabicht
Contributor II

Hi Fall Guy,

thank you for your reply.   So linkserver is the name I have to select for the LPC-LINK2.   Not very intuitive if LPC-LinkV1.1 is offered as well....

Thank you for the link but we are not using anything remotely microsoft related.   OS used here is CentOS6.

I think I got a bit further but I am still getting error messages.   There seems to be a program dfu-util running; as far as I can see it ran successfully but LPCxpresso is treating the output as error (see below).

The product ID of the lpclink2 changes from 000c to 0090 while LPCxpresso is trying to connect to the debugger.   This is also included in the .rules file but may that is the problem.

There are hundreds of options in this IDE; some of them seem redundant; I know why I never liked IDEs...

Regards,

linkserver.png

0 Kudos
902 Views
thefallguy
Contributor IV

You did read the User Guide, right?

http://www.nxp.com/assets/documents/data/en/user-guides/LPCXpresso_IDE_User_Guide.pdf 

Especially section 3.4 on debugging?

In 99% of cases, you do not need to select anything, the IDE will detect what is connected, and use it.

If you think booting the probe is the issue, you could either

  • boot manually, using the boot_link2 script in the bin directory of LPCXpresso, or
  • use lpc_scrypt to load the firmware into the flash, so you do not need to soft-boot it each time. LPCScrypt v1.8.0|NXP 
0 Kudos
902 Views
hugohabicht
Contributor II

Under "Debugger configuration"  "Emulator Selection" I only see

LPC-Link v1.1

RDB-Link

Red Probe Family

LinkServer

The LPC-Link2 is not listed.   Is therre a problem with my installation?

0 Kudos
902 Views
thefallguy
Contributor IV

Linkserver is the generic name for any lp-link2 or other cmsis-dap probe.

maybe you are hitting this problem?

LPC-Link2 fails to enumerate with CMSIS-DAP firmware 

0 Kudos