Is the mbed compiler backward compatible?

30 Nov 2009

Hi,

I know this question may not make any sense at all. But I am wondering can I use mbed LPC2368 compiler to compile the program for LPC2xxx, like LPC2148?

Best regards,

Paul

30 Nov 2009 . Edited: 30 Nov 2009

Hi Paul,

Paul Kang wrote:
I know this question may not make any sense at all. But I am wondering can I use mbed LPC2368 compiler to compile the program for LPC2xxx, like LPC2148?

I think the question makes sense :) But the answer is that the compiler only knows about the MCUs supported by mbed. Currently this is the LPC2368 and the LPC1768; there will likely be more announced in future, but it'll be added as a whole release (board + compiler + libraries + website).

Whilst we understand this is in some ways restrictive, that is kind of the point! It simplifies things greatly, as everyone is working to the same small number of platforms and therefore has the same context (be it for sharing code or reporting errors). But also, if we tried to support every device and every option, we'd basically be trying to do the same thing as many of the great existing toolchains out there (Keil, IAR, Greenhills, Code Red, Rowley, Code Sourcery, ...), and we'd rather leave them to what they are good at. So for now, we're sticking to supporting the mbed platforms better.

Thanks,
Simon

01 Dec 2009

Simon,

Thanks Simon. You are always very kind in answering questions.

I fully understand and agree with your directions. Focus on limited platforms can reduce the distractions, efforts, troubles and bugs.

However, the LPC2XXX family has some many in common for every device. I can't help to think the possibility of using the "common functions" of LPC2148 (like the same GPIO pins) with LPC2368-based mbed compiler .

Instead of fully supporting every device and every option, it would be easier (I guess) to only support the same functions of LPC2XXX family as there are in LPC2368.

I am not asking for supporting LPC2148 or other devices/options, focus on your plan and directions. Just like to know the possibility of using the existing LPC2368-based mbed compiler on other similar devices for the functions the compiler supports (or design for).

Best regards,

Paul

01 Dec 2009 . Edited: 01 Dec 2009

Hi Paul,

You are certainly right that there are some great opportunities like this. In the long term, I think there is a lot of potential to add this type of support.

But the reality is they are not the things that in the short term will determine whether mbed is successful (they may even be a hindrance). And if mbed is not successful, it didn't matter anyway :) So as funny as it sounds, there are a lot of things we don't want to do now, so we have the opportunity to do them in the future?!?!

I hope this sounds reasonable. Please keep the thoughts coming - it is great to understand what people are thinking to test our assumptions, and influence our plans and priorities.

Simon

01 Dec 2009

Simon,

All sound reasonable to me. Thanks for tolerating the crazy ideas. I will let you know the results if I would be "crazy" enough to compile the program of LPC2368 and put the generated bin file on other LPC2XXX devices.

Best regards,

Paul

01 Dec 2009

It probably won't break anything, but likely won't work if mbed libraries access 2368-specific register or board-specific stuff (e.g. printf() or file access which are implemented using semihosting).

01 Dec 2009

Igor Skochinsky wrote:

It probably won't break anything, but likely won't work if mbed libraries access 2368-specific register or board-specific stuff (e.g. printf() or file access which are implemented using semihosting).

printf()? Oh, no, this is one of my favorite functions. If printf() from 2368 mbed compiler is not going to work on 2148, I am less interested to try...

Paul