Skip to content

Add MTS dragonfly, MTS dragonfly l471 #7304

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

cedrickkukela-cd
Copy link
Contributor

@cedrickkukela-cd cedrickkukela-cd commented Jun 23, 2018

Description

Adding Target for Multitech Dragonfly L471QG.
#7177

Pull request type

[  ] Fix
[ ] Refactor
[ X ] New target
[ ] Feature
[ ] Breaking change

@cedrickkukela-cd
Copy link
Contributor Author

@cedrickkukela-cd
Copy link
Contributor Author

adding @maclobdell

@maclobdell
Copy link
Contributor

Hi Cedrick - can you confirm why the two pull request and not one? Updating commits on an existing pull request will work if you want to combine the pull requests. It is easier on our maintainers and test system if there is just one pull request to add a new target. Please let me know what you prefer.

@cedrickkukela-cd
Copy link
Contributor Author

They are not the same, but to pass all the test requires both. This one includes only the changes done under feature. Will other are changes done under target. If merging the two would make things easier let me know.

@maclobdell
Copy link
Contributor

@cedrickkukela-cd - It looks like all the commits for #7177 may have come along for the ride which makes things a bit confusing. Can you make this PR just include the changes (external to the target directory) that you need to enable the cellular interface? This PR can wait for the other PR to get in. If this is all too confusing and a headache, let me know and maybe PR 7177 can be closed in favor of this one.

@cedrickkukela-cd
Copy link
Contributor Author

if it is easier to just use 7177 and it wont delay things. lets just go with that one.

@cedrickkukela-cd cedrickkukela-cd changed the title Mts dragonfly l471 qg pull request feature changes adding targes mts dragonfly Mts dragonfly l471and adding cell support Jun 27, 2018
@maclobdell
Copy link
Contributor

@cedrickkukela-cd - Just to confirm for everyone - based on our conversation, this will be the only pull request that will add support for Dragonfly Nano. Looks like there are still a few outstanding test failures. We'll get more reviewers involved and offer suggestions. In the meantime, please continue your work to isolate and resolve the remaining issues.

@AnttiKauppila
Copy link

@jarvte and @AriParkkila Please review this

Copy link

@AriParkkila AriParkkila left a comment

Choose a reason for hiding this comment

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

It's easy to follow Mbed OS coding conventions, just apply AStyle.exe -n --options=.astylerc filename.h/cpp in mbed-os root-folder.

}
},
"detect_code": ["0312"],
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"],

Choose a reason for hiding this comment

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

CELLULAR_DEVICE need not be defined here, that's defined in CellularTargets.h

Copy link
Contributor

Choose a reason for hiding this comment

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

This has not been answered, still valid?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, remove from here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

RTC_LSE is no more used in TARGET_STM

Copy link
Contributor

Choose a reason for hiding this comment

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

I will be pushing a commit soon. I removed RTC_LSE=1. In CellularTargets.h, I see that CELLULAR_DEVICE is being defined as UBLOX_PPP. However, if I remove "CELLULAR_DEVICE=UBLOX_PPP" from targets.json, it fails to compile at least some tests.

@@ -345,8 +345,14 @@ nsapi_error_t AT_CellularNetwork::open_data_channel()
{
#if NSAPI_PPP_AVAILABLE
tr_info("Open data channel in PPP mode");

#ifdef TARGET_MTS_DRAGONFLY_L471QG

Choose a reason for hiding this comment

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

AT+CGDATA is likely supported. Can you check/share AT manual of the cellular module?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://www.u-blox.com/sites/default/files/SARA-R4-SARA-N4_ATCommands_%28UBX-17003787%29.pdf

AT+CGDATA is not supported on the sara r410 with the currently approved firmware. This was confirmed with a ublox fae.

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 ran the astyle utility on the two file mentioned and above and quite a few lines changed when i diffed. Is this expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cedrickkukela-cd Features are not yet astyled. We will do it soon. Please, just use it on new files in this pull request (note, targets folder is being ignored at the moment, but would be nice if they follow as well - targets HAL implementation).

Choose a reason for hiding this comment

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

@cedrickkukela-cd should this be dynamic? The reason is that maybe TARGET_MTS_DRAGONFLY_L471QG could hold different kind of cellular modules (in the future) and some of those modules might support AT+CGDATA?

For dynamic implementation you could use unsupported flagging, just define AT_CellularBase::SupportedFeature with e.g. flag name AT_CGDATA in you CellularDevice and and then in open_data_channel if (!is_supported(AT_CGDATA)).

Copy link
Contributor

Choose a reason for hiding this comment

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

@cedrickkukela-cd Any update for the question regarding being dynamic?

Copy link
Contributor

Choose a reason for hiding this comment

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

Dynamic would be better then there is no need for extra #ifdef's. You can check how it was done with QUECTEL_BG96.cpp and how it was used in AT_CellularInformation::get_serial_number(..

Choose a reason for hiding this comment

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

@cedrickkukela-cd please see an an example how you could do this at
AriParkkila@c7bd3cb

@maclobdell
Copy link
Contributor

maclobdell commented Jul 5, 2018

I just ran all tests (except cellular and network socket) against the branch referenced in this PR on a new Dragonflay Nano (B01). All passed for IAR, ARM, & GCC_ARM compilers.
Dragonfly_Nano_PR7304_MbedOS_Tests_B01_GCC_ARM_5July2018.txt
Dragonfly_Nano_PR7304_MbedOS_Tests_B01_ARM_6July2018.txt
Dragonfly_nano_PR7304_MbedOS_Tests_IAR_B01_5July2018.txt

@maclobdell
Copy link
Contributor

@cedrickkukela-cd - did you use a json config file to configure and enable Cellular with PPP mode? If so, can you share? Or share any details on how you ran cellular and network socket tests. This will be helpful.

@cedrickkukela-cd
Copy link
Contributor Author

sure
here is the mbed_app i used.

Did you get any further with shield testing?

mbed_app.json.txt

@maclobdell
Copy link
Contributor

maclobdell commented Jul 23, 2018

@0xc0170 - what is the status of the review? From a basic Mbed-OS point of view, I think everything looks good. We are working through an issue with the cellular network connectivity. While we finish that up, can this PR be merged?

@cmonr
Copy link
Contributor

cmonr commented Jul 23, 2018

@maclobdell From the conversation, it looked like there were still changes being made. Thanks for the FYI. We'll take a look at this and puti t through CI soon.

@maclobdell
Copy link
Contributor

@cmonr - please urgently help to complete reviews and testing for this PR. Please tag it appropriately. We believe it is ready to go.

}
},
"detect_code": ["0312"],
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"],
Copy link
Contributor

Choose a reason for hiding this comment

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

This has not been answered, still valid?

"release_versions": ["2", "5"],
"device_name": "STM32L471QG",
"bootloader_supported": true,
"features": ["IPV4", "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.

nanostack not needed anymore as feature, same should be true for 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.

true, common_pal not needed anymore.

gpio_init_inout(&gpio, MDMPWRON, PIN_OUTPUT, OpenDrainNoPull, 1);
#endif
gpio_init_out_ex(&gpio, MDMRTS, 0);
//gpio_init_in_ex(&gpio, MDMCURRENTSENSE, PullNone);
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this dead code?

@@ -345,8 +345,14 @@ nsapi_error_t AT_CellularNetwork::open_data_channel()
{
#if NSAPI_PPP_AVAILABLE
tr_info("Open data channel in PPP mode");

#ifdef TARGET_MTS_DRAGONFLY_L471QG
Copy link
Contributor

Choose a reason for hiding this comment

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

@cedrickkukela-cd Any update for the question regarding being dynamic?

@@ -34,7 +34,11 @@ bool UBLOX_PPP_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_

bool UBLOX_PPP_CellularNetwork::has_registration(RegistrationType reg_type)
{
return (reg_type == C_REG || reg_type == C_GREG);
#ifdef TARGET_DRAGONFLY_L471QG
return (reg_type == C_REG || reg_type == C_EREG);
Copy link
Contributor

Choose a reason for hiding this comment

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

misaligned (2 spaces more here or tab used?) ?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 6, 2018

@cmonr - please urgently help to complete reviews and testing for this PR. Please tag it appropriately. We believe it is ready to go.

👍 I left only few questions.

@ARMmbed/mbed-os-wan Please review this target addition. @AriParkkila left few comments but was not certain if this was requesting changes or approved with minor comments?

@0xc0170 0xc0170 requested a review from a team August 6, 2018 13:21
@AnttiKauppila
Copy link

@jarvte Can you review from Cellular perspective as Ari is on holiday?

}
},
"detect_code": ["0312"],
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, remove from here.

"release_versions": ["2", "5"],
"device_name": "STM32L471QG",
"bootloader_supported": true,
"features": ["IPV4", "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.

true, common_pal not needed anymore.

@@ -345,8 +345,14 @@ nsapi_error_t AT_CellularNetwork::open_data_channel()
{
#if NSAPI_PPP_AVAILABLE
tr_info("Open data channel in PPP mode");

#ifdef TARGET_MTS_DRAGONFLY_L471QG
Copy link
Contributor

Choose a reason for hiding this comment

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

Dynamic would be better then there is no need for extra #ifdef's. You can check how it was done with QUECTEL_BG96.cpp and how it was used in AT_CellularInformation::get_serial_number(..

@maclobdell
Copy link
Contributor

@cedrickkukela-cd @felser Please evaluate the review comments on this PR. Let's work closely to get this merged.

@0xc0170 0xc0170 changed the title adding targes mts dragonfly Mts dragonfly l471and adding cell support Add MTS dragonfly, MTS dragonfly l471 Aug 22, 2018
@cmonr
Copy link
Contributor

cmonr commented Aug 24, 2018

@cedrickkukela-cd @maclobdell Have there been any updates?

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Just one git file edit

@@ -34,7 +34,15 @@ bool UBLOX_PPP_CellularNetwork::get_modem_stack_type(nsapi_ip_stack_t requested_

AT_CellularNetwork::RegistrationMode UBLOX_PPP_CellularNetwork::has_registration(RegistrationType reg_type)
{
//<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

This is git edit here (can you clean up this file ( the commenst should not be added here)

Copy link
Contributor

Choose a reason for hiding this comment

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

I pushed up this change.

define region SRAM1_region = mem:[from __region_SRAM1_start__ to __region_SRAM1_end__];

/* Stack complete SRAM2 and Heap 1/3 of SRAM1 */
define symbol __size_cstack__ = 0x7e00;
Copy link
Contributor

Choose a reason for hiding this comment

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

There's an effort to bring this to 1k (please update)

Copy link
Contributor

@maclobdell maclobdell Oct 2, 2018

Choose a reason for hiding this comment

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

@0xc0170 - are you talking about the default stack or heap size? Do you mean 1K size or 1K alignment? For IAR, in order to get the tests passing, the heap must be explicitly set to a value with enough room to support the networking stack. Is this a blocking issue? If not, please approve so MultiTech can meet their deadline of releasing this code.

Copy link
Contributor

@0xc0170 0xc0170 Oct 2, 2018

Choose a reason for hiding this comment

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

__size_cstack__ stack size - to be aligned with #7238 - provides reasons for the size

Copy link
Contributor

Choose a reason for hiding this comment

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

Stack decreased to 0x400/1KB.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Just that stack for IAR and the rest LGTM

@maclobdell
Copy link
Contributor

@0xc0170 - please confirm that the latest change addresses your feedback and this PR is ready to merge.

@jarvte
Copy link
Contributor

jarvte commented Oct 4, 2018

@cmonr my comments have been fixed

@maclobdell
Copy link
Contributor

@0xc0170 , @cmonr - please wrap up the review and merge. this PR is urgent to get completed.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 5, 2018

@cmonr my comments have been fixed

Leave review feedback (approve - to dismiss the previous one). I'll dismiss it

Seems I cant as it was changed :)

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 5, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 5, 2018

Build : SUCCESS

Build number : 3251
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7304/

Triggering tests

/morph test
/morph mbed2-build

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 5, 2018

/morph export-build

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 5, 2018

/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 5, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 6, 2018

@adbridge
Copy link
Contributor

adbridge commented Oct 8, 2018

This PR contains conflicting changes with #7969 (which is scheduled for 5.11), thus pushing this out also.

@maclobdell
Copy link
Contributor

Hi Anna - This PR is critical to get into 5.10.1. It cannot wait any longer. There is a product release depending on this PR.

@adbridge
Copy link
Contributor

adbridge commented Oct 8, 2018

@maclobdell Please talk to @ChiefBureaucraticOfficer

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.