New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654549 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

ec: nucleo-f072rb fails intermittently for no apparent reason

Project Member Reported by wfrichar@chromium.org, Oct 10 2016

Issue description


I can reproduce it most often when I have uncommitted changes in an unrelated file, say board/cr50/board.c. Then run

  cd src/platform/ec
  \rm -rf build
  make buildall -j33

I get this:

  build/nucleo-f072rb/RW/chip/stm32/i2c-stm32f0.o: In function `i2c_init':
  /home/wfrichar/trunk/src/platform/ec/chip/stm32/i2c-stm32f0.c:606: undefined reference to `i2c_ports_used'
  /home/wfrichar/trunk/src/platform/ec/chip/stm32/i2c-stm32f0.c:606: undefined reference to `i2c_ports'
  build/nucleo-f072rb/RW/common/i2c.o: In function `get_i2c_port':
  /home/wfrichar/trunk/src/platform/ec/common/i2c.c:50: undefined reference to `i2c_ports_used'
  /home/wfrichar/trunk/src/platform/ec/common/i2c.c:50: undefined reference to `i2c_ports'
  build/nucleo-f072rb/RW/common/i2c.o: In function `command_scan':
  /home/wfrichar/trunk/src/platform/ec/common/i2c.c:786: undefined reference to `i2c_ports_used'
  /home/wfrichar/trunk/src/platform/ec/common/i2c.c:786: undefined reference to `i2c_ports'

I think it's because of cts/build.mk:

  ifeq "$(CTS_MODULE)" "gpio"
  CFLAGS_CTS+=-DCTS_MODULE_GPIO
  endif

  ifeq "$(CTS_MODULE)" "i2c"
  CFLAGS_CTS+=-DCTS_MODULE_I2C
  CONFIG_I2C=y

​Because if I capture what that does, I see these invocations in parallel:

  ​make build_cts
  make CTS_MODULE=meta BOARD=nucleo-f072rb
  make CTS_MODULE=interrupt BOARD=nucleo-f072rb
  make CTS_MODULE=timer BOARD=nucleo-f072rb
  make CTS_MODULE=gpio BOARD=nucleo-f072rb
  make CTS_MODULE=mutex BOARD=nucleo-f072rb
  make CTS_MODULE=i2c BOARD=nucleo-f072rb

​I'm guessing that having simultaneous builds which both #define and don't #define CTS_MODULE_I2C are fighting over how board.o is compiled.

I'm surprised you don't have a lot more of these collisions.

 
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/ce3e350aded53fb54a86057b7a7f18bfbb165f73

commit ce3e350aded53fb54a86057b7a7f18bfbb165f73
Author: Daisuke Nojiri <dnojiri@chromium.org>
Date: Wed Oct 12 00:39:14 2016

getversion: Fix lucid failing because of version strings

make build=lucid fails if there is an uncommitted change in the tree
because '-dirty' is appended to version strings, which causes the image
to exceed the flash size limit.

BUG=chromium:654549
BRANCH=none
TEST=make buildall -j

Change-Id: Ie4a7b4c7dc70846108aed953215f79dc30a10fca
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/396617
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/ce3e350aded53fb54a86057b7a7f18bfbb165f73/util/getversion.sh

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758

commit c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758
Author: Daisuke Nojiri <dnojiri@chromium.org>
Date: Wed Oct 12 00:39:14 2016

cts: Fix back-to-back build

Currently eCTS suites share the same directory (e.g. build/stm32l476g
-eval) to put build artifacts even though some files (e.g. board.c)
compile differently suite to suite. So, if cts-i2c-stm32l476g-eval is
built, followed by cts-gpio-stm32l476g-eval, build fails or produces
incorrect binary.

This patch makes eCTS create different directories for each suite.
As a bonus, we can now builds eCTS suites in parallel.

BUG=chromium:654549
BRANCH=none
TEST=make buildall -j (with uncommitted change)

Change-Id: I4abedc917787be5f79b97e0e50d0d08e01bd5f9d
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/398281

[modify] https://crrev.com/c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758/cts/cts.py
[modify] https://crrev.com/c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758/Makefile
[modify] https://crrev.com/c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758/Makefile.rules
[modify] https://crrev.com/c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758/cts/common/board.py

Components: OS>Firmware>EC

Sign in to add a comment