Dear micropython experts,
This is Rocky Song from NXP, principal System&Apps engineer of MICR (microcontroller & microprocessor) Business Line, I work in NXP Beijing site, China.
I preliminarily ported pyboard to LPC54608 using SDK by cloning the "STMHAL" (now STM32) port, I've added basic modules including USB VCP and MSC, LED, I also created a KEIL project (using ARM CC toolchain) for easy learning and debugging.
My first stage plan is porting the functionalities of pyboard to all proper NXP MCUs (in particular, the flash size or parts that has no flash) using SDK for current primary NXP parts and coming parts; later, I plan to add some application level enablement that can leverage NXP MCU's strong points, rather than wrappers of calling peripheral directly.
Because github is slow in my place and I'm not familiar with github, I so far haven't put the code to github, currently my code is put to https://bitbucket.org/RockySong/mpy_lpx546
Hope to get your comments on how to migrate the code to micropython git hub,I‘ve read contribution guidlines however I don't get clear method
Best regards
Rocky Song
Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
Rocky Song
I am interested in your project and would like to help, I am also a beginner. I have cloned your bitbucket repository to GitHub at
https://github.com/dave-abq/mpy_lpx546
Let me know if it looks satisfactory.
Give me a way to contact you via direct email, and I can arrange to add you to a team on this repository. I would like to work with you to get your files into the format for a pull request to the main Micropython repository, but I am also new to that process.
Dave
I am interested in your project and would like to help, I am also a beginner. I have cloned your bitbucket repository to GitHub at
https://github.com/dave-abq/mpy_lpx546
Let me know if it looks satisfactory.
Give me a way to contact you via direct email, and I can arrange to add you to a team on this repository. I would like to work with you to get your files into the format for a pull request to the main Micropython repository, but I am also new to that process.
Dave
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
This might not be very easy becasue there's no link to github anymore because you just copied all files, then started working in Bitbucket. To make things worse this was before the recent change where all ports are moved to the port directory. But it should be doable:
- figure out from which commit in the official github repository you copied the files
- fork the repo on github, clone it into new directory
- copy everything you currently have into that directory, overwriting files as needed
- build to make sure that works, else adjsut code
- make one or more commits in which you add the port
- rebase your latest commit on top of latest master
- solve conflicts if any
- move your directory into the ports/ directory
- fix build, commit
- rebase/squash commits if needed
- push, create pull request
- figure out from which commit in the official github repository you copied the files
- fork the repo on github, clone it into new directory
- copy everything you currently have into that directory, overwriting files as needed
- build to make sure that works, else adjsut code
- make one or more commits in which you add the port
- rebase your latest commit on top of latest master
- solve conflicts if any
- move your directory into the ports/ directory
- fix build, commit
- rebase/squash commits if needed
- push, create pull request
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
I thought programming was difficult until I discovered Git
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
Rocky
I worked for a while with my colleague here, and we agree with stijn. He outlines a good path to bring your code into mainstream Micropython.
From what we were able to tell, your Bitbucket original commit differed substantially from any versions of the main GitHub Micropython repository that we compared to... and we went back a quite a few commits from 14 August 2017 and earlier, just before your 15 August original commit on Bitbucket. Do you have access to the original fork from Github that your work comes from?
Painful as it sounds, if you do not have that access, one path might be to start from a recent Micropython clone and redo your NPX-specific changes in the new context.
Would you like me to clone the latest, or some other (earlier), Github repository, into a Bitbucket Repository? I could be a bit of a bridge for you, if that helps with any of your access challenges. You could work in Bitbucket until the time comes to merge into the Micropython repository.
I look forward to your progress and perhaps collaborating with you on this. Please do contact me for offline discussion if that is helpful.
Dave
I worked for a while with my colleague here, and we agree with stijn. He outlines a good path to bring your code into mainstream Micropython.
From what we were able to tell, your Bitbucket original commit differed substantially from any versions of the main GitHub Micropython repository that we compared to... and we went back a quite a few commits from 14 August 2017 and earlier, just before your 15 August original commit on Bitbucket. Do you have access to the original fork from Github that your work comes from?
Painful as it sounds, if you do not have that access, one path might be to start from a recent Micropython clone and redo your NPX-specific changes in the new context.
Would you like me to clone the latest, or some other (earlier), Github repository, into a Bitbucket Repository? I could be a bit of a bridge for you, if that helps with any of your access challenges. You could work in Bitbucket until the time comes to merge into the Micropython repository.
I look forward to your progress and perhaps collaborating with you on this. Please do contact me for offline discussion if that is helpful.
Dave
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
Yes but after you push through with the initial learning curve it's a joy to work with. Well and after that there's still more learning curve (reflog etc.) but I even never went there as I never seem to need those features.
Re: Preliminary pyboard port to NXP MCUs ---- how to add to micropython repository
Hi Dave,
Many thanks for your interest! My working mail is "rocky.song@nxp.com", my WeChat ID is "RockyJoyin", I do hope to work in a team! Should you meet errors in building under KEIL please let me know.
I started my porting on micropython release v1.9.1, and cloned many files from the STMHAL port.
During creating KEIL project for ARMCCv5, I changed some code of mpy that is bound to GCC (most of which are inline asm, header, and compiler extensions), so they can build under KEIL, it could be a reason why it does not like any mpy revision.
My next close plan is implementing/refractoring modules for UART, I2C, SPI for LPC546xx with NXP SDK, hopely to be done within Oct. Meanwhile, I'll adjust makefile to ensure it builds under GCC (currently I only ensure make can pass the generated header stage:)).
Besides LPC546xx, I also plan to do serious mpy enablement on the new NXP i.MX RT1050 crossover processor, which is a dramatic powerful 600MHz Cortex-M7 with many resources, and has <3USD @ 10kpcs, I hope to let mpy to finally become a serious platform for MCU application development.
@stijn,
Many thanks fo your guidelines, it does not look like trival work and I plan to do that after I complete UART, I2C and SPI modules than do the migration seriously, it will be grateful if you or someone else can help me on migration.
I'm in public holiday until Oct. 8 with some family affairs occupying me, I'll update soon.
Best regards
Rocky Song
Many thanks for your interest! My working mail is "rocky.song@nxp.com", my WeChat ID is "RockyJoyin", I do hope to work in a team! Should you meet errors in building under KEIL please let me know.
I started my porting on micropython release v1.9.1, and cloned many files from the STMHAL port.
During creating KEIL project for ARMCCv5, I changed some code of mpy that is bound to GCC (most of which are inline asm, header, and compiler extensions), so they can build under KEIL, it could be a reason why it does not like any mpy revision.
My next close plan is implementing/refractoring modules for UART, I2C, SPI for LPC546xx with NXP SDK, hopely to be done within Oct. Meanwhile, I'll adjust makefile to ensure it builds under GCC (currently I only ensure make can pass the generated header stage:)).
Besides LPC546xx, I also plan to do serious mpy enablement on the new NXP i.MX RT1050 crossover processor, which is a dramatic powerful 600MHz Cortex-M7 with many resources, and has <3USD @ 10kpcs, I hope to let mpy to finally become a serious platform for MCU application development.
@stijn,
Many thanks fo your guidelines, it does not look like trival work and I plan to do that after I complete UART, I2C and SPI modules than do the migration seriously, it will be grateful if you or someone else can help me on migration.
I'm in public holiday until Oct. 8 with some family affairs occupying me, I'll update soon.
Best regards
Rocky Song