stm32h7/linum-stm32h753bi: add support to zmodem

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
This commit is contained in:
Jorge Guzman 2024-04-06 16:32:08 -03:00 committed by Xiang Xiao
parent bf3a5bb4cb
commit de29fe3102
2 changed files with 125 additions and 1 deletions

View File

@ -510,3 +510,45 @@ Example to blink the RBG led of board, using this example the board led status s
led_daemon: LED set 0x03
led_daemon: LED set 0x02
led_daemon: LED set 0x01
zmodem
------
This example use the nsh via usb and the SDCard to storage the files exchanged.
By default the zmodem lib use the path /tmp to storage the files.
Sending files to target::
# Mount the SDCard at /tmp
nsh> mount -t vfat /dev/mmcsd0 /tmp
# Waiting for a new file.
nsh> rz
# Transmitting a file to target.
my_pc$ sz --zmodem nuttx_logo.txt > /dev/ttyACM0 < /dev/ttyACM0
# Check if the file was received
nsh> ls -l /tmp
/tmp:
-rw-rw-rw- 1942 nuttx_logo.txt
Transmiting a file to PC::
# Sending the file nuttx_logo.txt to PC
nsh> sz -x 1 /tmp/nuttx_logo.txt
**B00000000000000
# Using zmodem to receive a file from target
my_pc/temp$ rz > /dev/ttyACM0 < /dev/ttyACM0
Receiving: nuttx_logo.txt
Bytes received: 1942/ 1942 BPS:124544
Transfer complete
my_pc/temp$ ls -l
-rw------- 1 nuttx nuttx 1942 abr 6 16:07 nuttx_logo.txt
If you don't have a SDCard on your board, you can mount the TMPFS at /tmp and transfer files to it,
but you cannot transfer big files because TMPFS could use the free RAM of your board::
nsh> mount -t tmpfs /tmp

View File

@ -0,0 +1,82 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
# CONFIG_MMCSD_MMCSUPPORT is not set
# CONFIG_STANDARD_SERIAL is not set
# CONFIG_STM32H7_USE_LEGACY_PINMAP is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="linum-stm32h753bi"
CONFIG_ARCH_BOARD_LINUM_STM32H753BI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32H753BI=y
CONFIG_ARCH_CHIP_STM32H7=y
CONFIG_ARCH_CHIP_STM32H7_CORTEXM7=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_BOARDCTL_USBDEVCTRL=y
CONFIG_BOARD_LOOPSPERMSEC=43103
CONFIG_BUILTIN=y
CONFIG_CDCACM=y
CONFIG_CDCACM_CONSOLE=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_EXAMPLES_ALARM=y
CONFIG_FAT_DMAMEMORY=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FS_FAT=y
CONFIG_FS_PROCFS=y
CONFIG_FS_TMPFS=y
CONFIG_GRAN=y
CONFIG_GRAN_INTR=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=4096
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBC_MEMFD_ERROR=y
CONFIG_LIBM=y
CONFIG_MMCSD=y
CONFIG_MMCSD_SDIO=y
CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y
CONFIG_MM_REGIONS=4
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_OTG_ID_GPIO_DISABLE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_RTC_ALARM=y
CONFIG_RTC_DATETIME=y
CONFIG_RTC_DRIVER=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_WAITPID=y
CONFIG_SDMMC1_SDIO_MODE=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_STM32H7_HSI48=y
CONFIG_STM32H7_OTGFS=y
CONFIG_STM32H7_PWR=y
CONFIG_STM32H7_RTC=y
CONFIG_STM32H7_SDMMC1=y
CONFIG_STM32H7_USART1=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_ZMODEM=y
CONFIG_SYSTEM_ZMODEM_PKTBUFSIZE=1024
CONFIG_SYSTEM_ZMODEM_RCVBUFSIZE=1024
CONFIG_SYSTEM_ZMODEM_SNDBUFSIZE=1024
CONFIG_TASK_NAME_SIZE=0
CONFIG_USBDEV=y