porting BASIC between CPUs

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

porting BASIC between CPUs

Post by YahooArchive »

>from the help line
>Can I get the SuperPRO eval board to write and debug on and then get a
ARMmitePRO or PROPlus to run the program for the finished product?

The BASIC can be moved between parts, but access to hardware registers has some
limits.

The PROplus and SuperPRO are basically the same CPU with the PROplus having less
memory and no D/A output. So if your program fits in the smaller memory and
doesn't use analog output, it can be compiled directly on the PROplus.

The standard product PROplus is built without the RTC crystal, so if you want to
use that it would be a special order with minimum quantities.

The ARMmitePRO is a different CPU with very different hardware, so if you access
the hardware registers directly in your program that code would have to be
changed.

The same is pretty much true for C. Moving from the SuperPRO to ARMmitePRO
involves a recompile of the C as the SuperPRO uses 16 bit Thumb instructions,
where the ARMmitePRO can be 16 or 32.



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: porting BASIC between CPUs

Post by YahooArchive »

The SuperPRO uses an LPC1756 MCU doesn't it? While I agree that LPC1756 code
would need to be recompiled to run on an LPC2103 (e.g. the ARMmitePRO) I'm
puzzled by the statement "the SuperPRO uses 16 bit Thumb instructions". My
understanding is that the LPC1756 uses the *Thumb2* instruction set which has
both 16-bit and 32-bit instructions. Isn't that right?

Regards,
Chris Burrows

CFB Software
Astrobe v3.3: LPC2000 Oberon-07 Development System
http://www.astrobe.com

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: porting BASIC between CPUs

Post by YahooArchive »

>My understanding is that the LPC1756 uses the *Thumb2* instruction set which
has both 16-bit and 32-bit instructions. Isn't that right?
>

Yes, but most are 16 bit instructions. I was not making the distinction between
the various flavors of Thumb - Thumb2 Thumb2EE M0-Thumb2subset ... probably more

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: porting BASIC between CPUs

Post by YahooArchive »

I'm sorry - I still do not understand. I've just had another look at Tables 4.1
to 4.10 in Chapter 4 of Joseph Yiu's book "The Definitive Guide to the ARM
Cortex-M3". There he lists 57 different 16-bit instructions and 96 different
32-bit instructions. The unsupported instructions are listed separately. Am I
missing something or are we counting two different things?

Regards,
Chris.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: porting BASIC between CPUs

Post by YahooArchive »

If you look at the code that comes out of all the C compilers for Thumb2 I've
looked at, I'd say 95% or more is 16 bit opcodes, if you eliminate the far
branches, that number may become 99%.

That's why I think most people think of Thumb2 as 16 bit ops.

Post Reply