You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/06/04 13:52:11 UTC

[GitHub] [incubator-nuttx] davids5 opened a new pull request #1193: nuttx compiler.h: Add location directive

davids5 opened a new pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193


   ## Summary
   
      The ability to locate data in different sections
      is becoming critical and common place in cores with multiple
      bus matrices and power domains, where DMA can be limited to
      a specific memory.
   
   ## Impact
     None.
   ## Testing
   By inspection
   
   `make && arm-none-eabi-nm nuttx | grep spi`
   ```
   24000070 d g_spi6dev
   38000080 d g_spi6_rxbuf
   38000000 d g_spi6_txbuf
   ```
   The test case will be in a following PR if this is accepted upstream
   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193#discussion_r435678289



##########
File path: include/nuttx/compiler.h
##########
@@ -107,6 +107,10 @@
 
 #  define aligned_data(n) __attribute__ ((aligned(n)))
 
+/* Data location */
+
+#  define locate_data(n) __attribute__ ((section(n)))

Review comment:
       LGTM.




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193#discussion_r435470423



##########
File path: include/nuttx/compiler.h
##########
@@ -107,6 +107,10 @@
 
 #  define aligned_data(n) __attribute__ ((aligned(n)))
 
+/* Data location */
+
+#  define locate_data(n) __attribute__ ((section(n)))

Review comment:
       @xiaoxiang781216 - done. 




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193


   


----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193#discussion_r435280078



##########
File path: include/nuttx/compiler.h
##########
@@ -107,6 +107,10 @@
 
 #  define aligned_data(n) __attribute__ ((aligned(n)))
 
+/* Data location */
+
+#  define locate_data(n) __attribute__ ((section(n)))

Review comment:
       Since __attribute__ ((section(n))) can also apply to function, could we give a more general name here?




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193#discussion_r435281778



##########
File path: include/nuttx/compiler.h
##########
@@ -107,6 +107,10 @@
 
 #  define aligned_data(n) __attribute__ ((aligned(n)))
 
+/* Data location */
+
+#  define locate_data(n) __attribute__ ((section(n)))

Review comment:
       sure or we can add `locate_code` and keep the abstraction




----------------------------------------------------------------
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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1193: nuttx compiler.h: Add location directive

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #1193:
URL: https://github.com/apache/incubator-nuttx/pull/1193#discussion_r435284087



##########
File path: include/nuttx/compiler.h
##########
@@ -107,6 +107,10 @@
 
 #  define aligned_data(n) __attribute__ ((aligned(n)))
 
+/* Data location */
+
+#  define locate_data(n) __attribute__ ((section(n)))

Review comment:
       good!




----------------------------------------------------------------
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