Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The board_build.mcu setting in the platformio.ini file seems to be ineffective #4

Open
xueyunquan opened this issue May 9, 2020 · 0 comments

Comments

@xueyunquan
Copy link

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:

  1. Use the PlatformIO Home page to create a new project, with the following settings:

    • Board: NXP i.MX RT1060 Evaluation Kit
    • Framework: Zephyr
  2. 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

  3. 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.

  4. 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 .

@xueyunquan xueyunquan changed the title The .mcu setting in the platformio.ini file seems to be ineffective The board_build.mcu setting in the platformio.ini file seems to be ineffective May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant