Arm GCC

This section describes the steps to create an M4 project with Arm GCC, rearrange source and project files, adjust project settings, and delete function.

Create an M4 project

To create an M4 project, perform the following steps:

  1. Copy the folder <install_dir> boards\evkmimxrt1170\edgefast_bluetooth_examples\a2dp_source \cm4 into another folder in which the example should be enabled. In this case, copy the folder <install_dir> boards\evkmimxrt1170\edgefast_bluetooth_examples\a2dp_source \cm4 into*<install_dir> boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4*.

  2. Open the file CMakeLists.txt located in the path: <install_dir> boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4\ armgcc.

  3. Search and replace all a2dp_source_cm4 with peripheral_ht_cm4, and then save the files.

Parent topic:Arm GCC

Rearrange source files

To rearrange source files, perform the following steps:

  1. Open the folder <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4 and delete all files with the extensions *.c and *.h.

  2. Copy the files with the extensions *.c and *.h in the folder <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm7 to the folder <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4.

    |

|

Parent topic:Arm GCC

Rearrange project files

To rearrange project files, perform the following steps:

  1. Open the CMakeLists.txt of the two examples respectively. The two files are in the <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm7\armgcc and <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4\armgcc folders respectively.

  2. Search the section add_executable. Compare the difference between the two sections. Remove files that do not exist in the cm7 project but are available in the cm4 project. Add the files that exist in the cm7 project but are not available in the cm4 project into the cm4 project. For example, in the following figure, the files in the red box should be removed and the files in the green box must be added into the cm4 project.

Parent topic:Arm GCC

Adjust project setting

To adjust the project settings, perform the following steps:

  1. Open the flags.cmake of the two examples respectively. The two files are in the <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm7\armgcc and <install_dir>boards\evkmimxrt1170\edgefast_bluetooth_examples\peripheral_ht\cm4\armgcc folders respectively.

  2. Search the CMAKE_C_FLAGS_DEBUG section.

    1. Compare the macro between the two sections.

    2. Add the macros that do not exist in the cm4 project but are available in the cm7 project into the cm4 project. The rule is that macro setting should be same.

    3. Delete the macros highlighted in the red rectangle.

      |

|

Parent topic:Arm GCC

Delete function

As a final step, remove the function “SCB_DisableDCache() in main.c.

On the completion of the above steps, the M7 project successfully migrates to an M4 project. You can now download and debug the M4 example project.

Parent topic:Arm GCC