Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Bee <[email protected]>
  • Loading branch information
PeterBee97 committed Nov 19, 2024
1 parent b6b72f1 commit 2f70181
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 13 deletions.
4 changes: 0 additions & 4 deletions boards/arm/rp23xx/common/src/rp23xx_common_bringup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ int rp23xx_common_bringup(void)
{
int ret = 0;

#ifdef CONFIG_RP23XX_FLASH_FILE_SYSTEM
struct mtd_dev_s *mtd_dev;
#endif

#ifdef CONFIG_RP23XX_I2C_DRIVER
#ifdef CONFIG_RP23XX_I2C0
ret = board_i2cdev_initialize(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_DISABLE_DATE is not set
# CONFIG_NSH_DISABLE_LOSMART is not set
# CONFIG_RP23XX_FLASH_BOOT is not set
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="raspberrypi-pico-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,75 @@
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
# CONFIG_NSH_DISABLE_DATE is not set
# CONFIG_NSH_DISABLE_LOSMART is not set
# CONFIG_SPI_CALLBACK is not set
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="raspberrypi-pico-2"
CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_2=y
CONFIG_ARCH_CHIP="rp23xx"
CONFIG_ARCH_CHIP_RP23XX=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_RAMVECTORS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_AUDIO=y
CONFIG_AUDIO_I2S=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_LOOPSPERMSEC=10450
CONFIG_BUILTIN=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_DRIVERS_AUDIO=y
CONFIG_ETC_ROMFS=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXAMPLES_WS2812=y
CONFIG_FAT_LFN=y
CONFIG_FSUTILS_MKGPT=y
CONFIG_FSUTILS_MKMBR=y
CONFIG_FS_FAT=y
CONFIG_FS_FATTIME=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_LIBC_LZF=y
CONFIG_LIBC_MEMFD_ERROR=y
CONFIG_MMCSD=y
CONFIG_MMCSD_PROCFS=y
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_READLINE=y
CONFIG_RAM_SIZE=532480
CONFIG_RAM_START=0x20000000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RP23XX_FLASH_FILE_SYSTEM=y
CONFIG_RP23XX_BOARD_HAS_WS2812=y
CONFIG_RP23XX_I2S=y
CONFIG_RP23XX_SPI0=y
CONFIG_RP23XX_SPI0_CS_GPIO=5
CONFIG_RP23XX_SPI0_RX_GPIO=4
CONFIG_RP23XX_SPI0_SCK_GPIO=2
CONFIG_RP23XX_SPI0_TX_GPIO=3
CONFIG_RP23XX_SPI=y
CONFIG_RP23XX_SPISD=y
CONFIG_RP23XX_WS2812_GPIO_PIN=6
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SMARTFS_ALIGNED_ACCESS=y
CONFIG_SMP=y
CONFIG_SMP_NCPUS=2
CONFIG_START_DAY=9
CONFIG_START_MONTH=2
CONFIG_START_YEAR=2021
CONFIG_SYSLOG_CONSOLE=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NXLOOPER=y
CONFIG_SYSTEM_NXPLAYER=y
CONFIG_SYSTEM_NXRECORDER=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
CONFIG_TESTING_SMART_TEST=y
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_WS2812=y
4 changes: 4 additions & 0 deletions boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += rp23xx_buttons.c
endif

ifeq ($(CONFIG_ETC_ROMFS),y)
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
endif

DEPPATH += --dep-path board
VPATH += :board
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
23 changes: 23 additions & 0 deletions boards/arm/rp23xx/raspberrypi-pico-2/src/etc/init.d/rc.sysinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/****************************************************************************
* boards/arm/rp23xx/raspberrypi-pico-2/src/etc/init.d/rc.sysinit
*
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*
****************************************************************************/

#include <nuttx/config.h>
24 changes: 24 additions & 0 deletions boards/arm/rp23xx/raspberrypi-pico-2/src/etc/init.d/rcS
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/****************************************************************************
* boards/arm/rp23xx/raspberrypi-pico-2/src/etc/init.d/rcS
*
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*
****************************************************************************/

#include <nuttx/config.h>

33 changes: 28 additions & 5 deletions tools/rp23xx/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,33 @@

# POSTBUILD -- Perform post build operations

ifeq ($(CONFIG_RP23XX_UF2_BINARY),y)
define POSTBUILD
$(Q)echo "Generating: nuttx.uf2"; \
picotool uf2 convert nuttx -t elf nuttx.uf2
$(Q)([ $$? -eq 0 ] && echo nuttx.uf2 >> nuttx.manifest && echo "Done.")
PICOTOOL_BIN_PATH?=$(PICO_SDK_PATH)$(DELIM)_deps$(DELIM)picotool$(DELIM)picotool

define GEN_PICO_UF2
$(Q)echo "Generating: nuttx.uf2"; \

$(Q)$1 uf2 convert --quiet -t elf nuttx nuttx.uf2;
$(Q)([ $$? -eq 0 ] && echo nuttx.uf2 >> nuttx.manifest && echo "Done.")
endef

ifeq ($(CONFIG_RP23XX_UF2_BINARY),y)
ifneq ($(shell which picotool),)
define POSTBUILD
$(call GEN_PICO_UF2, picotool)
endef
else ifdef PICO_SDK_PATH
define POSTBUILD
$(Q)(if ! $(PICOTOOL_BIN_PATH) help >&/dev/null; then \
echo "Building: picotool"; \
cd $(PICO_SDK_PATH); \
cmake . >&/dev/null; \
make picotoolBuild >&/dev/null; \
fi;)
$(call GEN_PICO_UF2, $(PICOTOOL_BIN_PATH))
endef
else
define POSTBUILD
$(Q) echo "PICO_SDK_PATH/picotool must be specified/installed for flash boot"
endef
endif
endif

0 comments on commit 2f70181

Please sign in to comment.