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

Modifying the platformio.ini file in a seemingly harmless way breaks the build #3

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

Comments

@xueyunquan
Copy link

xueyunquan commented May 9, 2020

Env:

  • VSCode 1.45.0
  • PlatformIO Core 4.3.3
  • platformio-nxpimxrt 1.0.0

Symptom:
After a successful project build, modify the platformio.ini file slightly (please see the example steps below) and rebuild the project, the building will fail.

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 build the project. The build will succeed.

  3. Then modify the platformio.ini file of the project, by appending a line to the end of the file:
    debug_tool = jlink
    And save the file. Please be aware that this line does not actually change anything because JLink is the default debug tool for this board.

  4. Build the project again, the build would fail with an error like this:

......
.pio/build/mimxrt1060_evk/zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
Indexing .pio/build/mimxrt1060_evk/zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
Archiving .pio/build/mimxrt1060_evk/zephyr/kernel/libkernel.a
Indexing .pio/build/mimxrt1060_evk/zephyr/kernel/libkernel.a
Linking .pio/build/mimxrt1060_evk/firmware-pre.elf
/home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld:/data/code/MCU/IMXRT1061/1060test/.pio/build/mimxrt1060_evk/zephyr/linker.cmd:58 cannot move location counter backwards (from 0000000060001460 to 0000000060000000)
collect2: error: ld returned 1 exit status
*** [.pio/build/mimxrt1060_evk/firmware-pre.elf] Error 1
  1. To recover from this issue, simply clean & rebuild the project, the build will succeed.
  2. And then delete the debug_tool line from the platformio.ini file, and build the project, the build will fail again.
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