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

Enable MTS_DRAGONFLY_F411RE to register with Pelion #10287

Merged
merged 4 commits into from
May 10, 2019

Conversation

linlingao
Copy link
Contributor

@linlingao linlingao commented Apr 1, 2019

Description

Enable MTS_DRAGONFLY_F411RE to register with Pelion

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@linlingao linlingao changed the title Correct NVIC flash vector address for application Correct NVIC flash vector address for application - DO NOT MERGE YET Apr 1, 2019
@ciarmcom
Copy link
Member

ciarmcom commented Apr 1, 2019

@linlingao, thank you for your changes.
@ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-storage please review.

@ciarmcom ciarmcom requested review from a team April 1, 2019 21:00
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2019

Correct NVIC flash vector address for application - DO NOT MERGE YET #10287

Let us know once ready. This looks like some fixes can be sent separately (fixing target code)

@linlingao
Copy link
Contributor Author

@0xc0170 The target code is ready to be merged. Since I needed the SPI changes from @bentcooke, those commits were rolled into this PR. I'm planning to wait for Ben's changes to go in first then rebase.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 4, 2019

What is the PR number (depending PR here) ?

@linlingao
Copy link
Contributor Author

@0xc0170 #10177

@cmonr
Copy link
Contributor

cmonr commented Apr 8, 2019

@linlingao Would you happen to know what'll happen with this PR since #10177 was closed?

@linlingao
Copy link
Contributor Author

@cmonr I think @bentcooke will either reopen it or refactor the code in another PR.

@linlingao linlingao changed the title Correct NVIC flash vector address for application - DO NOT MERGE YET Correct NVIC flash vector address for application Apr 11, 2019
@linlingao
Copy link
Contributor Author

@0xc0170 @cmonr This PR is ready to be reviewed/merged.
We have received a new module with a SPIF supporting SFDP. So changes pertinent to no SFDP that were pulled in from PR10177 are no longer needed. I have therefore removed those changes.

@cmonr
Copy link
Contributor

cmonr commented Apr 11, 2019

@linlingao Mind rebasing?

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.

Looks fine to me ,one clarification for functionality removal.

targets/targets.json Show resolved Hide resolved
@linlingao
Copy link
Contributor Author

Rebased.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2019

Can you rebase instead of merge ? The commit 849b05a is not needed here

@linlingao
Copy link
Contributor Author

@0xc0170 @cmonr I rebased. @bentcooke would like to double check with Mutitech to make sure it's okay to remove their bootloader. Please don't merge yet.

@felser
Copy link
Contributor

felser commented May 1, 2019

I built the blinky application for the Dragonfly without adding "target.post_binary_hook:null" to mbed_app.json. The size looks like it includes the bootloader but it's not ours. If ours is included, you can enter it by hitting any key, on the debug port, upon reset. That's not working. You can see it work with our AT pass through code found here: ftp://ftp.multitech.com/wireless/MTQ/

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Quite a nice solution! I have a few questions/suggestions below.

features/lwipstack/mbed_lib.json Outdated Show resolved Hide resolved
if hasattr(self.target, 'post_binary_hook'):
if self.target.post_binary_hook is None:
define_string = self.make_ld_define(
"DISABLE_POST_BINARY_HOOK", 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Really neat idea. I want to run a slight tweak by you and see what you think.

Naming the macro DISABLE_POST_BINARY_HOOK implies that a post binary hook is usually enabled. In general, this isn't the case, only a few targets use post binary hooks. How do you feel about changing this to macro to POST_BINARY_HOOK_ENABLED? So that would mean if post_binary_hook is not null, POST_BINARY_HOOK_ENABLED would be set to 1, otherwise it'd be set to 0?

I think this tweak makes the solution a bit more generic and potentially useful for other targets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I named it "DISABLE_POST_BINARY_HOOK" is because for those targets that have post_binary_hook, they're actually enabled in target.json. When you override it with null (uncommon case), it's becoming a "disable". I think you might come from a different perspective where most targets do not have post_binary_hook, yes?

@linlingao
Copy link
Contributor Author

@felser I didn't change your bootloader. Mbed bootloader is not checked in so there's no way to include it. I'm not aware of any other bootloaders. Is it possible the MTS bootloader in the repo is out of date?

@linlingao
Copy link
Contributor Author

@bridadan WRT the stack size, I knew I could override it in mbed_app.json. I did it on purpose since the stack size was okay prior to 5.12.2(?) release, but in the latest code, it's no longer enough. I would expect this issue to show up in all applications.

@felser
Copy link
Contributor

felser commented May 1, 2019

Sorry, not sure what I did. Must have been "operator error"... our bootloader is working.

Copy link
Contributor

@felser felser left a comment

Choose a reason for hiding this comment

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

Approving the PR. Bootloader is working as expected with default settings.

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.

Target override for lwip in targets.json file for specific target to be set

@linlingao
Copy link
Contributor Author

I have reluctantly increased the tcpip stack just for this board. I think it would be a more proactive approach to increase the stack size for all boards so that we don't have to fix this same issue again and again. Our users tend to panic when they see a fault. Not everyone feels comfortable to go in and override the settings. Oh well, enough said.

@0xc0170
Copy link
Contributor

0xc0170 commented May 3, 2019

I have reluctantly increased the tcpip stack just for this board. I think it would be a more proactive approach to increase the stack size for all boards so that we don't have to fix this same issue again and again. Our users tend to panic when they see a fault. Not everyone feels comfortable to go in and override the settings. Oh well, enough said.

@SeppoTakalo Please review the feedback

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.

One last question about DISABLE binary hook macro:

@bridadan proposed to have POST_BINARY_HOOK_ENABLED - wouldnt it be better ? set to 0 if not enabled, 1 if enabled. The linker scripts here would use this value.

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

After going over it with @linlingao, she made a good argument that this is a lower touch change. My suggestion would add a new macro to every linker script. Generally I don't like the negative macro names (DISABLE_X) with positive values (1). But in this case I think its probably fine.

@linlingao
Copy link
Contributor Author

@0xc0170 Is there work needed from my side? Can we merge this PR?

@0xc0170
Copy link
Contributor

0xc0170 commented May 10, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented May 10, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@adbridge
Copy link
Contributor

Restarted exporters

@adbridge adbridge merged commit 97e1c9c into ARMmbed:master May 10, 2019
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.

9 participants