diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst index 2804c50eab8..9bbfe545e92 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-feather-rp2040/index.rst @@ -156,6 +156,12 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst index d3074d5b265..3babaa5c4c5 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-kb2040/index.rst @@ -132,6 +132,12 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst b/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst index 3052d078e6c..93f363df5f8 100644 --- a/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/adafruit-qt-py-rp2040/index.rst @@ -100,6 +100,12 @@ nsh Basic NuttShell configuration (console enabled in UART1, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst b/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst index e4b61efd112..3ef289a0967 100644 --- a/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/pimoroni-tiny2040/index.rst @@ -97,6 +97,12 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst index b72b96b42d1..0d94d0bc13d 100644 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico-w/index.rst @@ -1,5 +1,5 @@ =============================== -Raspberry Pi Pico +Raspberry Pi Pico W =============================== The `Raspberry Pi Pico `_ is a general purpose board supplied by @@ -38,6 +38,7 @@ Buttons and LEDs ================ LED controlled by GPIO0 of the wireless chip (not the RP2040 processor). +Use rp2040_extra_gpio_put(0,value) to control this LED. A BOOTSEL button, which if held down when power is first applied to the board, will cause the RP2040 to boot into programming @@ -179,6 +180,12 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst index f4585c6e669..196cf03733f 100644 --- a/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst +++ b/Documentation/platforms/arm/rp2040/boards/raspberrypi-pico/index.rst @@ -158,6 +158,12 @@ nsh Basic NuttShell configuration (console enabled in UART0, at 115200 bps). +nsh-flash +--------- + +Basic NuttShell configuration (console enabled in UART0, at 115200 bps +with SMART flash filesystem. + nshsram ------- diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/README.txt b/boards/arm/rp2040/adafruit-feather-rp2040/README.txt index 80f2a72af0d..313f36672fe 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/README.txt +++ b/boards/arm/rp2040/adafruit-feather-rp2040/README.txt @@ -71,7 +71,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/boards/arm/rp2040/adafruit-kb2040/README.txt b/boards/arm/rp2040/adafruit-kb2040/README.txt index 4c725d21665..082dcba688b 100644 --- a/boards/arm/rp2040/adafruit-kb2040/README.txt +++ b/boards/arm/rp2040/adafruit-kb2040/README.txt @@ -70,7 +70,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/README.txt b/boards/arm/rp2040/adafruit-qt-py-rp2040/README.txt index 039eb529643..925782094b4 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/README.txt +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/README.txt @@ -65,7 +65,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/boards/arm/rp2040/pimoroni-tiny2040/README.txt b/boards/arm/rp2040/pimoroni-tiny2040/README.txt index 4eb1ab821ca..76668788a1a 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/README.txt +++ b/boards/arm/rp2040/pimoroni-tiny2040/README.txt @@ -69,7 +69,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/boards/arm/rp2040/raspberrypi-pico-w/README.txt b/boards/arm/rp2040/raspberrypi-pico-w/README.txt index 1757187c4d5..49404942002 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/README.txt +++ b/boards/arm/rp2040/raspberrypi-pico-w/README.txt @@ -72,7 +72,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/boards/arm/rp2040/raspberrypi-pico/README.txt b/boards/arm/rp2040/raspberrypi-pico/README.txt index 86d60167e79..a6826e0f7ba 100644 --- a/boards/arm/rp2040/raspberrypi-pico/README.txt +++ b/boards/arm/rp2040/raspberrypi-pico/README.txt @@ -71,7 +71,7 @@ Defconfigs - nsh Minimum configuration with NuttShell -- nsh_flash +- nsh-flash NuttX shell with SMART flash filesystem. - nshsram diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c index c534982baa2..586d636eead 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c @@ -129,7 +129,7 @@ int process_f2_frame_header(FAR bcmf_interface_dev_t *gbus, ****************************************************************************/ /**************************************************************************** - * Name: read_f2_frame + * Name: bcmf_gspi_read_f2_frame * * Description: * Read and process an F2 frame. diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.h b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.h index bad14cba454..06ae58fda2f 100644 --- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.h +++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.h @@ -32,7 +32,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: read_f2_frame + * Name: bcmf_gspi_read_f2_frame * * Description: * Read and process an F2 frame. diff --git a/fs/smartfs/smartfs.h b/fs/smartfs/smartfs.h index d00d836bf66..0e66875c7db 100644 --- a/fs/smartfs/smartfs.h +++ b/fs/smartfs/smartfs.h @@ -199,15 +199,21 @@ #ifdef CONFIG_SMARTFS_ALIGNED_ACCESS # define SMARTFS_NEXTSECTOR(h) (smartfs_rdle16(h->nextsector)) -# define SMARTFS_SET_NEXTSECTOR(h, v) smartfs_wrle16(h->nextsector, v) +# define SMARTFS_SET_NEXTSECTOR(h, v) smartfs_wrle16(h->nextsector, \ + (uint16_t)(v)) + # define SMARTFS_USED(h) (smartfs_rdle16(h->used)) -# define SMARTFS_SET_USED(h, v) smartfs_wrle16(h->used, v) +# define SMARTFS_SET_USED(h, v) smartfs_wrle16(h->used, \ + (uint16_t)(v)) #else # define SMARTFS_NEXTSECTOR(h) (*((uint16_t *)h->nextsector)) -# define SMARTFS_SET_NEXTSECTOR(h, v) ((*((uint16_t *)h->nextsector)) = v) +# define SMARTFS_SET_NEXTSECTOR(h, v) ((*((uint16_t *)h->nextsector)) = \ + (uint16_t)(v)) + # define SMARTFS_USED(h) (*((uint16_t *)h->used)) -# define SMARTFS_SET_USED(h, v) ((*((uint16_t *)h->used)) = v) +# define SMARTFS_SET_USED(h, v) ((*((uint16_t *)h->used)) = \ + (uint16_t)(v)) #endif #ifdef CONFIG_MTD_SMART_ENABLE_CRC diff --git a/fs/smartfs/smartfs_smart.c b/fs/smartfs/smartfs_smart.c index 9cebba5c991..9b48562a0a7 100644 --- a/fs/smartfs/smartfs_smart.c +++ b/fs/smartfs/smartfs_smart.c @@ -45,10 +45,6 @@ #include "smartfs.h" -#ifdef CONFIG_DEBUG_FS_INFO -# include -#endif - /**************************************************************************** * Private Type ****************************************************************************/ @@ -532,8 +528,6 @@ static ssize_t smartfs_read(FAR struct file *filep, char *buffer, DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); - finfo("Reading %u bytes\n", (unsigned) buflen); - /* Recover our private data from the struct file instance */ sf = filep->f_priv; @@ -639,18 +633,6 @@ static ssize_t smartfs_read(FAR struct file *filep, char *buffer, /* Return the number of bytes we read */ -#ifdef CONFIG_DEBUG_FS_INFO - finfo("Read %lu bytes:", bytesread); - for (uint32_t i = 0; i < bytesread; ++i) - { - if ((i & 0x0f) == 0) printf("\n "); - - printf("%02x, ", buffer[i]); - } - - printf("\n"); -#endif - ret = bytesread; errout_with_semaphore: @@ -675,18 +657,6 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); -#ifdef CONFIG_DEBUG_FS_INFO - finfo("Writing %lu bytes:", (uint32_t)buflen); - for (uint32_t i = 0; i < buflen; ++i) - { - if ((i & 0x0f) == 0) printf("\n "); - - printf("%02x, ", buffer[i]); - } - - printf("\n"); -#endif - /* Recover our private data from the struct file instance */ sf = filep->f_priv; @@ -882,7 +852,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, /* Copy the new sector to the old one and chain it */ header = (struct smartfs_chain_header_s *) sf->buffer; - SMARTFS_SET_NEXTSECTOR(header, (uint16_t) ret); + SMARTFS_SET_NEXTSECTOR(header, ret); /* Now sync the file to write this sector out */ @@ -938,7 +908,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, /* Copy the new sector to the old one and chain it */ header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer; - SMARTFS_SET_NEXTSECTOR(header, (uint16_t) ret); + SMARTFS_SET_NEXTSECTOR(header, ret); readwrite.offset = offsetof(struct smartfs_chain_header_s, nextsector); readwrite.buffer = (uint8_t *) header->nextsector; @@ -971,8 +941,6 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = byteswritten; - finfo("Wrote %u bytes\n", (unsigned) byteswritten); - errout_with_semaphore: smartfs_semgive(fs); return ret; diff --git a/fs/smartfs/smartfs_utils.c b/fs/smartfs/smartfs_utils.c index ef2d019c3a9..24267ca65f2 100644 --- a/fs/smartfs/smartfs_utils.c +++ b/fs/smartfs/smartfs_utils.c @@ -2031,7 +2031,7 @@ int smartfs_extendfile(FAR struct smartfs_mountpt_s *fs, /* Copy the new sector to the old one and chain it */ header = (struct smartfs_chain_header_s *) sf->buffer; - SMARTFS_SET_NEXTSECTOR(header, (uint16_t)ret); + SMARTFS_SET_NEXTSECTOR(header, ret); /* Now sync the file to write this sector out */ @@ -2087,7 +2087,7 @@ int smartfs_extendfile(FAR struct smartfs_mountpt_s *fs, /* Copy the new sector to the old one and chain it */ header = (struct smartfs_chain_header_s *)fs->fs_rwbuffer; - SMARTFS_SET_NEXTSECTOR(header, (uint16_t)ret); + SMARTFS_SET_NEXTSECTOR(header, ret); readwrite.offset = offsetof(struct smartfs_chain_header_s, nextsector);