You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by GitBox <gi...@apache.org> on 2019/12/30 13:43:18 UTC

[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #16: feature k210

masayuki2009 opened a new pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16
 
 
   **Summary**
   
   - Added initial support for Sipeed Maix Bit board with Kendryte K210 processor.
   - K210 has two RV64GC cores but in this PR only the primary core is enabled.
   
   **Impact**
     
   - Some common files for RISC-V have been modified to support RV64GC.
   -   I also checked this PR with my SparkFun RED-V Plus which has SiFive FE310 core (RV32IMAC)
   
   **Limitations / TODO**
   
   - Because this is a initial porting some drivers such as GPIO/I2C/SPI are missing.
   - Also, nuttx (elf file) must be loaded with openocd-k210.
   
    These limitations and TODO are described in README.txt under the board directory.
   
   **Testing**
   
   - I confirmed that ostest passed. Also, basic commands such as uname/ps/free/sleep work as well.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#discussion_r362002179
 
 

 ##########
 File path: include/stdint.h
 ##########
 @@ -273,8 +273,13 @@ typedef _uint64_t           uint_fast64_t;
 
 /* Integer types capable of holding object pointers */
 
+#ifdef __LP64__
+typedef long                intptr_t;
+typedef unsigned long       uintptr_t;
+#else
 typedef _intptr_t           intptr_t;
 typedef _uintptr_t          uintptr_t;
+#endif
 
 
 Review comment:
   I don't believe that this is a correct change.  You chould not put any CPU specific definitions in the POSIX standard stdint.h.  That is the wrong way to go.
   
   Instead, you need to change arch/risc-v/include/types.h.  That is the appropriate place for this change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#discussion_r362002179
 
 

 ##########
 File path: include/stdint.h
 ##########
 @@ -273,8 +273,13 @@ typedef _uint64_t           uint_fast64_t;
 
 /* Integer types capable of holding object pointers */
 
+#ifdef __LP64__
+typedef long                intptr_t;
+typedef unsigned long       uintptr_t;
+#else
 typedef _intptr_t           intptr_t;
 typedef _uintptr_t          uintptr_t;
+#endif
 
 
 Review comment:
   I don't believe that this is a correct change.  You should not put any CPU specific definitions in the POSIX standard stdint.h.  That is the wrong way to go.  It violates the basic layering within the OS.
   
   Instead, you need to change arch/risc-v/include/types.h.  That is the appropriate place for this change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#discussion_r362002179
 
 

 ##########
 File path: include/stdint.h
 ##########
 @@ -273,8 +273,13 @@ typedef _uint64_t           uint_fast64_t;
 
 /* Integer types capable of holding object pointers */
 
+#ifdef __LP64__
+typedef long                intptr_t;
+typedef unsigned long       uintptr_t;
+#else
 typedef _intptr_t           intptr_t;
 typedef _uintptr_t          uintptr_t;
+#endif
 
 
 Review comment:
   I don't believe that this is a correct change.  You should not put any CPU specific definitions in the POSIX standard stdint.h.  That is the wrong way to go.
   
   Instead, you need to change arch/risc-v/include/types.h.  That is the appropriate place for this change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Re: [GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #16: feature k210

Posted by Nathan Hartman <ha...@gmail.com>.
On Mon, Dec 30, 2019 at 11:32 PM Gregory Nutt <sp...@gmail.com> wrote:
> > I seemed to have dropped off the face of the earth for a few days
> > because of overtime to get some projects shipped. But I did not
> > forget. I'm working on it now.
>
> Sorry... didn't mean to rush you.  If you can get a little more
> framework with some inline writing instructions or whatever, then I will
> try to help more.  I don't mean to leave you holding the bag (again).

Hi,

No problem! I work on this with pleasure.

I did some reorganization in the document, banged out some more text,
and added some outline/REVISIT... I hope it's helpful. I've been
struggling with "writer's block" tonight. Feel free to edit/improve
anything you like. Nothing I wrote is set in stone.

It's now well past 1:00 AM for me and I'm getting up early for work,
so I have to call it a night now, but I'll continue working on the
workflow soon. In the meantime, I hope that in addition to you working
on it, other community members will be inspired to do so as well...

Be back soon...
Nathan

Re: [GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #16: feature k210

Posted by Gregory Nutt <sp...@gmail.com>.
> I seemed to have dropped off the face of the earth for a few days
> because of overtime to get some projects shipped. But I did not
> forget. I'm working on it now.

Sorry... didn't mean to rush you.  If you can get a little more 
framework with some inline writing instructions or whatever, then I will 
try to help more.  I don't mean to leave you holding the bag (again).

Greg


Re: [GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #16: feature k210

Posted by Nathan Hartman <ha...@gmail.com>.
On Mon, Dec 30, 2019 at 9:42 PM Gregory Nutt <sp...@gmail.com> wrote:
> >   Review comment:
> >     @patacongo Thanks for the comment. I understand what I should do. I'll fix the commits and force to push again.
>
> No rush.  PRs are stuck in the process now.  We (actually Nathan) had
> just started the Workflow requirements when the holidays hit us and
> brought everything to a halt (along with some other holiday drama).  So
> there is a small backlog building up until we can clearly define that
> Workflow.
>
> Nathan... Do you have an ETA when you will be able to work on the that
> document?  I don't mind helping out if you can flesh out the outline a
> little better.  It is pretty cryptic in places now.

Hi Greg,

I seemed to have dropped off the face of the earth for a few days
because of overtime to get some projects shipped. But I did not
forget. I'm working on it now.

Nathan

Re: [GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #16: feature k210

Posted by Gregory Nutt <sp...@gmail.com>.
>   Review comment:
>     @patacongo Thanks for the comment. I understand what I should do. I'll fix the commits and force to push again.

No rush.  PRs are stuck in the process now.  We (actually Nathan) had 
just started the Workflow requirements when the holidays hit us and 
brought everything to a halt (along with some other holiday drama).  So 
there is a small backlog building up until we can clearly define that 
Workflow.

Nathan... Do you have an ETA when you will be able to work on the that 
document?  I don't mind helping out if you can flesh out the outline a 
little better.  It is pretty cryptic in places now.

Greg


[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on a change in pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#discussion_r362137425
 
 

 ##########
 File path: include/stdint.h
 ##########
 @@ -273,8 +273,13 @@ typedef _uint64_t           uint_fast64_t;
 
 /* Integer types capable of holding object pointers */
 
+#ifdef __LP64__
+typedef long                intptr_t;
+typedef unsigned long       uintptr_t;
+#else
 typedef _intptr_t           intptr_t;
 typedef _uintptr_t          uintptr_t;
+#endif
 
 
 Review comment:
   @patacongo Thanks for the comment. I understand what I should do. I'll fix the commits and force to push again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo merged pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
patacongo merged pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] masayuki2009 commented on issue #16: feature k210

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on issue #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#issuecomment-569855598
 
 
   @patacongo I fixed what you pointed out and pushed again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #16: feature k210

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #16: feature k210
URL: https://github.com/apache/incubator-nuttx/pull/16#discussion_r362002179
 
 

 ##########
 File path: include/stdint.h
 ##########
 @@ -273,8 +273,13 @@ typedef _uint64_t           uint_fast64_t;
 
 /* Integer types capable of holding object pointers */
 
+#ifdef __LP64__
+typedef long                intptr_t;
+typedef unsigned long       uintptr_t;
+#else
 typedef _intptr_t           intptr_t;
 typedef _uintptr_t          uintptr_t;
+#endif
 
 
 Review comment:
   I don't believe that this is a correct change.  You should not put any CPU specific definitions in the POSIX standard stdint.h.  That is the wrong way to go.  It violates the basic layering within the OS.
   
   Instead, you need to change arch/risc-v/include/types.h.  That is the appropriate place for this change.  arch/risc-v/include/types.h defines _intptr_t and _uintptr_t and is included by include/stdint.h.  This was designed this way to specifically to prohibit CPU-specific changes in stdint.h.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services