We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
We're considering an ARM based MCU as an alternative target to an existing 8051 based product, which leads me to ask some questions regarding the ARM architecture-
My understanding is that the ARM core has a 32 bit instruction set (typically), so asssuming a direct port of our existing 8051 code (8 bit instruction set) was possible, what would the expected size of program code be for the ARM target relative to that of the 8051 (bigger/smaller/indeterminate)?
Assuming it's possible for ARM based devices to fetch instructions from external flash (?), are there specific features that should be considered mandatory if the ARM device doesn't feature sufficient 'on-board' flash for program code/NVRAM (AMBA bus/SPI etc)?
Also if there's a resource that someone's aware of which deals with this level of detail, I'd appreciate a link, and any other comments/caveats regarding the ARM core...
Many thanks
David
"My understanding is that the ARM core has a 32 bit instruction set"
It also has the 16-bit "Thumb" (sub)set.
"8051 code (8 bit instruction set)"
Actually, the 8051 has an 8-bit Word Size - not all instructions are 8 bits!
"what would the expected size of program code be for the ARM target relative to that of the 8051 (bigger/smaller/indeterminate)?"
Almost certainly bigger - but memory is cheap these days. In fact, you'd have a job finding a ROM of only 64K these days - it's not the size of the ROM that's the problem for 8051s!
"Assuming it's possible for ARM based devices to fetch instructions from external flash"
Why specifically external flash? There are plenty with on-chip flash - see:
http://www.keil.com/dd/search_parm.asp
http://www.keil.com/books/armbooks.asp
and, of course, http://www.arm.com
Why not talk to your local distributor? Many of them offer introductory courses/seminars - often free!
Check CORTEX devices from Luminary (http://www.luminarymicro.com). Code for Cortex is smaller than for ARM devices.
Thanks Andy-
I say external flash because our 8051 target application already uses a large percentage of its 256K code space- The ARM devices I've been looking at feature 256K/512K internal flash storage, and since we're looking at a likely increase in code size (before we've factored in the footprint of any ARM libraries, etc) I want to know that we can use external flash for program (and data) storage, should that become necessary.
what would the expected size of program code be for the ARM target relative to that of the 8051 (bigger/smaller/indeterminate)?
Impossible to tell without knowing more about the actual code.
If the code is doing a lot of things that the 8051 is good at (bit manipulation, unsigned 8 bit arithmetics), then the equivalent for ARM is probably going to be larger.
If the code is doing a lot of things that the 8051 is not so good at (16/32/64 bit arithmetics, floating point math, pointers, dynamic memory allocation), then the equivalent ARM code may well be smaller.
For Cortex I would say 25-40% bigger
David; I second Andy's suggestion about contacting your local rep. In my area, AVNET and NXP are co-sponsoring an all day siminar for $99.00 and they give you a LPC2148 eval board. I started with the Keil MCBR7 which has the StMicro STR710FZ2 ARM chip. From Keil it's less than $200.00US. All I/O pins are available off board and interfacing an external RAM or Flash was very simple. It is a limited I/O bus of 16 bits but the I/O controls lines support byte, half word and full word transfers. The address lines support 24 bit addressing. http://www.keil.com/boards/arm.asp give a fair comparison of boards directly supported by Keil. Using an eval board for direct 'hands on' is the fastest way to develope a good feel for ARM without fighting Target board problems. If you need additional info on memory interface to the STR710, send an email address and I can forward some simple PDF interconnect diagrams. Also, get a ULink or some other supported JTAG interface adapter. Bradford
Yes, there are plenty of devices with an external memory bus for flash or RAM. Atmel has new devices, NXP (Philips) has several devices, TI has devices. Keep in mind that this will run slower due to the speed of the flash and the extra time required to go off chip. On chip flash is often optimized to run the CPU at full speed like the NXP parts and the Cortex-M3 from Luminary.
Anglia are doing free one day MCU Seminars, in conjunction STMicroelectronics: " href= "http://www.hitex.co.uk/arm/index.html">www.hitex.co.uk/.../index.html
probably many others...
"Using an eval board for direct 'hands on' is the fastest way to develope a good feel for ARM without fighting Target board problems."
and they'll usually come with examples, tutorials, etc, etc...
What would the expected size of program code be for the ARM target relative to that of the 8051.
Without knowing what your code does, it is not possible to estimate.