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/01/24 15:34:09 UTC

[GitHub] [incubator-nuttx] han1raaijmakers opened a new pull request #160: Nxp drone boards

han1raaijmakers opened a new pull request #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160
 
 
   S32K1xx board support has been updated with some bug fixes
   Addition of rddrone-uavcan boards based on the S32K1xx processor

----------------------------------------------------------------
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] davids5 commented on a change in pull request #160: Nxp drone boards

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

 ##########
 File path: arch/arm/src/s32k1xx/s32k1xx_enet.c
 ##########
 @@ -222,7 +231,7 @@
  *             = 23
  */
 
-#define S32K1XX_MII_SPEED  0x38 /* 100Mbs. Revisit and remove hardcoded value */
+#define S32K1XX_MII_SPEED  0x0F /* 100Mbs. Revisit and remove hardcoded value */
 
 Review comment:
   ```suggestion
   #define S32K1XX_MII_SPEED  0x0f /* 100Mbs. Revisit and remove hardcoded value */
   ```

----------------------------------------------------------------
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] jarivanewijk commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-582817302
 
 
   @davids5 - As discussed, the branch was again rebased onto latest master. The defconfigs were still up-to-date and no additional style fixes were needed since last week.
   
   Please review this so we can get this monster of a PR merged.
   
   In particular, have a look at the few files in /arch/arm/src that do not belong to the s32k1xx arch. We fixed a few small bugs for kinetis and imxrt that we also found in s32k1xx arch.
   Additionally, please have a quick look at the board configurations that we added. We would like to know if in general everything is in the right place.

----------------------------------------------------------------
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] jarivanewijk commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579360128
 
 
   I have started to fix some of the code style errors, but I still have many files to check. 
   
   I noticed that a lot of errors have been there since the initial port to S32K. I am not sure how strictly enforced these rules are, and I am trying to fix as many as I can, but for now I have left a lot of the "long line" errors untouched.

----------------------------------------------------------------
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 edited a comment on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579405452
 
 
   @davids5 "he nxstyle tool was updated and is finding more things now. -m 86"  This is no longer true.
   
   The tool now automatically calculates the line width from the block comments.  For most files, that will be 78.  -m 86 should NOT be used.  That used to be the maximum line width but now has a different meaning.  It is NOW the line width increment.  If you wanted the usual -m86 in the past, you would now need to select -m 8 because 78+8 = 86
   
   The idea is to allow a SMALL tolerance for longer lines, but don't use -m 86, that would result in 78+86=164 which is not small.

----------------------------------------------------------------
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 issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579436814
 
 
   The "ruler length" must be the same on every block comment, otherwise an error will be generated.  Lines of code must be less than or equal to the ruler length (plus -m slop).  Given the idea of "the longest line of code" makes no sense to me.
   

----------------------------------------------------------------
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] davids5 commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
davids5 commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579435786
 
 
   @patacongo - what is the requirement to pass coding standard check or said another way what is now considered acceptable? 
   
   Is it up to 8 characters past the ruler (comment block length)?  Why is it not the longest line of code (or define) that sets the ruler length?

----------------------------------------------------------------
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] davids5 commented on a change in pull request #160: Nxp drone boards

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

 ##########
 File path: boards/arm/s32k1xx/s32k144evb/include/board.h
 ##########
 @@ -0,0 +1,164 @@
+/****************************************************************************
+ * boards/arm/s32k1xx/s32k144evb/include/board.h
+ *
+ *   Copyright (C) 2019 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <gn...@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_S32K144EVB_INCLUDE_BOARD_H
+#define __BOARDS_ARM_S32K144EVB_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#  include <stdbool.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+/* The S32K144EVB is fitted with a 8MHz Crystal */
+
+#define BOARD_XTAL_FREQUENCY 8000000
+
+/* The S32K144 will run at 112MHz */
+
+/* LED definitions **********************************************************/
+
+/* The S32K144EVB has one RGB LED:
+ *
+ *   RedLED   PTD15 (FTM0 CH0)
+ *   GreenLED PTD16 (FTM0 CH1)
+ *   BlueLED  PTD0  (FTM0 CH2)
+ *
+ * If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in
+ * any way.  The following definitions are used to access individual RGB
+ * components.
+ *
+ * The RGB components could, alternatively be controlled through PWM using
+ * the common RGB LED driver.
+ */
+
+/* LED index values for use with board_userled() */
+
+#define BOARD_LED_R       0
+#define BOARD_LED_G       1
+#define BOARD_LED_B       2
+#define BOARD_NLEDS       3
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED_R_BIT   (1 << BOARD_LED_R)
+#define BOARD_LED_G_BIT   (1 << BOARD_LED_G)
+#define BOARD_LED_B_BIT   (1 << BOARD_LED_B)
+
+/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LEDs on board
+ * the S32K144EVB.  The following definitions describe how NuttX controls the
+ * LEDs:
+ *
+ *   SYMBOL                Meaning                      LED state
+ *                                                      RED   GREEN  BLUE
+ *   -------------------  ----------------------------  -----------------
+ */
+
+#define LED_STARTED       1 /* NuttX has been started    OFF   OFF    OFF */
+#define LED_HEAPALLOCATE  2 /* Heap has been allocated   OFF   OFF    ON  */
+#define LED_IRQSENABLED   0 /* Interrupts enabled        OFF   OFF    ON  */
+#define LED_STACKCREATED  3 /* Idle stack created        OFF   ON     OFF */
+#define LED_INIRQ         0 /* In an interrupt          (no change)       */
+#define LED_SIGNAL        0 /* In a signal handler      (no change)       */
+#define LED_ASSERTION     0 /* An assertion failed      (no change)       */
+#define LED_PANIC         4 /* The system has crashed    FLASH OFF    OFF */
+#undef  LED_IDLE            /* S32K144EVB in sleep mode (Not used)        */
+
+/* Button definitions *******************************************************/
+
+/* The S32K144EVB supports two buttons:
+ *
+ *   SW2  PTC12
+ *   SW3  PTC13
+ */
+
+#define BUTTON_SW2         0
+#define BUTTON_SW3         1
+#define NUM_BUTTONS        2
+
+#define BUTTON_SW2_BIT    (1 << BUTTON_SW2)
+#define BUTTON_SW3_BIT    (1 << BUTTON_SW3)
+
+/* Alternate function pin selections ****************************************/
+
+/* By default, the serial console will be provided on the OpenSDA VCOM port:
+ *
+ *   OpenSDA UART TX  PTC7 (LPUART1_TX)
+ *   OpenSDA UART RX  PTC6 (LPUART1_RX)
+ */
+
+#define PIN_LPUART0_RX    PIN_LPUART0_RX_1  /* PTB0 */
+#define PIN_LPUART0_TX    PIN_LPUART0_TX_1  /* PTB1 */
+
+#define PIN_LPUART1_RX    PIN_LPUART1_RX_1  /* PTC6 */
+#define PIN_LPUART1_TX    PIN_LPUART1_TX_1  /* PTC7 */
+
+#define PIN_LPUART2_RX    PIN_LPUART2_RX_1  /* PTA8 */
+#define PIN_LPUART2_TX    PIN_LPUART2_TX_1  /* PTA9 */
+
+/* SPI selections ***********************************************************/
+
+#define PIN_LPSPI0_SCK   PIN_LPSPI0_SCK_2   /* PTB2 */
+#define PIN_LPSPI0_MISO  PIN_LPSPI0_SIN_2   /* PTB3 */
+#define PIN_LPSPI0_MOSI  PIN_LPSPI0_SOUT_3  /* PTB4 */
+#define PIN_LPSPI0_PCS   PIN_LPSPI0_PCS0_1  /* PTB0 */
+
+#define PIN_LPSPI1_SCK   PIN_LPSPI1_SCK_1   /* PTB14 */
+#define PIN_LPSPI1_MISO  PIN_LPSPI1_SIN_1   /* PTB15 */
+#define PIN_LPSPI1_MOSI  PIN_LPSPI1_SOUT_1  /* PTB16 */
+#define PIN_LPSPI1_PCS   PIN_LPSPI1_PCS3	/* PTB17 */
+
+#define PIN_LPSPI2_SCK   PIN_LPSPI2_SCK_2   /* PTE15 */
+#define PIN_LPSPI2_MISO  PIN_LPSPI2_SIN_2   /* PTE16 */
+#define PIN_LPSPI2_MOSI  PIN_LPSPI2_SOUT_1  /* PTA8  */
+#define PIN_LPSPI2_PCS   PIN_LPSPI2_PCS0_2	/* PTA9  */
+
+/* I2C selections ***********************************************************/
+
+#define PIN_LPI2C0_SCL   PIN_LPI2C0_SCL_2   /* PTA3 */				
+#define PIN_LPI2C0_SDA	 PIN_LPI2C0_SDA_2   /* PTA2 */
 
 Review comment:
   ```suggestion
   #define PIN_LPI2C0_SDA   PIN_LPI2C0_SDA_2   /* PTA2 */
   ```

----------------------------------------------------------------
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] jarivanewijk commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579718737
 
 
   Nevermind, we forgot to remove a few boards from the boards/Kconfig file. Their board configuration is not included in this PR. I think everything is okay now.

----------------------------------------------------------------
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] jarivanewijk commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579420597
 
 
   So... We should stick to line length 78? (Perhaps with an occasional extra character or two if there's no nice way to split the line into two?)

----------------------------------------------------------------
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 issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579405452
 
 
   @davids5 "he nxstyle tool was updated and is finding more things now. -m 86"  This is no longer true.
   
   The tool now automatically calculates the line width from the block comments.  For most files, that will be 78.  -m 86 should NOT be used.  That used to be the maximum line width but now has a different meaning.  It is NOW the line width increment.  If you wanted the usual -m86 in the past, you would now need to select -m 8 because 78+8 = 86

----------------------------------------------------------------
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] davids5 commented on a change in pull request #160: Nxp drone boards

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

 ##########
 File path: arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h
 ##########
 @@ -0,0 +1,127 @@
+/****************************************************************************************************
+ * arch/arm/src/s32k1xx/chip/s32k1xx_sim.h
+ *
+ *   Copyright (C) 2019 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <gn...@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************************************/
+
+#ifndef __ARCH_ARM_SRC_S32K1XX_HARDWARE_S32K1XX_RTC_H
+#define __ARCH_ARM_SRC_S32K1XX_HARDWARE_S32K1XX_RTC_H
+
+/****************************************************************************************************
+ * Included Files
+ ****************************************************************************************************/
+
+#include <nuttx/config.h>
+#include <hardware/s32k1xx_memorymap.h>
+
+/****************************************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************************************/
+
+/* RTC Register Offsets *****************************************************************************/
+
+#define S32K1XX_RTC_TSR_OFFSET                  0x0000  /* Time Seconds register */
+#define S32K1XX_RTC_TPR_OFFSET                  0x0004  /* Time Prescaler Register */
+#define S32K1XX_RTC_TAR_OFFSET                  0x0008  /* Time Alarm Register */
+#define S32K1XX_RTC_TCR_OFFSET                  0x000C  /* Time Compensation Register */
+#define S32K1XX_RTC_CR_OFFSET                   0x0010  /* Control Register */
+#define S32K1XX_RTC_SR_OFFSET                   0x0014  /* Status Register */
+#define S32K1XX_RTC_LR_OFFSET                   0x0018  /* Lock Register */
+#define S32K1XX_RTC_IER_OFFSET                  0x001C  /* Interrupt Enable Register */
+
+/* RTC Register Addresses ***************************************************************************/
+
+#define S32K1XX_RTC_TSR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TSR_OFFSET)
+#define S32K1XX_RTC_TPR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TPR_OFFSET)
+#define S32K1XX_RTC_TAR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TAR_OFFSET)
+#define S32K1XX_RTC_TCR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TCR_OFFSET)
+#define S32K1XX_RTC_CR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_CR_OFFSET)
+#define S32K1XX_RTC_SR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_SR_OFFSET)
+#define S32K1XX_RTC_LR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_LR_OFFSET)
+#define S32K1XX_RTC_IER                         (S32K1XX_RTC_BASE + S32K1XX_RTC_IER_OFFSET)
+
+/* RTC Register Bitfield Definitions ****************************************************************/
+
+/* TSR Bit Fields */
+
+#define RTC_TSR_TSR_MASK                         0xffffffffu
 
 Review comment:
   @jarivanewijk This is not consistent with the way the defines are in the archs/
   
   Please re-formatted this file to consistent  with the [others](https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h#L334-L349)
   

----------------------------------------------------------------
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] davids5 closed pull request #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
davids5 closed pull request #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160
 
 
   

----------------------------------------------------------------
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] davids5 commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
davids5 commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579400643
 
 
   @jarivanewijk - the nxstyle tool was updated and is finding more things now. -m 86 is the default for line length.  
   
   The nxstyle output is now formatted like compiler output so the changes can be quickly done in eclipse or any editor that parses compiler output.  (there is a close PR with the setup details in this repo)
   
   The idea of the comment blocks is as @patacongo calls it "a ruler". Consistency on comment block length is the goal.  In a arch header file longer lines are acceptable if consistent.  In c files wrapping at 86 is the goal. 
   
   I am hopeful that some day NuttX will have tool like Astyle, Uncrustify or Clang format, but for now it is still a tad to ambiguous for comfort. 
   

----------------------------------------------------------------
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 issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-578199588
 
 
   Waiting for David's review.

----------------------------------------------------------------
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] jarivanewijk commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579715353
 
 
   I have gone through all the files that were already part of this PR and fixed most of the code style errors. However, for some reason I am now unable to build any configuration, even configurations that we never touched.
   
   $ tools/configure.sh s32k144evb:nsh
     Copy files
     Select CONFIG_HOST_LINUX=y
     Refreshing...
   make: *** [do_olddefconfig] Error 1
   ERROR: failed to refresh

----------------------------------------------------------------
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] jarivanewijk edited a comment on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
jarivanewijk edited a comment on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579420597
 
 
   So... We should stick to line length 78? (Perhaps with an occasional extra character or two if there's no nice way to split the line?)

----------------------------------------------------------------
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 edited a comment on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579436814
 
 
   The "ruler length" must be the same on every block comment, otherwise an error will be generated.  Lines of code must be less than or equal to the ruler length (plus -m slop).  Given those two things, the idea of "the longest line of code" makes no sense to me.
   

----------------------------------------------------------------
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 issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-580824562
 
 
   @davids5 Please merge this when it is ready.

----------------------------------------------------------------
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] davids5 commented on a change in pull request #160: Nxp drone boards

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

 ##########
 File path: arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h
 ##########
 @@ -0,0 +1,126 @@
+/****************************************************************************************************
+ * arch/arm/src/s32k1xx/chip/s32k1xx_sim.h
+ *
+ *   Copyright (C) 2019 Gregory Nutt. All rights reserved.
+ *   Author: Gregory Nutt <gn...@nuttx.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ *    used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************************************/
+
+#ifndef __ARCH_ARM_SRC_S32K1XX_HARDWARE_S32K1XX_RTC_H
+#define __ARCH_ARM_SRC_S32K1XX_HARDWARE_S32K1XX_RTC_H
+
+/****************************************************************************************************
+ * Included Files
+ ****************************************************************************************************/
+
+#include <nuttx/config.h>
+#include <hardware/s32k1xx_memorymap.h>
+
+/****************************************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************************************/
+
+/* RTC Register Offsets *****************************************************************************/
+
+#define S32K1XX_RTC_TSR_OFFSET                  0x0000  /* Time Seconds register */
+#define S32K1XX_RTC_TPR_OFFSET                  0x0004  /* Time Prescaler Register */
+#define S32K1XX_RTC_TAR_OFFSET                  0x0008  /* Time Alarm Register */
+#define S32K1XX_RTC_TCR_OFFSET                  0x000C  /* Time Compensation Register */
+#define S32K1XX_RTC_CR_OFFSET                   0x0010  /* Control Register */
+#define S32K1XX_RTC_SR_OFFSET                   0x0014  /* Status Register */
+#define S32K1XX_RTC_LR_OFFSET                   0x0018  /* Lock Register */
+#define S32K1XX_RTC_IER_OFFSET                  0x001C  /* Interrupt Enable Register */
+
+/* RTC Register Addresses ***************************************************************************/
+
+#define S32K1XX_RTC_TSR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TSR_OFFSET)
+#define S32K1XX_RTC_TPR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TPR_OFFSET)
+#define S32K1XX_RTC_TAR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TAR_OFFSET)
+#define S32K1XX_RTC_TCR                         (S32K1XX_RTC_BASE + S32K1XX_RTC_TCR_OFFSET)
+#define S32K1XX_RTC_CR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_CR_OFFSET)
+#define S32K1XX_RTC_SR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_SR_OFFSET)
+#define S32K1XX_RTC_LR                          (S32K1XX_RTC_BASE + S32K1XX_RTC_LR_OFFSET)
+#define S32K1XX_RTC_IER                         (S32K1XX_RTC_BASE + S32K1XX_RTC_IER_OFFSET)
+
+/* RTC Register Bitfield Definitions ****************************************************************/
+
+/* TSR Bit Fields */
+#define RTC_TSR_TSR_MASK                         0xFFFFFFFFu
 
 Review comment:
   H
   ```suggestion
   #define RTC_TSR_TSR_MASK                         0xffffffffu
   ```

----------------------------------------------------------------
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 issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
patacongo commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-579422517
 
 
   @jarivanewijk "So... We should stick to line length 78?"  Remeber, -m does not select the line width.  That is no longer under user control.  nxstyle will parts all of the block comments and determine the correct line with.    The -m value allows a little "slop" at the end of the line, but is not the line width.  -m should be set to -m 8 for backward compatibility (i.e., allow lines to extend up to 8 characters beyond the block comments.)
   
   "(Perhaps with an occasional extra character or two if there's no nice way to split the line?)" -- Yes that is why you need to allow a little slop.  So lines just do not divide nicely.
   

----------------------------------------------------------------
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] davids5 commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
davids5 commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-583368004
 
 
   This PR was split into 3 PR. Close in Favor if #224 
   
   imxrt added missing i2c prescale mask #222  Merged
   Kinetis renamed TJA1100 to TJA110X registers #223  Merged
   S32K add support for Nxp drone boards #224 Under Revire 

----------------------------------------------------------------
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] davids5 commented on issue #160: Nxp drone boards

Posted by GitBox <gi...@apache.org>.
davids5 commented on issue #160: Nxp drone boards
URL: https://github.com/apache/incubator-nuttx/pull/160#issuecomment-578366132
 
 
   I will have a look at this over the weekend.
   
   On Fri, Jan 24, 2020, 8:22 AM patacongo <no...@github.com> wrote:
   
   > Waiting for David's review.
   >
   > —
   > You are receiving this because your review was requested.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-nuttx/pull/160?email_source=notifications&email_token=AAO3BXJWJTV67LEYZUPXAZDQ7MIUXA5CNFSM4KLH52QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ3KAJA#issuecomment-578199588>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAO3BXNIP7RYYIS5Z5R2WA3Q7MIUXANCNFSM4KLH52QA>
   > .
   >
   

----------------------------------------------------------------
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] davids5 commented on a change in pull request #160: Nxp drone boards

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

 ##########
 File path: arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h
 ##########
 @@ -0,0 +1,127 @@
+/****************************************************************************************************
+ * arch/arm/src/s32k1xx/chip/s32k1xx_sim.h
 
 Review comment:
   Name is incorrect

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