How do you choose an ARM family

How do I go about picking an architecture ? My first thoughts suggested Cortex M3 but the more I look into it the less sure I am.

Obviously I don't to go to the trouble of learning a new technology only to find that I've made a bad processor choice (ie nearly end of line). I've spent many hours looking at many websites and have yet to find any high-level stuff on choosing my first ARM device.

If there's one thing wrong with ARM its the almost infinite number of devices

I'm an embedded developer wanting to undertake my first ARM project, so I'm completely new to the ARM architecture. I want a low power device with serial, USB and some ADC channels.

Parents Reply
  • Based on:
    infocenter.arm.com/.../IHI0042C_aapcs.pdf

    5.1.1
    This paragraph seems to indicate that you need not preserve r0 to r3:

    r0 named scratch register 1
    ...
    r3 named scratch register 3

    and:
    "The first four registers r0-r3 (a1-a4) are used to pass argument values into a subroutine and to return a result value from a function. They may also be used to hold intermediate values within a routine (but, in general, only between subroutine calls)."

    the "(but, in general, only between subroutine calls)" seems to indicate that if the called function is visible to the compiler, the compiler can see if any of these registers are unused in the function. For the general case, they are assumed to be destroyed.

    This also seems to indicate that r0 .. r3 need not be preserved (still 5.1.1):
    "A subroutine must preserve the contents of the registers r4-r8, r10, r11 and SP (and r9 in PCS variants that designate r9 as v6)."

    ---

    Then something about using volatile in loops. We have had a debate about this earlier and not managed to find 100% proof from the C standard what goes.

    The AAPCS specifies in 7.1.5 (my emphasis)
    "A data type declaration may be qualified with the volatile type qualifier. The compiler may not remove any access to a volatile data type unless it can prove that the code containing the access will never be executed; <v>however, a compiler may ignore a volatile qualification of an automatic variable whose address is never taken unless the function calls setjmp()."

    In short, a loop with a volatile local loop variable that doesn't get the address taken may be removed. So volatile doesn't guarantee that a delay loop will survive.

Children
More questions in this forum