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 2022/12/21 22:58:50 UTC
[GitHub] [nuttx] adamfeuer opened a new pull request, #7950: Jupiter Nano support
adamfeuer opened a new pull request, #7950:
URL: https://github.com/apache/nuttx/pull/7950
## Summary
- Adds support for the Starcat Jupiter Nano SAMA5D27C-LD1G board
- https://github.com/starcat-io/jupiter-nano
- this board is very similar to the Microchip/Atmel SAMA5D2-Xplained board (sama5d2-xult)
## Impact
- none if you are not using this board
- enables NuttX to run on this board
## Testing
- manual
- all defconfigs were tested
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] adamfeuer commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
adamfeuer commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1362276568
All Linux builds passed, but it looks like the Macos builds were either cancelled or failed on a `homebrew` package install. Do I need to troubleshoot this?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#discussion_r1056834796
##########
boards/Kconfig:
##########
@@ -1796,6 +1796,15 @@ config ARCH_BOARD_GIANT_BOARD
This options selects support for NuttX on the Groboards Giant Board,
featuring the SAMA5D27C-D1G SIP with 128MB DDR2 RAM.
+config ARCH_BOARD_JUPITER_NANO
+ bool "Starcat Jupiter Nano (SAMA5D27C-LD1G)"
+ depends on ARCH_CHIP_ATSAMA5D27
+ select SAMA5D27_JUPITER_NANO_498MHZ
+ select ARCH_HAVE_LEDS
+ ---help---
+ This options selects support for NuttX on the Starcat Jupiter Nano
+ featuring the SAMA5D27C-LD1G SIP with 128MB LPDDR2 RAM.
Review Comment:
change to TABs
##########
boards/arm/sama5/jupiter-nano/src/sam_ajoystick.c:
##########
@@ -0,0 +1,438 @@
+/****************************************************************************
+ * boards/arm/sama5/jupiter-nano/src/sam_ajoystick.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/arch.h>
+#include <nuttx/fs/fs.h>
+#include <nuttx/input/ajoystick.h>
+
+#include "sam_pio.h"
+#include "sam_adc.h"
+#include "hardware/sam_adc.h"
+#include "jupiter-nano.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Check for pre-requisites and pin conflicts */
+
+#ifdef CONFIG_INPUT_AJOYSTICK
+# if !defined(CONFIG_ADC)
+# error CONFIG_ADC is required for the Itead joystick
+# undef CONFIG_INPUT_AJOYSTICK
+# elif !defined(CONFIG_SAMA5_ADC_CHAN0) || !defined(CONFIG_SAMA5_ADC_CHAN1)
+# error CONFIG_SAMA5_ADC_CHAN0 and 1 are required for Itead joystick
+# elif !defined(CONFIG_SAMA5_PIOC_IRQ)
+# error CONFIG_SAMA5_PIOC_IRQ is required for the Itead joystick
+# undef CONFIG_INPUT_AJOYSTICK
+# elif defined(CONFIG_SAMA5_EMACA)
+# error EMAC conflicts with the Itead PIO usage
+# undef CONFIG_INPUT_AJOYSTICK
+# elif defined(CONFIG_SAMA5_SSC0)
+# error SSC0 conflicts with the Itead PIO usage
+# undef CONFIG_INPUT_AJOYSTICK
+# elif defined(CONFIG_SAMA5_SPI1)
+# warning SPI1 may conflict with the Itead PIO usage
+# elif defined(CONFIG_SAMA5_ISI)
+# warning ISI may conflict with the Itead PIO usage
+# endif
+#endif /* CONFIG_INPUT_AJOYSTICK */
+
+#ifdef CONFIG_INPUT_AJOYSTICK
+
+/* Number of Joystick buttons */
+
+#define AJOY_NGPIOS 7
+
+/* Bitset of supported Joystick buttons */
+
+#define AJOY_SUPPORTED (AJOY_BUTTON_1_BIT | AJOY_BUTTON_2_BIT | \
+ AJOY_BUTTON_3_BIT | AJOY_BUTTON_4_BIT | \
+ AJOY_BUTTON_5_BIT | AJOY_BUTTON_6_BIT | \
+ AJOY_BUTTON_7_BIT )
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
+ *lower);
+static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
+ FAR struct ajoy_sample_s *sample);
+static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
+ *lower);
+static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
+ ajoy_buttonset_t press, ajoy_buttonset_t release,
+ ajoy_handler_t handler, FAR void *arg);
Review Comment:
remove all `FAR` from this PR
##########
boards/arm/sama5/jupiter-nano/Kconfig:
##########
@@ -0,0 +1,135 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_JUPITER_NANO
+
+choice
+ prompt "CPU Frequency"
+ default JUPITERNANO_498MHZ
+
+config JUPITERNANO_384MHZ
+ bool "384 MHz"
+
+config JUPITERNANO_396MHZ
+ bool "396 MHz"
+
+config JUPITERNANO_498MHZ
+ bool "498 MHz"
+
+config JUPITERNANO_528MHZ
+ bool "528 MHz"
+
+endchoice # CPU Frequency
+
+config JUPITERNANO_USBHOST_STACKSIZE
+ int "USB host waiter stack size"
+ default 1536 if USBHOST_HUB
+ default 2048 if !USBHOST_HUB
+ depends on USBHOST
+
+config JUPITERNANO_USBHOST_PRIO
+ int "USB host waiter task priority"
+ default 100
+ depends on USBHOST
+
+config SAMA5_SDMMC
+ bool "enable SDMMC controller"
+ default y if SAMA5_HAVE_SDMMC
+ select SDIO_DMA
+ select SCHED_WORKQUEUE
+ select SCHED_HPWORK
+ select MMCSD
Review Comment:
change to TABs
##########
boards/arm/sama5/jupiter-nano/Kconfig:
##########
@@ -0,0 +1,135 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_JUPITER_NANO
+
+choice
+ prompt "CPU Frequency"
+ default JUPITERNANO_498MHZ
+
+config JUPITERNANO_384MHZ
+ bool "384 MHz"
+
+config JUPITERNANO_396MHZ
+ bool "396 MHz"
+
+config JUPITERNANO_498MHZ
+ bool "498 MHz"
+
+config JUPITERNANO_528MHZ
+ bool "528 MHz"
+
+endchoice # CPU Frequency
+
+config JUPITERNANO_USBHOST_STACKSIZE
+ int "USB host waiter stack size"
+ default 1536 if USBHOST_HUB
+ default 2048 if !USBHOST_HUB
+ depends on USBHOST
+
+config JUPITERNANO_USBHOST_PRIO
+ int "USB host waiter task priority"
+ default 100
+ depends on USBHOST
+
+config SAMA5_SDMMC
+ bool "enable SDMMC controller"
+ default y if SAMA5_HAVE_SDMMC
+ select SDIO_DMA
+ select SCHED_WORKQUEUE
+ select SCHED_HPWORK
+ select MMCSD
+ select MMCSD_SDIO
+ select SDIO_BLOCKSETUP
+ select ARCH_HAVE_SDIO
+ select SAMA5_SDMMC_DMA
+ ---help---
+ Enable SD Card interface SDMMC0. Selects SAMA5_SDMMC SAMA5_SDMMC0 SAMA5_SDMMC_DMA SDIO_DMA SCHED_WORKQUEUE SCHED_HPWORK SDIO_BLOCKSETUP
+
+config SAMA5_SDMMC0
+ bool "Enable SDMMC0 (built-in eMMC)"
+ default n if SAMA5_SDMMC
+ depends on SAMA5_SDMMC
+
+config SAMA5_SDMMC0_SIZE
+ int "SDMMC0 size in bytes"
+ default 4294967296
+ depends on SAMA5_SDMMC0
+ ---help---
+ Size of eMMC flash in bytes. Default: 4GB
+
+config SAMA5D27_SDMMC0_MOUNT
+ bool "Mount SDMMC0 at startup"
+ default n
+ depends on SAMA5_SDMMC0
+
+config SAMA5D27_SDMMC0_MOUNT_BLKDEV
+ string "SDMMC0 block device name"
+ default "mmc0"
+ depends on SAMA5_SDMMC0
+
+config SAMA5D27_SDMMC0_MOUNT_MOUNTPOINT
+ string "SDMMC0 mountpoint"
+ default "/mnt/sdmmc0"
+ depends on SAMA5_SDMMC0
+
+config SAMA5D27_SDMMC0_MOUNT_FSTYPE
+ string "SDMMC0 file system type"
+ default "vfat"
+ depends on SAMA5_SDMMC0
+
+config CONFIG_SAMA5_SDMMC1_WIDTH_D1_D8
+ bool "SDMMC0 data bus width 8 bits"
+ default y
+ depends on SAMA5_SDMMC0
+
+config SAMA5_SDMMC1
+ bool "Enable SDMMC1"
+ default y if SAMA5_SDMMC
+ select SAMA5_SDMMC1_WIDTH_D1_D4
+ depends on SAMA5_SDMMC
+
+config SAMA5_SDMMC1_SIZE
+ int "SDMMC1 size in bytes"
+ default 1073741824
+ depends on SAMA5_SDMMC1
+ ---help---
+ Size of SD Card in bytes. Default: 16GB
+
+config SAMA5D27_SDMMC1_MOUNT
+ bool "Mount SDMMC1 at startup"
+ default n
+ depends on SAMA5_SDMMC1
+
+config SAMA5D27_SDMMC1_MOUNT_BLKDEV
+ string "SDMMC1 block device name"
+ default "mmc1"
+ depends on SAMA5_SDMMC1
+
+config SAMA5D27_SDMMC1_MOUNT_MOUNTPOINT
+ string "SDMMC1 mountpoint"
+ default "/mnt/sdmmc1"
+ depends on SAMA5_SDMMC1
+
+config SAMA5D27_SDMMC1_MOUNT_FSTYPE
+ string "SDMMC1 file system type"
+ default "vfat"
+ depends on SAMA5_SDMMC1
+
+config MMCSD_HAVE_CARDDETECT
+ bool "SDMMC1 card detect"
+ default y
+ depends on SAMA5_SDMMC1
+
+config SAMA5_SDMMC1_WIDTH_D1_D4
+ bool "SDMMC1 data bus width 4 bits"
+ default y
+ depends on SAMA5_SDMMC1
+
+config SAMA5_SYSTEMRESET
+ bool "Enable system reset - this will enable the nsh reboot command"
+ select BOARDCTL_RESET
Review Comment:
change to TABs
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] adamfeuer commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
adamfeuer commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1363541321
@xiaoxiang781216 I refreshed the defconfigs and retested manually. After pushing, the build passed, with the exception of the same macos failures as before.
Re: the source code, do you have more suggestions or improvements?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] adamfeuer commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
adamfeuer commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1363438607
@xiaoxiang781216 Thank you for catching this. I will push a fix 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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1363562661
I am fine with the change. If no other give more comment, I will merge this patch tonight.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 merged pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7950:
URL: https://github.com/apache/nuttx/pull/7950
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] adamfeuer commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
adamfeuer commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1364456797
@xiaoxiang781216 Thank you!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] adamfeuer commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
adamfeuer commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1364413903
@xiaoxiang781216 There were no other comments - if you have a few minutes, would you be willing to merge this?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #7950: Jupiter Nano support
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7950:
URL: https://github.com/apache/nuttx/pull/7950#issuecomment-1362344962
> All Linux builds passed, but it looks like the Macos builds were either cancelled or failed on a `homebrew` package install. Do I need to troubleshoot this?
Look like you defconfig isn't in the normalized form:
https://github.com/apache/nuttx/actions/runs/3753428009/jobs/6376710709
Please run and commit the change:
```
./tools/refresh.sh --silient jupiter-nano/sdmmcnsh
./tools/refresh.sh --silient jupiter-nano/sdmmc-nsh-net-resolvconf
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org