-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add MTS dragonfly, MTS dragonfly l471 #7304
Conversation
adding test results IARresult3.txt |
adding @maclobdell |
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. |
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. |
@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. |
if it is easier to just use 7177 and it wont delay things. lets just go with that one. |
@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. |
@jarvte and @AriParkkila Please review this |
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 easy to follow Mbed OS coding conventions, just apply AStyle.exe -n --options=.astylerc filename.h/cpp
in mbed-os root-folder.
targets/targets.json
Outdated
} | ||
}, | ||
"detect_code": ["0312"], | ||
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"], |
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.
CELLULAR_DEVICE
need not be defined here, that's defined in CellularTargets.h
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.
This has not been answered, still valid?
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.
Yes, remove from 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.
RTC_LSE is no more used in TARGET_STM
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 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 |
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.
AT+CGDATA
is likely supported. Can you check/share AT manual of the cellular module?
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.
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.
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 ran the astyle utility on the two file mentioned and above and quite a few lines changed when i diffed. Is this expected.
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.
@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).
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.
@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))
.
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.
@cedrickkukela-cd Any update for the question regarding being dynamic?
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.
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(..
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.
@cedrickkukela-cd please see an an example how you could do this at
AriParkkila@c7bd3cb
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. |
@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. |
sure Did you get any further with shield testing? |
@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? |
@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. |
@cmonr - please urgently help to complete reviews and testing for this PR. Please tag it appropriately. We believe it is ready to go. |
targets/targets.json
Outdated
} | ||
}, | ||
"detect_code": ["0312"], | ||
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"], |
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.
This has not been answered, still valid?
targets/targets.json
Outdated
"release_versions": ["2", "5"], | ||
"device_name": "STM32L471QG", | ||
"bootloader_supported": true, | ||
"features": ["IPV4", "NANOSTACK", "COMMON_PAL"] |
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.
nanostack not needed anymore as feature, same should be true for common_pal
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.
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); |
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.
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 |
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.
@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); |
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.
misaligned (2 spaces more here or tab used?) ?
👍 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? |
@jarvte Can you review from Cellular perspective as Ari is on holiday? |
targets/targets.json
Outdated
} | ||
}, | ||
"detect_code": ["0312"], | ||
"macros_add": [ "RTC_LSE=1", "CELLULAR_DEVICE=UBLOX_PPP"], |
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.
Yes, remove from here.
targets/targets.json
Outdated
"release_versions": ["2", "5"], | ||
"device_name": "STM32L471QG", | ||
"bootloader_supported": true, | ||
"features": ["IPV4", "NANOSTACK", "COMMON_PAL"] |
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.
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 |
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.
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(..
@cedrickkukela-cd @felser Please evaluate the review comments on this PR. Let's work closely to get this merged. |
@cedrickkukela-cd @maclobdell Have there been any updates? |
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.
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 |
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.
This is git edit here (can you clean up this file ( the commenst should not be added 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.
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; |
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.
There's an effort to bring this to 1k (please update)
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.
@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.
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.
__size_cstack__
stack size - to be aligned with #7238 - provides reasons for the size
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.
Stack decreased to 0x400/1KB.
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.
Just that stack for IAR and the rest LGTM
@0xc0170 - please confirm that the latest change addresses your feedback and this PR is ready to merge. |
@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 :) |
/morph build |
Build : SUCCESSBuild number : 3251 Triggering tests/morph test |
/morph export-build |
/morph mbed2-build |
Exporter Build : SUCCESSBuild number : 2845 |
Test : SUCCESSBuild number : 3058 |
This PR contains conflicting changes with #7969 (which is scheduled for 5.11), thus pushing this out also. |
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. |
@maclobdell Please talk to @ChiefBureaucraticOfficer |
Description
Adding Target for Multitech Dragonfly L471QG.
#7177
Pull request type