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