-
Notifications
You must be signed in to change notification settings - Fork 179
Add more options for configuring compilers #453
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
2faf6a3
to
76fd8cc
Compare
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.
Few little nits, but great changes!
README.md
Outdated
There are multiple ways to do this: | ||
* `mbed_settings.py` file in the root of your program, which is automatically created if it doesn't already exist. | ||
* The mbed CLI configuration | ||
* setting an environment variable |
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.
Probably make the 's' of "setting" capital here, to make it consistent with the others.
README.md
Outdated
|
||
* If you want to use the [ARM Compiler toolchain](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/downloads), set `ARM_PATH` to the *base* directory of your ARM Compiler installation (example: C:\Program Files\ARM\armcc5.06). The recommended version of the ARM Compiler toolchain is 5.06. | ||
* If you want to use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: C:\Program Files\GNU Tools ARM Embedded\4.9 2015q2\bin). Use versions 4.9 of GCC ARM Embedded; version 5.0 or any version above might be incompatible with the tools. | ||
|
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.
I realize IAR wasn't part of these instructions before, but would you mind adding it here?
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.
Nice work. I have a few questions, mostly so I can change passive voice to active voice if applicable.
README.md
Outdated
* Through the mbed CLI configuration. | ||
* Via mbed_settings.py file in the root of your program, which is automatically created (if it doesn't already exist). | ||
There are multiple ways to do this: | ||
* `mbed_settings.py` file in the root of your program, which is automatically created if it doesn't already exist. |
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 automatically creates this? CLI?
README.md
Outdated
|
||
Edit `mbed_settings.py` to set your toolchain: | ||
For each of the compilers, there is a corresponding environment variable that is checked for the path to that compiler. The environment variables are as follows: |
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 checks the environment variable for the path to that compiler? The compiler?
README.md
Outdated
|
||
Edit `mbed_settings.py` to set your toolchain: | ||
For each of the compilers, there is a corresponding environment variable that is checked for the path to that compiler. The environment variables are as follows: | ||
* `MBED_ARM_PATH`: The path to the *base* directory of your ARM Compiler installation. This should be one directory up the directory containing the binaries for `armcc` and friends. |
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.
Does this mean the directory above or before the directory containing the binaries for armcc
, or does this mean something else?
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.
it's the directory containing the directory containing armcc
. That's a mouthful. I'm open to suggestions to fix it.
Thanks for aligning functionality and docs @theotherjimmy +1. |
a9b0daf
to
a64ffc1
Compare
@AnotherButler I changed the passive voice you pointed out to active. I also tried to clarify what a base directory is. Could you both review again? |
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.
One little nit with the IAR bit, but otherwise looks great 👍
README.md
Outdated
|
||
* To use the [ARM Compiler toolchain](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/downloads), set `ARM_PATH` to the *base* directory of your ARM Compiler installation (example: C:\Program Files\ARM\armcc5.06). The recommended version of the ARM Compiler toolchain is 5.06. | ||
* To use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: C:\Program Files\GNU Tools ARM Embedded\4.9 2015q2\bin). Use versions 4.9 of GCC ARM Embedded; version 5.0 or any version above might be incompatible with the tools. | ||
* To use the [IAR EWARM toolhain](https://www.iar.com/iar-embedded-workbench/#!?architecture=ARM), set `IAR_PATH` to the *base* directory of your IAR installation. Use versions 7.80 of IAR EWARM; prior versions might be incompatible with the tools. |
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.
Last nit! Can you provide an example of the correct directory like above? I always find I forget this myself.
Also: Use versions 7.80 of IAR EWARM;...
. I think versions
should be version
.
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.
I appreciate the clarification. I added my minor grammar comments. This looks great.
README.md
Outdated
* The mbed CLI configuration | ||
* Setting an environment variable | ||
* Adding directory of the compiler binary to your 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.
Please make sure each bullet has a period at the end for consistency.
README.md
Outdated
Edit `mbed_settings.py` to set your toolchain: | ||
|
||
* To use the [ARM Compiler toolchain](https://developer.arm.com/products/software-development-tools/compilers/arm-compiler-5/downloads), set `ARM_PATH` to the *base* directory of your ARM Compiler installation (example: C:\Program Files\ARM\armcc5.06). The recommended version of the ARM Compiler toolchain is 5.06. | ||
* To use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: C:\Program Files\GNU Tools ARM Embedded\4.9 2015q2\bin). Use versions 4.9 of GCC ARM Embedded; version 5.0 or any version above might be incompatible with the tools. |
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.
Please change "versions 4.9" to "version 4.9" for agreement.
Please change "or any version above" to "or any more recent version" to fit our style.
README.md
Outdated
* To use the [GCC ARM Embedded toolchain](https://launchpad.net/gcc-arm-embedded), set `GCC_ARM_PATH` to the *binary* directory of your GCC ARM installation (example: C:\Program Files\GNU Tools ARM Embedded\4.9 2015q2\bin). Use versions 4.9 of GCC ARM Embedded; version 5.0 or any version above might be incompatible with the tools. | ||
* To use the [IAR EWARM toolhain](https://www.iar.com/iar-embedded-workbench/#!?architecture=ARM), set `IAR_PATH` to the *base* directory of your IAR installation. Use versions 7.80 of IAR EWARM; prior versions might be incompatible with the tools. | ||
|
||
Since `mbed_settings.py` contains local settings (possibly relevant only to a single OS on a single machine), it should not be checked into version control. |
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.
Please change "Since" to "Because" because "since" implies time, and "because" implies causation.
Please change "it should not be checked" to you should not check it" for active voice.
For each of the compilers, `mbed compile` checks a corresponding environment variable for the compiler's location. The environment variables are as follows: | ||
* `MBED_ARM_PATH`: The path to the *base* directory of your ARM Compiler installation. This should be the directory containing the directory containing the binaries for `armcc` and friends. | ||
* `MBED_IAR_PATH`: The path to the *base* directory of your IAR EWARM Compiler installation. This should be one directory containing the directory containing the binaries for `iccarm` and friends. | ||
* `MBED_GCC_ARM_PATH`: The path to the *binary* directory of your GCC ARM Embedded Compiler installation. This should be the directory containing the binaries for `arm-none-eabi-gcc` and friends. |
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.
Thanks for clarifying this.
README.md
Outdated
|
||
As a rule, because `mbed_settings.py` contains local settings (possibly relevant only to a single OS on a single machine), it should not be versioned. | ||
If none of the above have been configured, the `mbed compile` command will fall back to checking your `PATH` for an executable that is part of the compiler suite in question. This check is the same as a shell would perform to find the executable on the command line. When it finds the executable it's looking for, it uses the location of that executable as the appropriate path except in the case of GCC, which will not use a path in this case. |
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.
Please change "none of the above have" to "none of the above has" for agreement.
Please hyphenate "command-line".
Please change "which will not use a path in this case" to "which does not use a path" to eliminate the repetition and for consistent tense.
We added a few more options for configuring compilers in the mbed-os tools, so I'm adding those options to the readme here. The new options are: - Setting env variables - `PATH` detection Further, I updated the order of the subsections to reflect their priority. Things earlier in the list configure the compiler in preference to things later in the list. Finally, there is one edit for consistency. Previously we had a command line `blah --global blah blah` and in the text it referred to `-G`. I changed the command line to be consistent
a64ffc1
to
6bf5efc
Compare
@AnotherButler I re-wrote the patch again to include you second set of suggestions. Could you review again? I think we should go over this whole file together soon and edit the whole thing. |
Compiler configuration section not included because of open PR ARMmbed#453
@AnotherButler Can you please review? |
@screamerbg This looks good to me. theotherjimmy and I put together another PR with some grammar changes for the other sections that this PR did not change, so we've been over the whole document. It looks good. |
Thanks @theotherjimmy @AnotherButler |
We added a few more options for configuring compilers in the mbed-os
tools, so I'm adding those options to the readme here. The new options
are:
PATH
detectionFurther, I updated the order of the subsections to reflect their
priority. Things earlier in the list configure the compiler in preference
to things later in the list.
Finally, there is one edit for consistency. Previously we had a command
line
blah --global blah blah
and in the text it referred to-G
.I changed the command line to be consistent
Reviews/Requests for edits: