Skip to content

Adi cog candidate #5097

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

Closed
wants to merge 162 commits into from
Closed

Adi cog candidate #5097

wants to merge 162 commits into from

Conversation

dave-wu
Copy link
Contributor

@dave-wu dave-wu commented Sep 14, 2017

Notes:

  • Pull requests will not be accepted until the submitter has agreed to the contributer agreement.
  • This is just a template, so feel free to use/remove the unnecessary things

Description

Add support for the ADI COG boards: EV-COG-AD3029LZ and EV-COG-AD4050LZ

Status

READY

Migrations

If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.

NO

Related PRs

None

Todos

  • None

Deploy notes

None

Steps to test or reproduce

N/A

U-ANALOG\dwu and others added 30 commits March 23, 2017 16:41
Committer: Edmund Hsu

  Changes to be committed:
 	modified:   objects.h
 	new file:   trng_api.c
  Committer: Hsu <[email protected]>
  Changes to be committed:
 	modified:   targets.json
   Changes to be committed:
 	modified:   .mbedignore
…ectly;

- Increased the TRNG counter value to generate better random values;
- Moved the TRNG enable and counter value setting calls to the init routine as they only need to be done once.
- Fixed some issues with sleep module;
- Modified gpio_api.c to use global gpio driver memory which is now declared in a separate file.
…on of large bin files."

This reverts commit 24f422e55bd8f1134e84c478a772ba8fd90a3f10.
2 renamed LED pin names for EVAL-ADICUP3029
3 enabled greentea test automation for EVAL-ADICUP3029
…the following test suite:

mbed-os-rtos-rtx-target_cortex_m-tests-memory-heap_and_stack
@theotherjimmy
Copy link
Contributor

Hi @dave-wu. Thanks for the contribution! This is HUGE! I have several recommendations to get this in faster:

  1. Split it into multiple, logically distinct/orthogonal, pull requests(PRs).
    i) One PR for each platform could be much smaller
    ii) Doing baseline support and then adding features in subsequent PRs is generally much easier to review and test
  2. Avoid merge commits, rebase instead
  3. Try to include helpful git commit messages. This is a handy guide for improving commit messages.

Now some information on what we can accept. In order to accept any PR into a patch release, we require that the PR does not contain merge commits. By the looks of it, your git history is somewhere between 10 and 20 percent merge commits. It should be possible to rebase these out. Further, we can only accept PRs based on master. It looks to me like you merged with a release branch at some point.

Phew. I recommend breaking this PR into multiple PRs that introduce one thing at a time. This will both make the rebasing easier by reducing the number of commits in each rebase smaller, and make the PRs much easier to review. If you need help with this, just let us know.

@theotherjimmy
Copy link
Contributor

I'm curious, what's the "candidate" in the title supposed to indicate?

@dave-wu
Copy link
Contributor Author

dave-wu commented Sep 15, 2017

Hi Jimmy,

Thanks for the feedback. Based on the requirements for merging, would the following method be acceptable?

  1. I will fork the latest master branch into my own repository;
  2. Add the files/folders for one of the platforms (i.e. EV-COG-AD3029LZ) and commit to the master branch in the fork;
  3. Create a pull request for this change;
  4. Add the files/folders for the other platform to the master branch in the fork;
  5. Create a second pull request for the code in 4.

I think this may be a lot easier than going back and rebasing all the merges/branches etc. and is less error prone. Do you think this approach is workable?

BTW, the name "candidate" was there just to let myself know this is to be used for the pull request, all the files are working and are in release form.

Thanks

@theotherjimmy
Copy link
Contributor

Based on the requirements for merging, would the following method be acceptable?

Yes. The only problem you might encounter is losing your git history. If that does not bother you, then I see no downsides.

Do you think this approach is workable?

Yes.

BTW, the name "candidate" was there just to let myself know this is to be used for the pull request, all the files are working and are in release form.

Thanks for the clarification. For future reference, we take all pull requests as if they were "candidates" by your definition.

@dave-wu
Copy link
Contributor Author

dave-wu commented Sep 17, 2017

Hi Jimmy,

Is there a way to remove my existing dave-wu/mbed-os fork so I can create a new one from the main mbed-os repo? Or can I just fork on top of it and that will overwrite the existing one? Thanks.

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Sep 18, 2017

@dave-wu There is no way to do what you are asking for all at once. Since github just uses git underneath, you can just push (or force push, that is `git push -f) over any branch on your fork. If you provide me with some detail about what you are trying to do, I can offer some suggestions on ways to accomplish it. I'm asking for more high level goals, such as "break a single branch into multiple branches, each containing some of the commits" or "Rewrite git history to look like no merges took place".

Explicitly:

Is there a way to remove my existing dave-wu/mbed-os fork so I can create a new one from the main mbed-os repo?

You can technically do this, but I do not recommend it. It is generally more instructive to try to recover the situation you are it. You would have to go to the settings panel and delete the repo.

Or can I just fork on top of it and that will overwrite the existing one?

You can't do this at all. You would have to either force push a branch to match the original repo or delete your fork (as above) and re-fork it. I recommend using git to force push a branch back to it's original state, in preference to the other option I outlined, as it's less destructive in that it only affects one branch.


These questions indicate to me that you want to rewrite your git history to change the commits in this Pull Request. How about you just try doing that directly with git rebase -i?

Some resources on rebasing can be found here.

@dave-wu
Copy link
Contributor Author

dave-wu commented Sep 18, 2017

Hi Jimmy,

Since the current fork dave-wu/mbed-os.git has all the undesirable merges and branches etc. that you mentioned so I am thinking of:

  1. Getting a fresh fork off the main mbed-os repo;
  2. Add the code for my platforms to the main branch so I can do a compliant pull request
    (I am aware that I'll lose the change history on my code but I am OK with that)

So based on what you said, my understanding is that the best way to get the existing forked repo (i.e. dave-wu/mbed-os.git) to match exactly the main mbed-os trunk (without any of my previous merges and branches) is to clone a fresh copy of the main mbed-os repo and then do a 'push -f ' it to the existing fork to overwrite it, as opposed to deleting the fork and re-forking, is this correct?

Thanks.

@theotherjimmy
Copy link
Contributor

Getting a fresh fork off the main mbed-os repo;

This is an unnecessary step, and not productive

Add the code for my platforms to the main branch so I can do a compliant pull request

I'm just confused by this sentence.

  • What's a complain PR?
  • What would you be complaining about?
  • What "main branch" are you talking about?

my understanding is that the best way to get the existing forked repo (i.e. dave-wu/mbed-os.git) to match exactly the main mbed-os trunk (without any of my previous merges and branches) is to clone a fresh copy of the main mbed-os repo and then do a 'push -f ' it to the existing fork to overwrite it, as opposed to deleting the fork and re-forking, is this correct?

Yes. Although, there is no such branch called "trunk". Generally SVN and CVS calls things "trunk" and git calls them "master".

@dave-wu
Copy link
Contributor Author

dave-wu commented Sep 19, 2017

@theotherjimmy: I have just made a new pull request PR #5137 for just the EV-COG-AD3029LZ board, this should be clean enough to be merged. I haven't yet made a pull request for the EV-COG-AD4050LZ. Should I hold off the pull request for the EV-COG-AD4050LZ until you have merged the EV-COG-AD3029LZ code? Thanks.

@theotherjimmy
Copy link
Contributor

Should I hold off the pull request for the EV-COG-AD4050LZ until you have merged the EV-COG-AD3029LZ code?

That's up to you. It may be easier for you to deal with one PR at once. It may get in faster to do both at the same time.

@dave-wu
Copy link
Contributor Author

dave-wu commented Sep 25, 2017

Closing this PR as it is replaced by 2 separate PRs: #5137 and #5144.

@dave-wu dave-wu closed this Sep 25, 2017
@sg- sg- removed the needs: work label Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants