Mbed-os: Can't execute OS2 tests in ARM if default_toolchain is uARM

Created on 18 Dec 2018  路  6Comments  路  Source: ARMmbed/mbed-os

Description

mbed version: master (#8305 included) + #9107

We can't execute OS2 tests in ARM if default_toolchain is uARM

ex:
$ python ./tools/build.py -m NUCLEO_F042K6 -t ARM
Build successes:

  • ARM::NUCLEO_F042K6

$ python ./tools/make.py -m NUCLEO_F042K6 -t ARM -n MBED_2
Building project stdio (NUCLEO_F042K6, ARM)
Could not compile for NUCLEO_F042K6: No Linker Script found

If I removed from targets.json file:
"default_toolchain": "uARM",
=> it's working

https://os.mbed.com/docs/v5.10/tools/adding-and-configuring-targets.html
The default_toolchain property names the toolchain that compiles code for this target in the Online Compiler.

=> so default_toolchain should not impact python scripts ?

@theotherjimmy @bridadan

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug
CLOSED mirrored bug

Most helpful comment

Ok the problem seems to be that the build artifacts from the call to build.py are placed at the following path: BUILD\mbed\TARGET_NUCLEO_F042K6\TOOLCHAIN_ARM_STD. Since its placed in TOOLCHAIN_ARM_STD, its not picked up by the subsequent call to make.py, which is only looking for TOOLCHAIN_ARM and TOOLCHAIN_ARM_MICRO.

I'm not 100% sure the best approach here. Seems like build.py should place the artifacts in a folder names TOOLCHAIN_ARM_MICRO instead. Would like to check with @theotherjimmy though before making changes.

All 6 comments

Hi @jeromecoutant,

I just checked the commands you posted above, doesn't look like make.py -n <test name> works for any target, not just targets with uARM set as the default_toolchain. singletest.py continues to build them fine. Can you use that script for now?

$ python ./tools/build.py -m NUCLEO_F030R8 -t ARM
$ python ./tools/make.py -m NUCLEO_F030R8 -t ARM -n MBED_2

This is working

Ah oops, thanks. Been a while since I've used these scripts. I was able to reproduce the issue.

Ok the problem seems to be that the build artifacts from the call to build.py are placed at the following path: BUILD\mbed\TARGET_NUCLEO_F042K6\TOOLCHAIN_ARM_STD. Since its placed in TOOLCHAIN_ARM_STD, its not picked up by the subsequent call to make.py, which is only looking for TOOLCHAIN_ARM and TOOLCHAIN_ARM_MICRO.

I'm not 100% sure the best approach here. Seems like build.py should place the artifacts in a folder names TOOLCHAIN_ARM_MICRO instead. Would like to check with @theotherjimmy though before making changes.

@bridadan None. That sounds correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cesarvandevelde picture cesarvandevelde  路  4Comments

drahnr picture drahnr  路  4Comments

1domen1 picture 1domen1  路  3Comments

bcostm picture bcostm  路  4Comments

ccchang12 picture ccchang12  路  4Comments