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

Allow 'small-build' and 'big-build' to be used as options. #2409

Merged
merged 4 commits into from
Aug 25, 2016

Conversation

pan-
Copy link
Member

@pan- pan- commented Aug 10, 2016

These two flags are already tested in tools/toolchains/gcc.py but can't
be used at the moment because they are not part of the argument list of
the option parameter.

@pan-
Copy link
Member Author

pan- commented Aug 10, 2016

@bridadan @c1728p9 Could you review this ?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 10, 2016

Jenkins failures are being investigated.

LGTM

@c1728p9
Copy link
Contributor

c1728p9 commented Aug 10, 2016

Looks good to me as well

@bridadan
Copy link
Contributor

Seems fine to me. @theotherjimmy ?

@theotherjimmy
Copy link
Contributor

@pan- nailed it. This is exactly how we should be enabling them.

@jupe
Copy link
Contributor

jupe commented Aug 10, 2016

what this small/big-build option actually does? should it be documented somewhere?

@bridadan
Copy link
Contributor

@c1728p9 Something else just ocurred to me, the big-build should really be standard-build to match with the definition in hal/targets.json.

@jupe pretty sure this isn't documented anywhere, it should be though. This option determines which standard library is used. The small build uses the "nano" version of the standard library, which saves space but it isn't thread safe. So it enables single-threaded mode and things like that.

@jupe
Copy link
Contributor

jupe commented Aug 10, 2016

Then this definitely should be documented very well here (=in this PR)! Without proper documentation this will be forgotten hidden feature which "doesn't exists" !

@pan-
Copy link
Member Author

pan- commented Aug 11, 2016

@bridadan standard-build is a much better name. If we follow that route, it also has to be renamed in toolchains/gcc.py. I can do that.

It would also be interesting to have an option which allows fearless users to use the RTOS even if the standard library is unsafe.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2016

@pan- Can you add documentation to these options as part of this patch? At least for those 2 new additions here.

@bridadan standard-build is a much better name. If we follow that route, it also has to be renamed in toolchains/gcc.py. I can do that.

What about small-build -> non-standard-build 😄

@pan-
Copy link
Member Author

pan- commented Aug 11, 2016

@jupe, @0xc0170 It is already documented in mbed-cli, this PR just fix the options list:

See here: https://github.com/ARMmbed/mbed-cli#compiling-your-program

--options <OPTIONS> to select compile options. 
Examples: "debug-info": will generate debugging information; 
"small-build" will use microlib/nanolib, but limit RTOS to single thread; 
"save-asm": will save the asm generated by the compiler

I'm happy to add documentation if needed the question is where ? There is just no README or anything in tools/*.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 11, 2016

@bridadan standard-build is a much better name. If we follow that route, it also has to be renamed in toolchains/gcc.py. I can do that.

+1

@bridadan
Copy link
Contributor

@pan- Makes sense to me 👍

@0xc0170 I would say that non-standard-build is actually less descriptive then small-build, though it is less "parallel" to standard-build.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 12, 2016

@pan- Please update to standard-build

@pan-
Copy link
Member Author

pan- commented Aug 12, 2016

@0xc0170 Done, please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 12, 2016

@bridadan @c1728p9 @sg- @theotherjimmy Happy with the current state of this? small-build vs standard-build ?

@bridadan
Copy link
Contributor

@pan- Muchas gracias!

@0xc0170 LGTM, though it'd probably be good to double check with @c1728p9

@sg-
Copy link
Contributor

sg- commented Aug 12, 2016

not to bikeshed but "xxx-build" doesn't translate to the behavior "single thread only mode" or that the standard library is selected by this flag. Given that small libraries technically could become thread safe it seems that the flag should be --std-lib and --small-lib given that the single thread only mode could change given that a small library could become thread safe

@pan-
Copy link
Member Author

pan- commented Aug 15, 2016

@sg- I'm happy to apply any change and --std-lib or --small-lib are really good one. Nonetheless, I would add that iff we follow this route, it would also makes sense to apply it to the default_build options and replace it by default_lib.

Also do you want this as a regular flag or a possible value in the options (--std-lib or -o --std-lib) ?

Please advise on what should go in this PR and what shouldn't.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 15, 2016

not to bikeshed but "xxx-build" doesn't translate to the behavior "single thread only mode" or that the standard library is selected by this flag. Given that small libraries technically could become thread safe it seems that the flag should be --std-lib and --small-lib given that the single thread only mode could change given that a small library could become thread safe

Same should be applied for default_build in the targets.json? I think we discussed it to name more closely to its intention - std_lib or as @pan's proposal default_lib.

Also do you want this as a regular flag or a possible value in the options (--std-lib or -o --std-lib) ?

Option?

Let's unify it and document it

@sg-
Copy link
Contributor

sg- commented Aug 15, 2016

Great - Sounds like default-lib where target.default-lib = std and -o --xxx-lib FTW

@theotherjimmy
Copy link
Contributor

-o --xxx-lib is not an option on the table, argparse will barf on that.

The options are:

  • -o xxx-lib
  • --xxx-lib

@sg-
Copy link
Contributor

sg- commented Aug 16, 2016

OK -o xxx-lib

@pan-
Copy link
Member Author

pan- commented Aug 17, 2016

@sg- @0xc0170 It is done, please review.

@theotherjimmy
Copy link
Contributor

Rebase please, then +1

These two flags are already tested in tools/toolchains/gcc.py but can't
be used at the moment because they are not part of the argument list of
the option parameter.
With this change, the name is more descriptive and aligned with the targets
definitions in hal/targets.json.
…to use.

* rename 'small-build' into 'small-lib'
* rename 'standard-build' into 'std-lib'
@pan- pan- force-pushed the enable_small_and_big_build_options branch from 4acbe72 to 7760d6c Compare August 23, 2016 14:51
@pan-
Copy link
Member Author

pan- commented Aug 23, 2016

@theotherjimmy I've rebased this PR against the latest master.

@@ -75,7 +75,9 @@ def get_default_options_parser(add_clean=True, add_options=True):
'run Goanna static code analyzer")'),
type=argparse_lowercase_hyphen_type(['save-asm',
'debug-info',
'analyze'],
'analyze',
'small-lib',
Copy link
Contributor

@theotherjimmy theotherjimmy Aug 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is off. It would be nice if you added a space :) This is not a blocker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, vim!
I change this immediately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch! I appreciate the commitment to good style!

@theotherjimmy
Copy link
Contributor

👍

* rename "default_build" property into "default_lib"
* rename "standard" value for "default_build" into "std".
@pan- pan- force-pushed the enable_small_and_big_build_options branch from 7760d6c to fe322ad Compare August 23, 2016 15:05
@pan-
Copy link
Member Author

pan- commented Aug 23, 2016

@theotherjimmy I've fixed the indentation of options and squash it with the last commit, their is no need to add such commit in the history.

@theotherjimmy
Copy link
Contributor

@pan- Agreed. Good call on the squash.

@@ -273,13 +273,13 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
GCC.__init__(self, target, options, notify, macros, silent, TOOLCHAIN_PATHS['GCC_ARM'], extra_verbose=extra_verbose)

# Use latest gcc nanolib
if "big-build" in self.options:
if "std-lib" in self.options:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this breaks a user space (if they use big-build) I would do it non-breaking way for now, or at least to print a warning "use this new option, this is not supported anymore". I would go with non-breaking way

Copy link
Contributor

@theotherjimmy theotherjimmy Aug 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They can't use "big-build" options.py does not allow it to be passed on the command line. If they were using it, we would have had an issue about that by now.

Copy link
Contributor

@0xc0170 0xc0170 Aug 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theotherjimmy I recall this can be set up in the settings script file as BUILD_OPTIONS ?

thus there is a chance someone did it :-)

@sg-
Copy link
Contributor

sg- commented Aug 23, 2016

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 684

Test failed!

@pan-
Copy link
Member Author

pan- commented Aug 24, 2016

@sg- @0xc0170 There is only one failure in the whole suite and this seem totally unrelated to this PR (features-net-feature_ipv4-tests-mbedmicro-net-nist_internet_time_service: features-net-feature_ipv4-tests-mbedmicro-net-nist_internet_time_service with GCC_ARM on K64F)

@sg- sg- merged commit 5197edc into ARMmbed:master Aug 25, 2016
@pan- pan- deleted the enable_small_and_big_build_options branch July 3, 2018 11:03
artokin pushed a commit to artokin/mbed-os that referenced this pull request Aug 17, 2020
…..48609ae

48609ae Merge branch 'release_internal' into release_external
62d8586 Ignore ns_monitor when receiving Ack (ARMmbed#2417)
3323f36 Add support for Ethernet RA dns configuration
d8e7d40 Iotthd 4239 (ARMmbed#2414)
b46f3c6 add empty function for ws_stack_info_get
fc97980 Changed RADIUS shared secret length to 16-bit value
f827ffc Added information API to Wi-SUN and border router
8f1f9d5 EDFE error handling update
51bf94e Fix adaptation interface unit tests (ARMmbed#2409)
0860b57 FHSS_WS: Fixed reading unicast remaining slots (ARMmbed#2408)
4d8c03b Border Router RADIUS client basic authentication functionality (ARMmbed#2406)
fbfada9 Adaptation IF: Allocate fragmentation buffer only if needed (ARMmbed#2407)
66f1bff Added storing of PAN version to NVM on BR
89826ce Iotthd 4224 (ARMmbed#2403)
3fc1ae2 BR EUI-64 is now selected for 4WH using PMKID on 4WH Message 1
af8438e Timing tool traces (ARMmbed#2401)
7938795 Fixed new PD data request for check if EDFE exchange is active.
85ab8fd Extented Frame exchange support
86b1f27 Merge pull request ARMmbed#2399 from ARMmbed/IOTTHD-4220
fed69e0 Add missing test method to ws_empty_functions
6b58e26 Add EDFE mode to Socket API setsockopt
1283077 Test API to adjust 6LoWPAN fragmentation MTU size (ARMmbed#2398)
e787874 Init MAC MTU size based on driver MTU size (ARMmbed#2397)
bf8e89e Ignore neighbors using unsupported channel function (ARMmbed#2395)
1c263fd FHSS exclude channel usage from mask and Brazilian Domain support
841dcbe MAC: Configurable data whitening (ARMmbed#2393)
9a10d66 Fix global address detection (ARMmbed#2392)
f27fe86 Corrected network name and PAN ID change on auth start
bcce0ed Clarified border router routing table API description
e4630a4 Wi-SUN interface now informs address changes as interface events
2174374 Fix error found by coverity (ARMmbed#2389)
843254a MPL: traces for transmit and receive message (ARMmbed#2387)

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 48609ae
artokin pushed a commit to artokin/mbed-os that referenced this pull request Aug 18, 2020
…..48609ae

48609ae Merge branch 'release_internal' into release_external
62d8586 Ignore ns_monitor when receiving Ack (ARMmbed#2417)
3323f36 Add support for Ethernet RA dns configuration
d8e7d40 Iotthd 4239 (ARMmbed#2414)
b46f3c6 add empty function for ws_stack_info_get
fc97980 Changed RADIUS shared secret length to 16-bit value
f827ffc Added information API to Wi-SUN and border router
8f1f9d5 EDFE error handling update
51bf94e Fix adaptation interface unit tests (ARMmbed#2409)
0860b57 FHSS_WS: Fixed reading unicast remaining slots (ARMmbed#2408)
4d8c03b Border Router RADIUS client basic authentication functionality (ARMmbed#2406)
fbfada9 Adaptation IF: Allocate fragmentation buffer only if needed (ARMmbed#2407)
66f1bff Added storing of PAN version to NVM on BR
89826ce Iotthd 4224 (ARMmbed#2403)
3fc1ae2 BR EUI-64 is now selected for 4WH using PMKID on 4WH Message 1
af8438e Timing tool traces (ARMmbed#2401)
7938795 Fixed new PD data request for check if EDFE exchange is active.
85ab8fd Extented Frame exchange support
86b1f27 Merge pull request ARMmbed#2399 from ARMmbed/IOTTHD-4220
fed69e0 Add missing test method to ws_empty_functions
6b58e26 Add EDFE mode to Socket API setsockopt
1283077 Test API to adjust 6LoWPAN fragmentation MTU size (ARMmbed#2398)
e787874 Init MAC MTU size based on driver MTU size (ARMmbed#2397)
bf8e89e Ignore neighbors using unsupported channel function (ARMmbed#2395)
1c263fd FHSS exclude channel usage from mask and Brazilian Domain support
841dcbe MAC: Configurable data whitening (ARMmbed#2393)
9a10d66 Fix global address detection (ARMmbed#2392)
f27fe86 Corrected network name and PAN ID change on auth start
bcce0ed Clarified border router routing table API description
e4630a4 Wi-SUN interface now informs address changes as interface events
2174374 Fix error found by coverity (ARMmbed#2389)
843254a MPL: traces for transmit and receive message (ARMmbed#2387)

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 48609ae
artokin pushed a commit to artokin/mbed-os that referenced this pull request Aug 21, 2020
…3fe574..48609ae

48609ae Merge branch 'release_internal' into release_external
62d8586 Ignore ns_monitor when receiving Ack (ARMmbed#2417)
3323f36 Add support for Ethernet RA dns configuration
d8e7d40 Iotthd 4239 (ARMmbed#2414)
b46f3c6 add empty function for ws_stack_info_get
fc97980 Changed RADIUS shared secret length to 16-bit value
f827ffc Added information API to Wi-SUN and border router
8f1f9d5 EDFE error handling update
51bf94e Fix adaptation interface unit tests (ARMmbed#2409)
0860b57 FHSS_WS: Fixed reading unicast remaining slots (ARMmbed#2408)
4d8c03b Border Router RADIUS client basic authentication functionality (ARMmbed#2406)
fbfada9 Adaptation IF: Allocate fragmentation buffer only if needed (ARMmbed#2407)
66f1bff Added storing of PAN version to NVM on BR
89826ce Iotthd 4224 (ARMmbed#2403)
3fc1ae2 BR EUI-64 is now selected for 4WH using PMKID on 4WH Message 1
af8438e Timing tool traces (ARMmbed#2401)
7938795 Fixed new PD data request for check if EDFE exchange is active.
85ab8fd Extented Frame exchange support
86b1f27 Merge pull request ARMmbed#2399 from ARMmbed/IOTTHD-4220
fed69e0 Add missing test method to ws_empty_functions
6b58e26 Add EDFE mode to Socket API setsockopt
1283077 Test API to adjust 6LoWPAN fragmentation MTU size (ARMmbed#2398)
e787874 Init MAC MTU size based on driver MTU size (ARMmbed#2397)
bf8e89e Ignore neighbors using unsupported channel function (ARMmbed#2395)
1c263fd FHSS exclude channel usage from mask and Brazilian Domain support
841dcbe MAC: Configurable data whitening (ARMmbed#2393)
9a10d66 Fix global address detection (ARMmbed#2392)
f27fe86 Corrected network name and PAN ID change on auth start
bcce0ed Clarified border router routing table API description
e4630a4 Wi-SUN interface now informs address changes as interface events
2174374 Fix error found by coverity (ARMmbed#2389)
843254a MPL: traces for transmit and receive message (ARMmbed#2387)

git-subtree-dir: connectivity/nanostack/sal-stack-nanostack
git-subtree-split: 48609ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants