Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMake Toolchain file for Cortex M4?

Hi, I am getting started with Arm Development Studio on Windows. I want to use the armclang compiler to target Cortex M4. I want to use CMake to configure the build and to work on the Windows platform.

Is there an example CMake toolchain file for this?

Best regards

David

Parents
  • Hi David,

    Sorry, there are no CMake examples provided in Arm DS, but there are plenty based on Make.

    For example, the makefile for the "startup_Cortex-M4_AC6" example shows the basic armclang compiler options for Cortex-M4, e.g.:
    armclang -c --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -O1 -g file.c
    (change -mfpu=fpv4-sp-d16 -mfloat-abi=hard to -mfpu=none if the (optional) FPU is not present)

    A typical link comamnd is also given, e.g.;
    armlink [list of objects] --scatter=scatter.scat --info=totals --info=unused -o image.elf

    Hope this helps

    Stephen

Reply
  • Hi David,

    Sorry, there are no CMake examples provided in Arm DS, but there are plenty based on Make.

    For example, the makefile for the "startup_Cortex-M4_AC6" example shows the basic armclang compiler options for Cortex-M4, e.g.:
    armclang -c --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -O1 -g file.c
    (change -mfpu=fpv4-sp-d16 -mfloat-abi=hard to -mfpu=none if the (optional) FPU is not present)

    A typical link comamnd is also given, e.g.;
    armlink [list of objects] --scatter=scatter.scat --info=totals --info=unused -o image.elf

    Hope this helps

    Stephen

Children