Arm Mbed OS support forum

LPC812 support?

Hi folks. I’m getting ready to design my first custom board. I want to use the NXP LPC812 but I’m having trouble telling how much support there is for it. I see a number of forum posts that suggest that people have gotten a custom board working with this chip, but when I try to compile the default blinky-baremetal project in Mbed Studio 1.0.0, I get a build failure:

argument -m/–mcu: LPC812 is not a supported MCU. Supported MCUs are:
[… long list of all supported MCUs here…]

I have selected the “NXP LPC800-MAX” target in my project, as it’s the only one that made sense when I filtered the target list for “LPC812.”

Any ideas how to get code to compile for the LPC81x family?

Thanks!

hi @pion

Note the LPC812 was removed in Mbed OS 6, hence the error you’re seeing.
You can either switch to the 5.15 branch or create a custom board based on Mbed OS 6.

For the latter, you can follow the guidelines in the docs and blog.

In summary:

  • Create custom_targets.json based on the LPC812 in targets.json from 5.15 (see here)
  • Create TARGET_LPC812 folder and hierarchy based on LPC812 from 5.15 (see here)
  • Add mbed-os.lib and main.cpp (see details about baremetal in the docs here and here)

Have a look to other good examples of custom boards such as the Bluepill.
You should be able to compile with either Mbed CLI or Mbed Studio (1.0)

Kind regards,
Marcelo

2 Likes

Thanks, @MarceloSalazar! That was a very helpful post and I’ve started digging through the links you mentioned. While I’m tempted to try the 5.15 option since it sounds a lot easier, my instinct is to go through the laborious process of (what I suspect requires) doing a full port to Mbed OS 6, as I don’t want to start a brand new project by depending on a deprecated OS. (Unless you can offer a reason why 5.15 is the smarter option long-term?) I’m curious: Do you know why LPC812 support was removed in 6?

Note Mbed OS 5 isn’t deprecated. There are new patch releases on the 5.15 branch from time to time.
Unless you really want to use a new feature that may land on Mbed OS 6, you should be able to use the 5.15 branch without problems.

@MarceloSalazar Ok, you’ve convinced me :slight_smile: I’ll start off with 5.15 to save some time. I created a new baremetal-blinky example and targeted Mbed OS 5.15 with the NXP LPC800-MAX target, but now I see a different error:

Could not compile for LPC812: Target LPC812 is not supported by toolchain ARMC6

What am I doing wrong?

That seems correct, the target hasn’t been enabled with Arm Compiler 6.

I think you can try one of these options:

  • Use GCC with Mbed CLI
  • Use AC5 with Mbed CLI (toolchain from Keil MDK free 32K version)
  • Enable support for AC6 (as an example, look at the Arm linker script for LPC1114)

Remember to follow instructions to migrate to Mbed OS 5 as shown here:
https://os.mbed.com/docs/mbed-os/v5.15/tutorials/migrating-to-mbed-os-5.html