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

Issue 747553 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

gcc_next fails chromeos-ec unittest

Project Member Reported by yunlian@chromium.org, Jul 21 2017

Issue description

when build chromeos-ec with next_gcc,
I got
chromeos-ec-0.0.1-r4024:   CC      RO/chip/stm32/spi.o
chromeos-ec-0.0.1-r4024:   CC      RW/common/system.o
chromeos-ec-0.0.1-r4024:   CC      RO/board/llama/board.o
chromeos-ec-0.0.1-r4024: /usr/x86_64-pc-linux-gnu/arm-none-eabi/binutils-bin/2.27/ld.bfd.real: No room left in the flash
chromeos-ec-0.0.1-r4024: collect2: error: ld returned 1 exit status
chromeos-ec-0.0.1-r4024: make[2]: *** [Makefile.rules:345: build/gru/RO/ec.RO.elf] Error 1
chromeos-ec-0.0.1-r4024: make[2]: *** Waiting for unfinished jobs....
 
Labels: -Pri-3 Pri-1
Owner: yunlian@chromium.org
Status: Assigned (was: Untriaged)
this is important to triage because it makes the waterfall red all the time. We don't want to have constantly failing builders in the waterfall.

This error was introduced by this commit
https://chromium-review.googlesource.com/c/557305/

To reproduce it, inside chroot, run
sudo USE="next_gcc" cross-arm-none-eabi/gcc
FEATURES="test" emerge-terra chromeos-ec
Cc: rspangler@chromium.org llozano@chromium.org sha...@chromium.org dnojiri@chromium.org

Comment 4 by sha...@chromium.org, Jul 24 2017

We'll look into it. That's 'sudo USE="next_gcc" emerge cross-arm-none-eabi/gcc', right? Is it best to do this from a clean chroot? I ran into some library dependency issues (libs built with old toolchain, I think).

Comment 5 by sha...@chromium.org, Jul 25 2017

Checking closer, the new toolchain is producing a slightly larger image for gru (RO size 0x1a004 vs 0x19f84), which now exceeds the region of SRAM apportioned for the image. Looking at the disassembly, gpio_set_flags_by_mask() looks significantly larger, maybe due to some missed optimizations in gpio_interrupt_type_sel() (inlined). I'll make some small changes to gpio_interrupt_type_sel() that should produce smaller code.
ec.RO.dis
9.1 MB Download
ec.RO.new.dis
9.2 MB Download
Yes, it is best to do this in a clean chroot. Please let me know it you get any issue in doing this.

Comment 7 by sha...@chromium.org, Jul 25 2017

Cc: -sha...@chromium.org yunlian@chromium.org
Owner: sha...@chromium.org
https://chromium-review.googlesource.com/#/c/584820/ will claw-back half of the lost code space and fix the build (original delta was 0x80 bytes, now we're at 0x40 bytes). npcx __enter_hibernate() seems to be the single biggest remaining hog, using 0x20 more bytes. I'm not going to investigate that right now.
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 28 2017

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

commit e302a0d87fb47f9ec93ccfa771f13f55abd73758
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Fri Jul 28 02:56:24 2017

npcx: gpio: Optimize gpio_interrupt_type_sel() for code space reduction

gpio_interrupt_type_sel() is guaranteed to be called with at least one
GPIO_INT_ANY bit set, but our new toolchain doesn't seem to realize it.

BUG= chromium:747553 
BRANCH=None
TEST=`make BOARD=gru -j` with next_gcc, also verify kevin boots to OS.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ice2a9963983dca2ee9c0c543bf55c27753c42933
Reviewed-on: https://chromium-review.googlesource.com/584820
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/e302a0d87fb47f9ec93ccfa771f13f55abd73758/chip/npcx/gpio.c

Comment 9 by sha...@chromium.org, Jul 28 2017

Status: Fixed (was: Assigned)
thanks!
Status: Verified (was: Fixed)

Sign in to add a comment