Could I use Cortex-A for embedded applications?

I need a little digital io for my project since cortex-m is not economical for me I need to know can i use Cortex-a to do some embedded jobs?

Parents
  • Hi sjdaliyan,

    If you will not go into high-volume production and your application/project does not have crucial requirement for power consumption or board size, it's fine to use the Cortex-A especially if you already have a Cortex-A board.

    The only benefits of cortex-m is having industrial interfaces like can and etc.

    Several Cortex-A devices have "industrial interfaces like can and etc.". See Freescale (now part of NXP) i.MX, Texas Instruments Sitara, XILINX Zynq 7000, among others.

    The advantage of using Cortex-M for your project is you can have it done with minimal processing capability, memory, and peripherals. This translates to lower power consumption and ease of board design and programming. For simple embedded projects you get excess features with Cortex-A devices. For example you may not need the MMU, DDR controller, external Flash controller, on-chip graphics processor, PCIe interface, SATA, etc. In embedded applications, Cortex-As are best considered in cases where GUI and OS like Linux and Android are needed.

    Could i rewrite my X86 assembly programs for Arm?

    Yes, you can (or have to) rewrite your x86 assembly programs if you need them in ARM.

    The degree of burden in converting x86 assembly language programs to ARM depends on the complexity of your project. Most of the hurdles relate to the roots of these two processors. With x86 from an older era and having evolved from CISC and ARM being newer and RISC. Some of your concerns are:

    x86

    • Register-to-memory.
    • In 16 and 32-bit there is no link register, the return address is always saved in stack. I am not aware if there is any enhancement relating to this in newer processors.
    • In 16 and 32-bit, the registers are more special-purpose. In 64-bit, 8 registers (R8 to R15) were added, these registers are general-purpose.
    • The Accumulator, Base, Count, and Data Registers are accessible as

    64-bit:   RAX,   RBX,   RCX,   RDX

    32-bit:   EAX,   EBX,   ECX,   EDX

    16-bit:    AX,    BX,    CX,    DX

    8-bit:  AH/AL, BH/BL, CH/CL, DH/DL

    ARM

    • Register-to-register (load-store).
    • Link Register is available for function calls.
    • Registers are fundamentally general-purpose with exception on Program Counter, Link Register, Stack Pointer, and frame pointer.
    • Load and store allow half-word and byte data but, generally, the registers are not broken down into 16 and 8 bits.

    Other minor differences exist; for example, ARM can support four types of stack based on the combination of empty/full and ascending/descending properties.

    If you will use your assembly language program along with C, note that the integer data type in x86 is 16-bit while in ARM it is 32-bit.

    Regards,

    Goodwin

Reply
  • Hi sjdaliyan,

    If you will not go into high-volume production and your application/project does not have crucial requirement for power consumption or board size, it's fine to use the Cortex-A especially if you already have a Cortex-A board.

    The only benefits of cortex-m is having industrial interfaces like can and etc.

    Several Cortex-A devices have "industrial interfaces like can and etc.". See Freescale (now part of NXP) i.MX, Texas Instruments Sitara, XILINX Zynq 7000, among others.

    The advantage of using Cortex-M for your project is you can have it done with minimal processing capability, memory, and peripherals. This translates to lower power consumption and ease of board design and programming. For simple embedded projects you get excess features with Cortex-A devices. For example you may not need the MMU, DDR controller, external Flash controller, on-chip graphics processor, PCIe interface, SATA, etc. In embedded applications, Cortex-As are best considered in cases where GUI and OS like Linux and Android are needed.

    Could i rewrite my X86 assembly programs for Arm?

    Yes, you can (or have to) rewrite your x86 assembly programs if you need them in ARM.

    The degree of burden in converting x86 assembly language programs to ARM depends on the complexity of your project. Most of the hurdles relate to the roots of these two processors. With x86 from an older era and having evolved from CISC and ARM being newer and RISC. Some of your concerns are:

    x86

    • Register-to-memory.
    • In 16 and 32-bit there is no link register, the return address is always saved in stack. I am not aware if there is any enhancement relating to this in newer processors.
    • In 16 and 32-bit, the registers are more special-purpose. In 64-bit, 8 registers (R8 to R15) were added, these registers are general-purpose.
    • The Accumulator, Base, Count, and Data Registers are accessible as

    64-bit:   RAX,   RBX,   RCX,   RDX

    32-bit:   EAX,   EBX,   ECX,   EDX

    16-bit:    AX,    BX,    CX,    DX

    8-bit:  AH/AL, BH/BL, CH/CL, DH/DL

    ARM

    • Register-to-register (load-store).
    • Link Register is available for function calls.
    • Registers are fundamentally general-purpose with exception on Program Counter, Link Register, Stack Pointer, and frame pointer.
    • Load and store allow half-word and byte data but, generally, the registers are not broken down into 16 and 8 bits.

    Other minor differences exist; for example, ARM can support four types of stack based on the combination of empty/full and ascending/descending properties.

    If you will use your assembly language program along with C, note that the integer data type in x86 is 16-bit while in ARM it is 32-bit.

    Regards,

    Goodwin

Children