Hi,
Can you tell me if and how the LPC8xx microcontroller can be programmed and debugged
- through UART
- trough SWD with a probe like this 2548 Adafruit Industries LLC | Schede di sviluppo, kit, programmatori | DigiKey
Thanks for your help
Solved! Go to Solution.
> About UART: ok I see. What software I need on my PC? I am using MCUx espresso ide
The FlashMagic tool here has a good reputation.
https://www.flashmagictool.com
I didn't need it myself yet. You need it only once you "bricked" your board, i.e. get no JTAG/SWD access anymore.
This PC software implements the protocol NXP has used in it' ROM-based bootloader code.
If you write your own bootloader, you can implement any protocol you like, and use the respective PC software.
My company e.g. uses UDS over CAN and serial (UART).
> About the debug probe: Yes I do know that it is a ST-link debugger but since they are all arm cortex I thought it was possible in some way to use it with LPC microcontroller. However, as you said, is far better to use the LPC link debug probe since I am using the MCUx expresso IDE
Such "mixes" work sometimes, the critical point is usually the toolchain that supports both.
If you want a more universal debug adapter, I would recommend the Segger JLink, which many toolchains support.
By the way, Segger offers firmware for the ST-Link (and AFAIK also the LPC-Link) for free download which converts these debug pods into JLinks, reversibly.
But if you are relatively new to this low-level embedded world, I would recommend not to mess around with debug-pod / MCU combinations. This could become very frustrating very quickly.
> - through UART
The usual way, via ISP, or with a special bootloader.
ISP mode is entered when specific levels are applied to certain pins at startup. A ROM-based bootloader for erasing & Flash programming is exectued. Details are described in the datasheet.
The software required on PC side is available from NXP, I think for free download.
Arduino and other environments usually come with proprietary bootloaders, geared towards their proprietary application interface.
> - trough SWD with a probe like this 2548 Adafruit Industries LLC | Schede di sviluppo, kit, programmatori | DigiKey
You realize this is a ST-Link, designed by ST mainly for their STM8 and STM32 devices, do you ?
You would first need a toolchain that supports both the LPC8xx as target, and the ST-Link as debug interface. A few do that, but these toolchains are not for free - like Keil uVision or IAR Workbench.
That might work, but it is not very likely.
I tried that once with moderate success, some years ago. At least I could step into the code with the debugger.
However, I suggest to get an eval board for the LPC8xx MCU you want, which usually come with an integrated debug pod (LPC-Link). With the proper toolchain (like MCUXpresso), this will work out of the box.
The MCUXpresso toolchain can be downloaded for free. The one caveat is, only LPC microcontrollers are supported.
> About UART: ok I see. What software I need on my PC? I am using MCUx espresso ide
The FlashMagic tool here has a good reputation.
https://www.flashmagictool.com
I didn't need it myself yet. You need it only once you "bricked" your board, i.e. get no JTAG/SWD access anymore.
This PC software implements the protocol NXP has used in it' ROM-based bootloader code.
If you write your own bootloader, you can implement any protocol you like, and use the respective PC software.
My company e.g. uses UDS over CAN and serial (UART).
> About the debug probe: Yes I do know that it is a ST-link debugger but since they are all arm cortex I thought it was possible in some way to use it with LPC microcontroller. However, as you said, is far better to use the LPC link debug probe since I am using the MCUx expresso IDE
Such "mixes" work sometimes, the critical point is usually the toolchain that supports both.
If you want a more universal debug adapter, I would recommend the Segger JLink, which many toolchains support.
By the way, Segger offers firmware for the ST-Link (and AFAIK also the LPC-Link) for free download which converts these debug pods into JLinks, reversibly.
But if you are relatively new to this low-level embedded world, I would recommend not to mess around with debug-pod / MCU combinations. This could become very frustrating very quickly.
Hi @frank_m
Do you think I could use the lpc845brk as a debug probe?
I found this interestjng article
You could.
The modification is basically just disconnecting the target from the onboard debug pod, and add a connector for use with other boards.
The LPC845-BRK is relatively cheap, so there is not much lost either way. You could order more than one, and try a few SDK examples for this board first.
CMSIS-DAP is a (more or less) standardized debug pod that most toolchains support.
The only issue is that different vendors are using different debug connectors for their boards. So, if you want to venture outside the NXP world, you probably need to make your own adapter cable. Which should not be a problem.