-
Notifications
You must be signed in to change notification settings - Fork 3k
RTL8195AM - Respect Toolchains paths in post bulid script. #5042
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
Conversation
Does this also work when the compilers are found in the PATH? |
FYI, the Cam-CI job was aborted (10 times!) so that's why it's red. |
If a compiler path is set in mbed_settings.py, the binary hook script will use that. If it is empty, it will fallback to use compiler found in system path. |
It's a bit confusing on the compiler paths. Some examples in mbed_settings.py point to the installation directory, some points to the binary directory. The post processing script for RTL8195AM expects binary directory for all compilers. Maybe that's why Cam-CI is failing ?
|
Thanks for the clarification @tung7970. |
@tung7970 You're right. There's another way to get the toolchain paths that will be more compatible... Just a moment. I'll give you a link. |
https://github.com/ARMmbed/mbed-os/blob/master/tools/toolchains/__init__.py#L1538-L1543 is updated by the build scripts to include the paths. The globals are left alone. If you want to support env var specification of toolchain paths, you should use the TOOLCHAIN_PATHS global instead of the settings. |
tools/targets/REALTEK_RTL8195AM.py
Outdated
@@ -8,6 +8,9 @@ | |||
import hashlib | |||
import shutil | |||
|
|||
from tools.settings import GCC_ARM_PATH | |||
from tools.settings import ARM_PATH | |||
from tools.settings import IAR_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use
from tools.toolchains import TOOLCHAIN_PATHS
instead?
Done. Let me know if this is OK. Thanks. |
tools/targets/REALTEK_RTL8195AM.py
Outdated
@@ -153,7 +154,7 @@ def parse_load_segment_armcc(image_elf): | |||
(offset, addr, size) = (0, 0, 0) | |||
segment_list = [] | |||
in_segment = False | |||
cmd = 'fromelf --text -v --only=none ' + image_elf | |||
cmd = os.path.join(TOOLCHAIN_PATHS['ARM'], 'bin', 'fromelf --text -v --only=none ') + image_elf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if they compile for uARM
? Do you think that you need to handle that case? does your target support uARM
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uARM is not supported at this moment. Will need to check if it can be added easily.
Thanks for getting back to me so quickly @tung7970. It looks better, and should pass Cam-CI. FYI, we are focusing CI on the 5.6.0 and 5.5.7 releases right now, so this PR may have to wait until we get through more of those PRs. |
I also changed the title to match the contents of this PR. |
/morph test |
1 similar comment
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
This looks related to your PR. |
Not a big fan of windows, but this is weird. A simple readelf command occasionally fails. Let me check if I can reproduce it locally. |
@tung7970 Any update? |
@0xc0170 Can't reproduce this issue using local greentea, but I guess the space in windows path might have something to do with this. Anyway, I have slightly tweaked the way command is concatenated. Please check if the modified version does any difference. Also rebased to the latest master. |
Build : SUCCESSBuild number : 11 |
Use TOOLCHAIN_PATHS to locate toolchain binaries for users might set compiler paths, through mbed_settings.py, env vars, or system path. Signed-off-by: Tony Wu <[email protected]>
Build : FAILUREBuild number : 13 |
/morph build |
1 similar comment
/morph build |
Build : SUCCESSBuild number : 258 Skipping test trigger, missing label 'NEED CI' |
/morph test |
Test : SUCCESSBuild number : 130 |
Description
Respect [GCC_ARM|ARM|IAR]_PATH from mbed_settings.py, for users might set path through that file instead of system path.
Status
READY
Migrations
NO
Related PRs
List related PRs against other branches:
Todos
NONE
Deploy notes
NONE
Steps to test or reproduce
NONE