Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

configs/*.json based configurations #140

Merged
merged 7 commits into from
Dec 13, 2016
Merged

configs/*.json based configurations #140

merged 7 commits into from
Dec 13, 2016

Conversation

JanneKiiskila
Copy link
Contributor

Per Marcelo Salazar's proposal add configuration examples to a configs-folder.
By default the repo does not anymore have an mbed_app.json at all, but one should
copy one of the example configs, potentially modify it and use it.

Jenkinsfile was modified to do the copy operation at the beginning.

Add the emac for UBLOX to Wifi configs.

Reference:
#137

@JanneKiiskila JanneKiiskila force-pushed the conf branch 2 times, most recently from 6a931cc to 7056e64 Compare December 11, 2016 16:44
@JanneKiiskila
Copy link
Contributor Author

Quite doesn't work yet, as the mbed_app.json isn't there in all cases now.

  • cp mbed-client-ci-scripts/test_automation/security.h .
  • rm -rf mbed-client-ci-scripts
  • mbed ls -a
    mbed-os-example-client (git@github.com:ARMmbed/mbed-os-example-client.git#da6c44002fae)
    |- atmel-rf-driver (ssh://git@github.com/armmbed/atmel-rf-driver.git#62c0c49d7a94)
    |- esp8266-driver (ssh://git@github.com/ARMmbed/esp8266-driver.git#86ed47c8bf40)
    |- mbed-client (ssh://git@github.com/ARMmbed/mbed-client.git#92bdf6a69958)
    | |- mbed-client-classic (ssh://git@github.com/ARMmbed/mbed-client-classic.git#42f18d977122)
    | - mbed-client-mbed-tls (ssh://git@github.com/ARMmbed/mbed-client-mbed-tls.git#7e1b6d815038) |- mbed-os (ssh://git@github.com/ARMmbed/mbed-os.git#d5de476f74dd) |- mcr20a-rf-driver (ssh://git@github.com/ARMmbed/mcr20a-rf-driver.git#d8810e105d7d) - pal (ssh://git@github.com/ARMmbed/pal.git#4e46c0ea8706)
  • [ morpheus-wifi = morpheus ]
  • [ morpheus-wifi = morpheus-armcc ]
  • [ morpheus-wifi = morpheus-iar ]
  • [ morpheus-wifi = morpheus-wifi ]
  • sed -i -e s/ETHERNET/WIFI/g mbed_app.json
    sed: can't read mbed_app.json: No such file or directory

@teetak or @kimlep need some help!

@JanneKiiskila
Copy link
Contributor Author

Pulled back in the mbed_app.json to root, that sorted it. But we'd have to consolidate into something else in the future, I think. But, seems we have loads of different kinds of solutions now. Some are in Jenkins directly, some are in Jenkinsfile etc.

"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
"target_overrides": {
"*": {
"target.features_add": ["LWIP", "NANOSTACK", "COMMON_PAL"],
Copy link
Contributor

Choose a reason for hiding this comment

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

should not need nanostack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, it does! If one does NOT include Nanostack if fails:

jankii01@ubuntu:~/mbed/mbed-os-example-client$ ./build_all.sh
Building project mbed-os-example-client (K64F, GCC_ARM)
Scan: .
Scan: FEATURE_LWIP
Scan: FEATURE_UVISOR
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_BLE
Scan: FEATURE_STORAGE
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_NANOSTACK
Scan: FEATURE_THREAD_END_DEVICE
Scan: mbed
Scan: env
Compile [ 0.3%]: NanostackRfPhyAtmel.cpp
[ERROR] ./atmel-rf-driver/source/NanostackRfPhyAtmel.cpp:18:44: fatal error: nanostack/platform/arm_hal_phy.h: No such file or directory
compilation terminated.

-> it only works w/o NANOSTACK - IF YOU MOVE OUT THE other extra repos. This is due to the "compile all" nature of the mbed! If you move the extra RF-drivers to TARGET_IGNORE -folder, then it works. But that's another pain.

"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
"target_overrides": {
"*": {
"target.features_add": ["LWIP", "NANOSTACK", "COMMON_PAL"],
Copy link
Contributor

Choose a reason for hiding this comment

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

should not need nanostack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, does. Unless you start to move esp, atmel etc. out of the main folder..

"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
"target_overrides": {
"*": {
"target.features_add": ["LWIP", "NANOSTACK", "LOWPAN_ROUTER", "COMMON_PAL"],
Copy link
Contributor

Choose a reason for hiding this comment

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

LWIP not needed here

"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
"target_overrides": {
"*": {
"target.features_add": ["LWIP", "NANOSTACK", "THREAD_ROUTER", "COMMON_PAL"],
Copy link
Contributor

Choose a reason for hiding this comment

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

LWIP not needed here

"mbed-mesh-api.thread-config-channel": 18,
"mbed-mesh-api.thread-config-panid": "0xBAAB",
"lwip.ipv4-enabled": false,
"lwip.ipv6-enabled": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

lwip specifications not needed

"wifi-rx": "PA_12"
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this file needed for something? It should be deleted INMO.

Instead the root folder should have minimal configuration for IPV4 LWIP as baseline. (So that the application will always build for something).

"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
"target_overrides": {
"*": {
"target.features_add": ["NANOSTACK", "LOWPAN_ROUTER", "COMMON_PAL"],
Copy link
Contributor

Choose a reason for hiding this comment

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

nanostack not needed

@@ -72,6 +72,9 @@ def buildStep(target, compilerLabel, toolchain, configName, connectiontype) {
deleteDir()
dir("mbed-os-example-client") {
checkout scm
// Make us "backwards compatible" the easy way...
execute ("cp configs/example.json mbed_app.json")
Copy link
Contributor

Choose a reason for hiding this comment

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

not really needed. We instead need to have basic mbed_app.json in main folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking we shouldn't have any default mbed_app.json in the repo, but rather just copy always one and start from there. That way any potential sed -operations would not touch any trackable items and git operations can be a bit easier then.

@kimlep01
Copy link
Contributor

I am seeing SOCKET_MODE : TCP again with 6lowpan ( same as with #139 ).

Per Marcelo Salazar's proposal add configuration examples to a configs-folder.
By default the repo does not anymore have an mbed_app.json at all, but one should
copy one of the example configs, potentially modify it and use it.

Jenkinsfile was modified to do the copy operation at the beginning.

Add the emac for UBLOX to Wifi configs.

Add mbedignore files to avoid the compilation problems.

Reference:
    #137
Janne Kiiskilä added 4 commits December 13, 2016 13:55
Remove the LWIPs from those, remove the example.json and mbed_app.json
under Configs -folder

Add more builds for the build_all.sh.
Mesh-networking ONLY supports UDP, others support both. Table to
illustrate this.
No need to copy the example.json, because we keep (for now at least)
the mbed_app.json in the root.
The ``` needs to be on it's own line. Still a bit more tweaking
on the UPD/TCP.
@MarceloSalazar MarceloSalazar self-requested a review December 13, 2016 12:35
"wifi-rx": "PA_12"
},
"UBLOX_EVK_ODIN_W2": {
"target.device_has": ["EMAC"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

EMAC is defined for ODIN by default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copied that from the mbed-os-example-wifi, that's on also there.
To be removed from both, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bigger issue seems to be our WiFi stacks don't support IPv6 at all?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll fix wifi example , here's a reference to targets.json file, you cna see EMAC there defined (wifi ON by default). https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L1310

Copy link
Collaborator

Choose a reason for hiding this comment

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

Bigger issue seems to be our WiFi stacks don't support IPv6 at all?

has not been tested neither verified (some bits are missing there) thus for now, unsupported

Based on review comment - it is on by default for ODIN,
no need to add it there (ref: Martin Kojtal).
"wifi-rx": "PA_12"
},
"UBLOX_EVK_ODIN_W2": {
"target.device_has": ["EMAC"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here, EMAC defined by a target

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will remove it. And the whole wifi_v6.json.

Seems the WiFi stacks do not support IPv6 yet, so drop those
from the build_all.sh. There were also some bad namings for binaries,
so fixed those as well.
@JanneKiiskila JanneKiiskila merged commit a9a3580 into master Dec 13, 2016
@JanneKiiskila JanneKiiskila deleted the conf branch December 13, 2016 13:34
JanneKiiskila pushed a commit that referenced this pull request Dec 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants