Env:
VSCode 1.45.0
PlatformIO Core 4.3.3
platformio-nxpimxrt 1.0.0
Symptom:
Adding a board_build.mcu = setting to the platformio.ini file does not seem to change the compiler options.
Steps to reproduce:
-
Use the PlatformIO Home page to create a new project, with the following settings:
- Board: NXP i.MX RT1060 Evaluation Kit
- Framework: Zephyr
-
Once created, do NOT modify anything in the project, and do a verbose build. Notice that the project is built with a default target device of MIMXRT1062DVL6A, as can be seen in the build log like:
arm-none-eabi-gcc -o .pio/build/mimxrt1060_evk/lib__libc__minimal/zephyr/lib/libc/minimal/source/stdout/stdout_console.c.o -c -std=c99 -Os -imacros/data/code/MCU/IMXRT1061/1060test/.pio/build/mimxrt1060_evk/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m7 -imacros/home/user/.platformio/packages/framework-zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/data/code/MCU/IMXRT1061/1060test/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/user/.platformio/packages/framework-zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -nostdinc -isystem /home/user/.platformio/packages/framework-zephyr/lib/libc/minimal/include -isystem /home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include -isystem /home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include-fixed -DPLATFORMIO=40303 -DBUILD_VERSION=20200 -DBOARD_FLASH_SIZE=CONFIG_FLASH_SIZE -DCPU_MIMXRT1062DVL6A -DKERNEL -DXIP_BOOT_HEADER_DCD_ENABLE=1 -DXIP_BOOT_HEADER_ENABLE=1 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/user/.platformio/packages/framework-zephyr/include -I.pio/build/mimxrt1060_evk/zephyr/include/generated -I/home/user/.platformio/packages/framework-zephyr/soc/arm/nxp_imx/rt -I/home/user/.platformio/packages/framework-zephyr/ext/hal/cmsis/Core/Include -I/home/user/.platformio/packages/framework-zephyr-hal-nxp/mcux/devices/MIMXRT1062 -I/home/user/.platformio/packages/framework-zephyr-hal-nxp/mcux/drivers/imx /home/user/.platformio/packages/framework-zephyr/lib/libc/minimal/source/stdout/stdout_console.c
-
Then modify the platformio.ini file of the project, adding the following line:
board_build.mcu = mimxrt1061cvl5a
Save the file, and clean & rebuild the project.
-
From the build log (omitted here because it is exactly the same as the log above) it can be seen that the CPU macro is not changed by the board_build.mcu = setting and remains
-DCPU_MIMXRT1062DVL6A .
Env:
VSCode 1.45.0
PlatformIO Core 4.3.3
platformio-nxpimxrt 1.0.0
Symptom:
Adding a
board_build.mcu =setting to the platformio.ini file does not seem to change the compiler options.Steps to reproduce:
Use the PlatformIO Home page to create a new project, with the following settings:
Once created, do NOT modify anything in the project, and do a verbose build. Notice that the project is built with a default target device of MIMXRT1062DVL6A, as can be seen in the build log like:
arm-none-eabi-gcc -o .pio/build/mimxrt1060_evk/lib__libc__minimal/zephyr/lib/libc/minimal/source/stdout/stdout_console.c.o -c -std=c99 -Os -imacros/data/code/MCU/IMXRT1061/1060test/.pio/build/mimxrt1060_evk/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mthumb -mcpu=cortex-m7 -imacros/home/user/.platformio/packages/framework-zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/data/code/MCU/IMXRT1061/1060test/zephyr=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/user/.platformio/packages/framework-zephyr=ZEPHYR_BASE -ffunction-sections -fdata-sections -mabi=aapcs -nostdinc -isystem /home/user/.platformio/packages/framework-zephyr/lib/libc/minimal/include -isystem /home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include -isystem /home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/include-fixed -DPLATFORMIO=40303 -DBUILD_VERSION=20200 -DBOARD_FLASH_SIZE=CONFIG_FLASH_SIZE -DCPU_MIMXRT1062DVL6A -DKERNEL -DXIP_BOOT_HEADER_DCD_ENABLE=1 -DXIP_BOOT_HEADER_ENABLE=1 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/user/.platformio/packages/framework-zephyr/include -I.pio/build/mimxrt1060_evk/zephyr/include/generated -I/home/user/.platformio/packages/framework-zephyr/soc/arm/nxp_imx/rt -I/home/user/.platformio/packages/framework-zephyr/ext/hal/cmsis/Core/Include -I/home/user/.platformio/packages/framework-zephyr-hal-nxp/mcux/devices/MIMXRT1062 -I/home/user/.platformio/packages/framework-zephyr-hal-nxp/mcux/drivers/imx /home/user/.platformio/packages/framework-zephyr/lib/libc/minimal/source/stdout/stdout_console.c
Then modify the platformio.ini file of the project, adding the following line:
board_build.mcu = mimxrt1061cvl5aSave the file, and clean & rebuild the project.
From the build log (omitted here because it is exactly the same as the log above) it can be seen that the CPU macro is not changed by the
board_build.mcu =setting and remains-DCPU_MIMXRT1062DVL6A.