If mbed build command have been issued earlier with --build parameter, rebuilding of application fails.
Various errors happens. Sometimes it tries to build with some random target, ignoring .mbed file. Sometimes it fails to resolve options specified in mbed_app.json
Steps to reproduce
Build failure
$ git clone https://github.com/ARMmbed/example-mbedos-blinky.git
$ cd example-mbedos-blinky
$ mbed deploy --procotol ssh
$ mbed target K64F
$ mbed toolchain GCC_ARM
$ mbed compile --build out/K64F
...
Image: out/K64F/mbed-os-example-blinky.bin
$ mbed compile --build out/K64F
...
/Users/septak01/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: section .flash_config loaded at [0000000000000400,000000000000041f] overlaps section .interrupts loaded at [0000000000000000,00000000000007ff]
/Users/septak01/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: section .text loaded at [0000000000000410,000000000000c3a7] overlaps section .flash_config loaded at [0000000000000400,000000000000041f]
/Users/septak01/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: region `m_interrupts' overflowed by 1024 bytes
/Users/septak01/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: region `m_flash_config' overflowed by 16 bytes
collect2: error: ld returned 1 exit status
[mbed] ERROR: "python" returned error code 1.
[mbed] ERROR: Command "python -u /Users/septak01/src/mbed-os-example-blinky/mbed-os/tools/make.py -t GCC_ARM -m K64F --source . --build out/K64F" in "/Users/septak01/src/mbed-os-example-blinky"
$ ls BUILD/
K64F UBLOX_EVK_ODIN_W2
$ cat .mbed
ROOT=.
TARGET=K64F
TOOLCHAIN=GCC_ARM
Build fails, and looks like it tried to build Ublox, even that I asked K64F
If
mbed build
command have been issued earlier with--build
parameter, rebuilding of application fails.Various errors happens. Sometimes it tries to build with some random target, ignoring
.mbed
file. Sometimes it fails to resolve options specified inmbed_app.json
Steps to reproduce
Build failure
Build fails, and looks like it tried to build Ublox, even that I asked K64F
Configuration error
Possible problem
Looks like
mbed compile
creates a.mbedignore
file intoBUILD
folder, but does not create it into a folder specified by--build
optionTherefore build travels into these folders, causing problems.
Reported originally in https://github.com/ARMmbed/mbed-cli/issues/437