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

NUCLEO_G031K8 Failed to build all greentea images in bare-metal profile #13498

Closed
jamesbeyond opened this issue Aug 26, 2020 · 9 comments · Fixed by #13587
Closed

NUCLEO_G031K8 Failed to build all greentea images in bare-metal profile #13498

jamesbeyond opened this issue Aug 26, 2020 · 9 comments · Fixed by #13587

Comments

@jamesbeyond
Copy link
Contributor

jamesbeyond commented Aug 26, 2020

Description of defect

after NUCLEO_G031K8 been added to mbed-os via #13006 , we found that NUCLEO_G031K8 failed on building greentea TESTS-MBED_HAL-MINIMUM_REQUIREMENTS

Target(s) affected by this defect ?

NUCLEO_G031K8

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM only, ARMC6 works fine

What version of Mbed-os are you using (tag or sha) ?

latest master : afcf91f

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli

How is this defect reproduced ?

run:

mbed test --compile -m NUCLEO_G031K8 -t GCC_ARM --app-config TESTS/configs/baremetal.json

Error:

Build failures:
  * NUCLEO_G031K8::GCC_ARM::TESTS-MBED_HAL-MINIMUM_REQUIREMENTS
        Building project minimum_requirements (NUCLEO_G031K8, GCC_ARM)
        Scan: GCC_ARM
        Scan: minimum_requirements
        Compile [100.0%]: main.cpp
        Link: minimum_requirements
        /usr/local/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld:./BUILD/tests/NUCLEO_G031K8/GCC_ARM/./TESTS/mbed_hal/minimum_requirements/.link_script.ld:90 cannot move location counter backwards (from 00000000200010b8 to 0000000020001000)
        collect2: error: ld returned 1 exit status
        
[mbed] Working path "/builds/ws/mbed-os-ci_build-GCC_ARM@3/mbed-os" (program)
[mbed] WARNING: Could not find mbed program in current path "/builds/ws/mbed-os-ci_build-GCC_ARM@3/mbed-os".
       You can fix this by calling "mbed new ." in the root of your program.
---
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/builds/ws/mbed-os-ci_build-GCC_ARM@3/mbed-os"
       Command: "/usr/bin/python -u /builds/ws/mbed-os-ci_build-GCC_ARM@3/mbed-os/tools/test.py -D MBED_TRAP_ERRORS_ENABLED=1 -D SKIP_TIME_DRIFT_TESTS=1 -D MBED_TEST_MODE -t GCC_ARM -m NUCLEO_G031K8 --source . --build ./BUILD/tests/NUCLEO_G031K8/GCC_ARM --test-spec ./BUILD/tests/NUCLEO_G031K8/GCC_ARM/test_spec.json --build-data BUILD/tests/build_data.json --app-config TESTS/configs/baremetal.json --greentea"
       Tip: You could retry the last command with "-v" flag for verbose output
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2020

cc @AGlass0fMilk @ARMmbed/team-st-mcd

@jeromecoutant
Copy link
Collaborator

jeromecoutant commented Aug 26, 2020

Strange...
Building all other tests are ok...

@jeromecoutant
Copy link
Collaborator

Adding in json:
"overrides": { "boot-stack-size": "0x400" },
makes build ok

Why there is a difference between GCC and ARMC6 ?

@ciarmcom
Copy link
Member

@jamesbeyond thank you for raising this issue.Please take a look at the following comments:

Could you add some more detail to the description? A good description should be at least 25 words.

NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered.
Please update the issue header with the missing information, the issue will not be mirroredto our internal defect tracking system or investigated until this has been fully resolved.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 31, 2020

As it is blocking now #13452, how to unblock it ? It is important fix to targets.

Is target that tiny it does not even build hal minimal req test?

@ciarmcom
Copy link
Member

@jamesbeyond it has been 5 days since the last reminder. Could you please update the issue header as previously requested?

@jeromecoutant
Copy link
Collaborator

As it is blocking now #13452, how to unblock it ?

As I said, solution is to set "boot-stack-size" to 0x400"
But, question was , why behavior is different for ARM and GCC ?

Thx

@jamesbeyond
Copy link
Contributor Author

As it is blocking now #13452, how to unblock it ?

As I said, solution is to set "boot-stack-size" to 0x400"
But, question was , why behavior is different for ARM and GCC ?

Thx

I think the default value for boot-stack-size is 0x1000 for baremetal , see
https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L60-L62
and
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TOOLCHAIN_ARM/stm32g031xx.sct#L29-L30

for RTOS it just got override to 0x400:
https://github.com/ARMmbed/mbed-os/blob/master/cmsis/device/rtos/mbed_lib.json#L65

Maybe ARMC6 not failed just because the code size compile by ARMC6 slightly smaller than GCC ?

On other size constrained targets, I saw people forced override that value in target.json
https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L253-L255
maybe we should do the same to this target ?

@ciarmcom
Copy link
Member

ciarmcom commented Sep 5, 2020

@jamesbeyond it has been 5 days since the last reminder. Could you please update the issue header as previously requested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants