Mbed LPC1768 no longer supported?

Hi,
I am trying to revive a mbed LPC1768 that was not used for years.
I tried to use it with the online compiler as well as with mbed studio.
The code of the blinky examples compiles but I can’t run or debug.
The bin file is not loaded onto the board.
What can I do to fix this problem.
Thanks in advance
Andreas

Hello,

Try to update board’s firmware.

BR, Jan

Does the board’s USB drive show up? If so, what happens when you try to drag the bin file onto it?

Hello,
I thank you for answering my question.
The copying of programs to the board is working.
But when I tried to use the board in mbed studio with os release 6.5.
I updated the board to the latest release and installed the winserial driver although the documentation states that it is not necessary. But only by doing so there is a serial comport available and I got a serial console in mbed studio.
I then tried to use the examples from the manual.
I can only call it a desaster.
There were errors and warnings everywhere. I tried then to use the example code from the header files of the Thread and ThisThread classes. After the necessary changes to chrono values they compiled and I could load them to the board.
But the execution of the program stops in the call to ThisThread::sleep_for(100ms).
I tried to use the debugger, but with no success. It stops immediately after loading with the message: 0006772:ERROR:gdbserver:Unhandled exception in handle_message: No ACK received.
There seems to be something wrong with the implemention of pyOCD for the mbed LPC1768. I read about it in other threads on this forum, but hoped that the announced fixes fot this bug would have been done in the meantime.
So I don’t know how to continue from here.
I think it is somewhat sad and disappointing, especially as this board was the first board that was used with mbed at all and I own it since then.
The documentation in mbed studio is nothing but annoying, so to say.
Even the getting started examples simply don’t work.

Any ideas? Can you point me to a documentation of the RTOS functions and a tutorial with working examples?

Best regards
Andreas

I simply don’

Hi Andreas,

have you tried any of these examples with a different board? Just to try and rule out a broken board?

Anna

I had recently similar issue with Freedom Board (FRDM-KL25Z), which I wanted to revive for
another prototyping project.

The problem is most likely outdated driver or it´s incompatibility with recent Windows and MacOs updates.

If you can grab an Win8 PC everything will most likely work. Alternative, which I have used, was
external SWD debugger (Segger J-Link). Everything works fine, even with outdated J-Link,
but only in Eclipse.

Hello Marjan,
I thank you for your answer.
I guess that there will be no chance for debugging the mbed LPC1768 in the future.

I also have an FRDM-KL25Z25Z board lying around here. I read in the forums that there are issues with this board, maybe because of the opensda debug port. Could you describe in more detail, how you brought this board to life?

Thanks in advance
Andreas

Hello Anna,
I found out how to use the mbed LPC1768 with mbed-studio and mbed-os 6.4.
What still is missing or not working is the debug support.
There is some sort of connection established, but then it stops with an error message about a missing NAK by the board.
This behavior has been described in the forums for a long time now. I believe that there will be no fix available in the future, so I have to use printf O(.
Best regards
Andreas

Hi Andreas,

I just spoke to our Studio team and they have said that a fix is currently under development, so watch this space !

Regards
Anna

Hello Andreas,

as I wrote, I am using Segger J-Link (SWD) debugger attached to the 10-pin micro-pitch connector. Now,
there are several issues with this setup to make it work:

  1. The power supply over USB port is only 3.0V, which is to low for my old J-Link so external 3.3V power is required.
  2. J1 should not be cut as stated in the User’s manual
  3. For development use Eclipse or Visual Code with C/C++ plugin and “offline devolopment”. So I have exported bare-metal-blinky from online mbed compiler v6.5 as the start base. Do not waste your time
    with Mbed Studio :frowning:
  4. For debugging you need running JlinkGDBinstance, and configured target MKL25Z128xxx4 which runs only if target is powered and it shall run before debugging starts
  5. For VSC you need to modify the .launch file to talk with JlinkGDBserver on port 2331 (see attached config).
  • “setupCommands”: [
  •           { "text": "-target-select remote localhost:2331", "description": "connect to target", "ignoreFailures": false },*
              { "text": "-file-exec-and-symbols ${workspaceRoot}/BUILD/${workspaceRootFolderName}.elf", "description": "load file", "ignoreFailures": false},*
              { "text": "-interpreter-exec console \"monitor endian little\"", "ignoreFailures": false },*
              { "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },*
              { "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },*
    

// !—> { “text”: “-interpreter-exec console "monitor arm semihosting enable"”, “ignoreFailures”: false },*

  •           { "text": "-target-download", "description": "flash target", "ignoreFailures": false }*
         ],*
    

I am running on Mac so:

  •       "osx": {
            "MIMode": "gdb",
            "MIDebuggerPath": "arm-none-eabi-gdb" //,
            //"debugServerPath": "/usr/local/bin/jlinkgdbserver"
        },
    

I am also using the same setup for the LPC1768 module from Elmicro.com. Bare board without
OpenSDA. Works perfectly.

BTW, I did not managed to update the OpenSDA on Freedom board with the J-LinkFlash :frowning:

Hope it helps.

Debugging of LPC1768 target works with pyOCD rev. 0.8.0 when semihosting and local filesystem are disabled.

Best regards, Zoltan

Hello Marjan,
thank you, I will give it a try.

Hello Zoltan,
I am still strugling with the documentation.
Could you please tell me where and how I can setup the settings you mentioned.
Best regards
Andreas

Hello Andreas,

The documentation doesn’t mention that. It’s just my experience. I used pyOCD 0.8.0 with Mbed OS2 and it worked. When pyOCD bundled with newer versions of Mbed OS did not work I downgraded back to the old version using pip (python installer) command (from Linux terminal but it should work on Windows or Mac too):

pip install pyocd==0.8.0

Then it turned out that pyOCD 0.8.0 doesn’t like semihosting and local file system of newer Mbed OS. To disable those drivers the following mbed_app.json configuration file shall be added to the root directory of a Mbed OS project:

{
    "target_overrides": {
        "LPC1768": {
            "target.device_has_remove": [
                "LOCALFILESYSTEM",
                "SEMIHOST"
            ]
        }
    }
}

Best regards, Zoltan

Hallo Zoltan,
I tried, what you suggested, but no joy. Here are the messages from the debugger lauch:

Attached to debugger on port 50000

0006669:INFO:loader:Erased chip, programmed 40960 bytes (40 pages), skipped 0 bytes (0 pages) at 7.51 kB/s

Image loaded: c:/Users/andre/Mbed Programs/empty-example/BUILD/LPC1768/ARMC6/empty-example.elf

Note: automatically using hardware breakpoints for read-only addresses.

0006977:ERROR:gdbserver:Unhandled exception in handle_message: No ACK received

Do you have any other idea?

At the moment everything seems to go wrong. I tried to install VSCode and arm embedded compiler tools. The I exported an example created with the online compiler and exported it. Errors:
“/usr/src/mbed-os/” not found, and so on.
Can you tell me, what you are using as offline environment setup?

Best regards
Andreas

Hello Andreas,

I didn’t mention it but I use the GCC ARM toolchain. Maybe the pyOCD 0.8.0 does not work with the ARM6. You can find more info about my development environment here.

Best regards, Zoltan