├── .gitignore ├── .vscode └── settings.json ├── AUTHORS ├── ChangeLog.md ├── Jenkinsfile ├── Kconfig ├── LICENSE ├── README.md ├── bsp └── d1-nezha │ ├── .config │ ├── .config.old │ ├── .gitignore │ ├── Kconfig │ ├── README.md │ ├── SConscript │ ├── SConstruct │ ├── applications │ ├── SConscript │ ├── lvgl │ │ ├── SConscript │ │ ├── lv_conf.h │ │ ├── lv_demo.c │ │ ├── lv_demo_widgets.c │ │ ├── lv_demo_widgets.h │ │ ├── lv_port_disp.c │ │ ├── lv_port_disp.h │ │ ├── lv_port_indev.c │ │ └── lv_port_indev.h │ ├── main.c │ ├── mnt.c │ ├── test │ │ ├── SConscript │ │ ├── auto_rvv.c.bak │ │ ├── test_i2c.c │ │ ├── test_lcd.c │ │ ├── test_thead.c │ │ └── vector.c.bak │ └── touch.c │ ├── drivers │ ├── Kconfig │ ├── SConscript │ ├── board.c │ ├── board.h │ ├── common.h │ ├── drv_clk.c │ ├── drv_clk.h │ ├── drv_gpio.c │ ├── drv_gpio.h │ ├── drv_i2c.c │ ├── drv_i2c.h │ ├── drv_sdio.c │ ├── drv_sdio.h │ ├── drv_touch.c │ ├── drv_touch.h │ ├── drv_uart.c │ ├── drv_uart.h │ ├── drv_watchdog.c │ ├── drv_watchdog.h │ └── lcd │ │ ├── SConscript │ │ ├── f133_lcd_rgb.c │ │ └── f133_lcd_rgb.h │ ├── generateimg.sh │ ├── libraries │ ├── Kconfig │ ├── README.md │ └── SConscript │ ├── link.lds │ ├── link_stacksize.lds │ ├── rtconfig.h │ ├── rtconfig.py │ ├── rtthread.img │ └── sdcard.bat ├── components ├── Kconfig ├── SConscript ├── cplusplus │ ├── Kconfig │ ├── README.md │ ├── SConscript │ ├── cpp11 │ │ ├── README.md │ │ ├── README_ZH.md │ │ ├── armclang │ │ │ ├── clock.cpp │ │ │ ├── condvar.cpp │ │ │ ├── miscellaneous.cpp │ │ │ ├── mutex.cpp │ │ │ ├── thread.cpp │ │ │ └── tpl.h │ │ ├── atomic_8.c │ │ ├── emutls.c │ │ ├── figures │ │ │ └── Snipaste_2021-09-02_16-00-09.png │ │ ├── gcc │ │ │ ├── __utils.h │ │ │ ├── condition_variable │ │ │ ├── condition_variable.cpp │ │ │ ├── future │ │ │ ├── mutex │ │ │ ├── mutex.cpp │ │ │ ├── thread │ │ │ ├── thread.cpp │ │ │ └── utils.cpp │ │ └── thread_local_impl.cpp │ ├── cxx_Mutex.cpp │ ├── cxx_Semaphore.cpp │ ├── cxx_Thread.cpp │ ├── cxx_crt.cpp │ ├── cxx_crt.h │ ├── cxx_crt_init.c │ ├── cxx_lock.h │ ├── cxx_mail.h │ ├── cxx_mutex.h │ ├── cxx_queue.h │ ├── cxx_semaphore.h │ └── cxx_thread.h ├── dfs │ ├── Kconfig │ ├── SConscript │ ├── filesystems │ │ ├── .ignore_format.yml │ │ ├── SConscript │ │ ├── devfs │ │ │ ├── SConscript │ │ │ ├── devfs.c │ │ │ └── devfs.h │ │ ├── elmfat │ │ │ ├── .ignore_format.yml │ │ │ ├── 00history.txt │ │ │ ├── 00readme.txt │ │ │ ├── SConscript │ │ │ ├── dfs_elm.c │ │ │ ├── dfs_elm.h │ │ │ ├── diskio.h │ │ │ ├── ff.c │ │ │ ├── ff.h │ │ │ ├── ffconf.h │ │ │ └── ffunicode.c │ │ ├── nfs │ │ │ ├── SConscript │ │ │ ├── dfs_nfs.c │ │ │ ├── dfs_nfs.h │ │ │ ├── mount.h │ │ │ ├── mount.x │ │ │ ├── mount_clnt.c │ │ │ ├── mount_xdr.c │ │ │ ├── nfs.h │ │ │ ├── nfs.x │ │ │ ├── nfs_auth.c │ │ │ ├── nfs_clnt.c │ │ │ ├── nfs_xdr.c │ │ │ └── rpc │ │ │ │ ├── auth.h │ │ │ │ ├── auth_none.c │ │ │ │ ├── clnt.h │ │ │ │ ├── clnt_generic.c │ │ │ │ ├── clnt_udp.c │ │ │ │ ├── pmap.c │ │ │ │ ├── pmap.h │ │ │ │ ├── rpc.h │ │ │ │ ├── rpc_msg.h │ │ │ │ ├── rpc_prot.c │ │ │ │ ├── types.h │ │ │ │ ├── xdr.c │ │ │ │ ├── xdr.h │ │ │ │ └── xdr_mem.c │ │ ├── ramfs │ │ │ ├── SConscript │ │ │ ├── dfs_ramfs.c │ │ │ └── dfs_ramfs.h │ │ ├── romfs │ │ │ ├── SConscript │ │ │ ├── dfs_romfs.c │ │ │ ├── dfs_romfs.h │ │ │ └── romfs.c │ │ └── skeleton │ │ │ ├── skeleton.c │ │ │ └── skeleton.h │ ├── include │ │ ├── dfs.h │ │ ├── dfs_file.h │ │ ├── dfs_fs.h │ │ ├── dfs_posix.h │ │ └── dfs_private.h │ └── src │ │ ├── dfs.c │ │ ├── dfs_file.c │ │ ├── dfs_fs.c │ │ └── dfs_posix.c ├── drivers │ ├── Kconfig │ ├── SConscript │ ├── audio │ │ ├── SConscript │ │ ├── audio.c │ │ ├── audio_pipe.c │ │ └── audio_pipe.h │ ├── can │ │ ├── SConscript │ │ ├── can.c │ │ └── readme-zh.txt │ ├── cputime │ │ ├── SConscript │ │ ├── cputime.c │ │ └── cputime_cortexm.c │ ├── hwcrypto │ │ ├── SConscript │ │ ├── hw_bignum.c │ │ ├── hw_bignum.h │ │ ├── hw_crc.c │ │ ├── hw_crc.h │ │ ├── hw_gcm.c │ │ ├── hw_gcm.h │ │ ├── hw_hash.c │ │ ├── hw_hash.h │ │ ├── hw_rng.c │ │ ├── hw_rng.h │ │ ├── hw_symmetric.c │ │ ├── hw_symmetric.h │ │ ├── hwcrypto.c │ │ └── hwcrypto.h │ ├── hwtimer │ │ ├── README_CN.md │ │ ├── SConscript │ │ └── hwtimer.c │ ├── i2c │ │ ├── SConscript │ │ ├── i2c-bit-ops.c │ │ ├── i2c_core.c │ │ └── i2c_dev.c │ ├── include │ │ ├── drivers │ │ │ ├── adc.h │ │ │ ├── alarm.h │ │ │ ├── audio.h │ │ │ ├── can.h │ │ │ ├── cputime.h │ │ │ ├── crypto.h │ │ │ ├── dac.h │ │ │ ├── hwtimer.h │ │ │ ├── i2c-bit-ops.h │ │ │ ├── i2c.h │ │ │ ├── i2c_dev.h │ │ │ ├── lptimer.h │ │ │ ├── mmc.h │ │ │ ├── mmcsd_card.h │ │ │ ├── mmcsd_cmd.h │ │ │ ├── mmcsd_core.h │ │ │ ├── mmcsd_host.h │ │ │ ├── mtd_nand.h │ │ │ ├── mtd_nor.h │ │ │ ├── phy.h │ │ │ ├── phy_mdio.h │ │ │ ├── pin.h │ │ │ ├── pm.h │ │ │ ├── pulse_encoder.h │ │ │ ├── rt_drv_pwm.h │ │ │ ├── rt_inputcapture.h │ │ │ ├── rtc.h │ │ │ ├── sd.h │ │ │ ├── sdio.h │ │ │ ├── sdio_func_ids.h │ │ │ ├── sensor.h │ │ │ ├── serial.h │ │ │ ├── serial_v2.h │ │ │ ├── spi.h │ │ │ ├── usb_common.h │ │ │ ├── usb_device.h │ │ │ ├── usb_host.h │ │ │ ├── watchdog.h │ │ │ └── wlan.h │ │ ├── ipc │ │ │ ├── completion.h │ │ │ ├── dataqueue.h │ │ │ ├── pipe.h │ │ │ ├── poll.h │ │ │ ├── ringblk_buf.h │ │ │ ├── ringbuffer.h │ │ │ ├── waitqueue.h │ │ │ └── workqueue.h │ │ └── rtdevice.h │ ├── misc │ │ ├── SConscript │ │ ├── adc.c │ │ ├── dac.c │ │ ├── pin.c │ │ ├── pulse_encoder.c │ │ ├── rt_drv_pwm.c │ │ └── rt_inputcapture.c │ ├── mtd │ │ ├── SConscript │ │ ├── mtd_nand.c │ │ └── mtd_nor.c │ ├── phy │ │ ├── SConscript │ │ └── phy.c │ ├── pm │ │ ├── SConscript │ │ ├── lptimer.c │ │ └── pm.c │ ├── rtc │ │ ├── README.md │ │ ├── SConscript │ │ ├── alarm.c │ │ ├── rtc.c │ │ └── soft_rtc.c │ ├── sdio │ │ ├── SConscript │ │ ├── block_dev.c │ │ ├── mmc.c │ │ ├── mmcsd_core.c │ │ ├── sd.c │ │ └── sdio.c │ ├── sensors │ │ ├── SConscript │ │ ├── sensor.c │ │ ├── sensor.h │ │ └── sensor_cmd.c │ ├── serial │ │ ├── SConscript │ │ ├── serial.c │ │ └── serial_v2.c │ ├── spi │ │ ├── SConscript │ │ ├── device_driver_list.txt │ │ ├── enc28j60.c │ │ ├── enc28j60.h │ │ ├── qspi_core.c │ │ ├── sfud │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── inc │ │ │ │ ├── sfud.h │ │ │ │ ├── sfud_cfg.h │ │ │ │ ├── sfud_def.h │ │ │ │ └── sfud_flash_def.h │ │ │ └── src │ │ │ │ ├── sfud.c │ │ │ │ └── sfud_sfdp.c │ │ ├── spi_core.c │ │ ├── spi_dev.c │ │ ├── spi_flash.h │ │ ├── spi_flash_sfud.c │ │ ├── spi_flash_sfud.h │ │ ├── spi_msd.c │ │ ├── spi_msd.h │ │ ├── spi_wifi_rw009.c │ │ └── spi_wifi_rw009.h │ ├── src │ │ ├── SConscript │ │ ├── completion.c │ │ ├── dataqueue.c │ │ ├── pipe.c │ │ ├── ringblk_buf.c │ │ ├── ringbuffer.c │ │ ├── waitqueue.c │ │ └── workqueue.c │ ├── touch │ │ ├── SConscript │ │ ├── touch.c │ │ └── touch.h │ ├── usb │ │ ├── SConscript │ │ ├── usbdevice │ │ │ ├── SConscript │ │ │ ├── class │ │ │ │ ├── audio_mic.c │ │ │ │ ├── audio_speaker.c │ │ │ │ ├── cdc.h │ │ │ │ ├── cdc_vcom.c │ │ │ │ ├── ecm.c │ │ │ │ ├── hid.c │ │ │ │ ├── hid.h │ │ │ │ ├── mstorage.c │ │ │ │ ├── mstorage.h │ │ │ │ ├── ndis.h │ │ │ │ ├── rndis.c │ │ │ │ ├── rndis.h │ │ │ │ ├── uaudioreg.h │ │ │ │ ├── winusb.c │ │ │ │ └── winusb.h │ │ │ └── core │ │ │ │ ├── usbdevice.c │ │ │ │ └── usbdevice_core.c │ │ └── usbhost │ │ │ ├── SConscript │ │ │ ├── class │ │ │ ├── adk.c │ │ │ ├── adk.h │ │ │ ├── hid.c │ │ │ ├── hid.h │ │ │ ├── mass.c │ │ │ ├── mass.h │ │ │ ├── udisk.c │ │ │ ├── ukbd.c │ │ │ └── umouse.c │ │ │ └── core │ │ │ ├── driver.c │ │ │ ├── hub.c │ │ │ ├── usbhost.c │ │ │ └── usbhost_core.c │ ├── watchdog │ │ ├── SConscript │ │ └── watchdog.c │ └── wlan │ │ ├── SConscript │ │ ├── wlan_cfg.c │ │ ├── wlan_cfg.h │ │ ├── wlan_cmd.c │ │ ├── wlan_dev.c │ │ ├── wlan_dev.h │ │ ├── wlan_lwip.c │ │ ├── wlan_mgnt.c │ │ ├── wlan_mgnt.h │ │ ├── wlan_prot.c │ │ ├── wlan_prot.h │ │ ├── wlan_workqueue.c │ │ └── wlan_workqueue.h ├── finsh │ ├── Kconfig │ ├── SConscript │ ├── cmd.c │ ├── finsh.h │ ├── msh.c │ ├── msh.h │ ├── msh_file.c │ ├── shell.c │ └── shell.h ├── legacy │ ├── README.md │ ├── SConscript │ ├── dfs │ │ ├── dfs_poll.h │ │ └── dfs_select.h │ ├── ipc │ │ ├── workqueue_legacy.c │ │ └── workqueue_legacy.h │ └── rtlegacy.h ├── libc │ ├── Kconfig │ ├── SConscript │ ├── compilers │ │ ├── SConscript │ │ ├── armlibc │ │ │ ├── README.md │ │ │ ├── SConscript │ │ │ ├── libc_syms.c │ │ │ ├── mem_std.c │ │ │ └── syscalls.c │ │ ├── common │ │ │ ├── SConscript │ │ │ ├── delay.h │ │ │ ├── dirent.h │ │ │ ├── nogcc │ │ │ │ ├── SConscript │ │ │ │ ├── fcntl.h │ │ │ │ ├── readme.md │ │ │ │ ├── sys │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── select.h │ │ │ │ │ ├── stat.h │ │ │ │ │ ├── types.h │ │ │ │ │ └── unistd.h │ │ │ │ └── unistd.h │ │ │ ├── readme.md │ │ │ ├── stdlib.c │ │ │ ├── sys │ │ │ │ ├── ioctl.h │ │ │ │ ├── signal.h │ │ │ │ ├── statfs.h │ │ │ │ ├── time.h │ │ │ │ └── vfs.h │ │ │ └── time.c │ │ ├── dlib │ │ │ ├── README.md │ │ │ ├── SConscript │ │ │ ├── environ.c │ │ │ ├── syscall_close.c │ │ │ ├── syscall_lseek.c │ │ │ ├── syscall_mem.c │ │ │ ├── syscall_open.c │ │ │ ├── syscall_read.c │ │ │ ├── syscall_remove.c │ │ │ ├── syscall_write.c │ │ │ └── syscalls.c │ │ ├── gcc │ │ │ ├── SConscript │ │ │ ├── newlib │ │ │ │ ├── README.md │ │ │ │ ├── SConscript │ │ │ │ ├── fcntl.h │ │ │ │ ├── libc_syms.c │ │ │ │ ├── machine │ │ │ │ │ └── time.h │ │ │ │ └── syscalls.c │ │ │ └── partial │ │ │ │ ├── SConscript │ │ │ │ ├── mips │ │ │ │ ├── SConscript │ │ │ │ ├── readme.md │ │ │ │ └── sys │ │ │ │ │ └── select.h │ │ │ │ └── readme.md │ │ └── readme.md │ ├── libdl │ │ ├── SConscript │ │ ├── arch │ │ │ ├── arm.c │ │ │ ├── riscv.c │ │ │ └── x86.c │ │ ├── dlclose.c │ │ ├── dlelf.c │ │ ├── dlelf.h │ │ ├── dlerror.c │ │ ├── dlfcn.h │ │ ├── dlmodule.c │ │ ├── dlmodule.h │ │ ├── dlopen.c │ │ └── dlsym.c │ └── posix │ │ ├── Kconfig │ │ ├── SConscript │ │ ├── getline │ │ ├── README.md │ │ ├── SConscript │ │ ├── UNLICENSE │ │ ├── posix_getline.c │ │ └── posix_getline.h │ │ ├── io │ │ ├── SConscript │ │ ├── aio │ │ │ ├── SConscript │ │ │ ├── aio.c │ │ │ └── aio.h │ │ ├── libc.c │ │ ├── libc.h │ │ ├── mman │ │ │ ├── SConscript │ │ │ ├── mman.c │ │ │ └── sys │ │ │ │ └── mman.h │ │ ├── poll │ │ │ ├── SConscript │ │ │ ├── poll.c │ │ │ └── poll.h │ │ ├── select.c │ │ └── termios │ │ │ ├── SConscript │ │ │ ├── termios.c │ │ │ └── termios.h │ │ ├── ipc │ │ ├── Kconfig │ │ └── sys │ │ │ ├── ipc.h │ │ │ ├── msg.h │ │ │ ├── sem.h │ │ │ └── shm.h │ │ ├── pthreads │ │ ├── SConscript │ │ ├── mqueue.c │ │ ├── mqueue.h │ │ ├── posix_types.h │ │ ├── pthread.c │ │ ├── pthread.h │ │ ├── pthread_attr.c │ │ ├── pthread_barrier.c │ │ ├── pthread_cond.c │ │ ├── pthread_internal.h │ │ ├── pthread_mutex.c │ │ ├── pthread_rwlock.c │ │ ├── pthread_spin.c │ │ ├── pthread_tls.c │ │ ├── sched.c │ │ ├── sched.h │ │ ├── semaphore.c │ │ └── semaphore.h │ │ ├── readme.md │ │ ├── signal │ │ ├── SConscript │ │ ├── posix_signal.c │ │ └── posix_signal.h │ │ └── src │ │ ├── SConscript │ │ ├── delay.c │ │ └── unistd.c ├── lwp │ ├── Kconfig │ ├── SConscript │ ├── arch │ │ └── arm │ │ │ ├── arm926 │ │ │ └── lwp_gcc.S │ │ │ ├── cortex-a │ │ │ └── lwp_gcc.S │ │ │ ├── cortex-a9 │ │ │ └── lwp_gcc.S │ │ │ ├── cortex-m3 │ │ │ ├── lwp_gcc.S │ │ │ ├── lwp_iar.S │ │ │ └── lwp_rvds.S │ │ │ ├── cortex-m4 │ │ │ ├── lwp_gcc.S │ │ │ ├── lwp_iar.S │ │ │ └── lwp_rvds.S │ │ │ └── cortex-m7 │ │ │ ├── lwp_gcc.S │ │ │ ├── lwp_iar.S │ │ │ └── lwp_rvds.S │ ├── lwp.c │ ├── lwp.h │ ├── lwp_mem.c │ ├── lwp_mem.h │ ├── lwp_memheap.c │ ├── lwp_memheap.h │ ├── lwp_syscall.c │ └── lwp_syscall.h ├── net │ ├── .ignore_format.yml │ ├── Kconfig │ ├── SConscript │ ├── at │ │ ├── Kconfig │ │ ├── SConscript │ │ ├── at_socket │ │ │ ├── at_socket.c │ │ │ └── at_socket.h │ │ ├── include │ │ │ ├── at.h │ │ │ └── at_log.h │ │ └── src │ │ │ ├── at_base_cmd.c │ │ │ ├── at_cli.c │ │ │ ├── at_client.c │ │ │ ├── at_server.c │ │ │ └── at_utils.c │ ├── lwip-1.4.1 │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── FILES │ │ ├── README │ │ ├── READTEST.md │ │ ├── SConscript │ │ ├── UPGRADING │ │ ├── doc │ │ │ ├── FILES │ │ │ ├── contrib.txt │ │ │ ├── rawapi.txt │ │ │ ├── savannah.txt │ │ │ ├── snmp_agent.txt │ │ │ └── sys_arch.txt │ │ ├── src │ │ │ ├── FILES │ │ │ ├── api │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── apps │ │ │ │ └── ping │ │ │ │ │ └── ping.c │ │ │ ├── arch │ │ │ │ ├── include │ │ │ │ │ └── arch │ │ │ │ │ │ ├── bpstruct.h │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── epstruct.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ └── sys_arch.c │ │ │ ├── core │ │ │ │ ├── def.c │ │ │ │ ├── dhcp.c │ │ │ │ ├── dns.c │ │ │ │ ├── init.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── inet.c │ │ │ │ │ ├── inet_chksum.c │ │ │ │ │ ├── ip.c │ │ │ │ │ ├── ip_addr.c │ │ │ │ │ └── ip_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── README │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ └── ip6_addr.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── snmp │ │ │ │ │ ├── asn1_dec.c │ │ │ │ │ ├── asn1_enc.c │ │ │ │ │ ├── mib2.c │ │ │ │ │ ├── mib_structs.c │ │ │ │ │ ├── msg_in.c │ │ │ │ │ └── msg_out.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ ├── timers.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── ipv4 │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ │ └── ip_frag.h │ │ │ │ ├── ipv6 │ │ │ │ │ └── lwip │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── inet.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ └── ip_addr.h │ │ │ │ ├── lwip │ │ │ │ │ ├── api.h │ │ │ │ │ ├── api_msg.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── memp_std.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_structs.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcp_impl.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ ├── timers.h │ │ │ │ │ └── udp.h │ │ │ │ ├── netif │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernetif.h │ │ │ │ │ ├── ppp_oe.h │ │ │ │ │ └── slipif.h │ │ │ │ └── posix │ │ │ │ │ ├── netdb.h │ │ │ │ │ └── sys │ │ │ │ │ └── socket.h │ │ │ ├── lwipopts.h │ │ │ └── netif │ │ │ │ ├── FILES │ │ │ │ ├── etharp.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── ppp │ │ │ │ ├── auth.c │ │ │ │ ├── auth.h │ │ │ │ ├── chap.c │ │ │ │ ├── chap.h │ │ │ │ ├── chpms.c │ │ │ │ ├── chpms.h │ │ │ │ ├── fsm.c │ │ │ │ ├── fsm.h │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipcp.h │ │ │ │ ├── lcp.c │ │ │ │ ├── lcp.h │ │ │ │ ├── magic.c │ │ │ │ ├── magic.h │ │ │ │ ├── md5.c │ │ │ │ ├── md5.h │ │ │ │ ├── pap.c │ │ │ │ ├── pap.h │ │ │ │ ├── ppp.c │ │ │ │ ├── ppp.h │ │ │ │ ├── ppp_impl.h │ │ │ │ ├── ppp_oe.c │ │ │ │ ├── pppdebug.h │ │ │ │ ├── randm.c │ │ │ │ ├── randm.h │ │ │ │ ├── vj.c │ │ │ │ └── vj.h │ │ │ │ └── slipif.c │ │ └── test │ │ │ └── unit │ │ │ ├── core │ │ │ ├── test_mem.c │ │ │ └── test_mem.h │ │ │ ├── etharp │ │ │ ├── test_etharp.c │ │ │ └── test_etharp.h │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── lwipopts.h │ │ │ ├── tcp │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ ├── lwip-2.0.2 │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── FILES │ │ ├── README │ │ ├── READTEST.md │ │ ├── SConscript │ │ ├── UPGRADING │ │ ├── doc │ │ │ ├── FILES │ │ │ ├── NO_SYS_SampleCode.c │ │ │ ├── contrib.txt │ │ │ ├── doxygen │ │ │ │ ├── generate.bat │ │ │ │ ├── generate.sh │ │ │ │ ├── lwip.Doxyfile │ │ │ │ ├── main_page.h │ │ │ │ └── output │ │ │ │ │ └── index.html │ │ │ ├── doxygen_docs.zip │ │ │ ├── mdns.txt │ │ │ ├── mqtt_client.txt │ │ │ ├── ppp.txt │ │ │ ├── rawapi.txt │ │ │ ├── savannah.txt │ │ │ └── sys_arch.txt │ │ ├── src │ │ │ ├── FILES │ │ │ ├── Filelists.mk │ │ │ ├── api │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── apps │ │ │ │ ├── README.md │ │ │ │ ├── httpd │ │ │ │ │ ├── fs.c │ │ │ │ │ ├── fs │ │ │ │ │ │ ├── 404.html │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ └── sics.gif │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── fsdata.c │ │ │ │ │ ├── fsdata.h │ │ │ │ │ ├── httpd.c │ │ │ │ │ ├── httpd_structs.h │ │ │ │ │ └── makefsdata │ │ │ │ │ │ ├── makefsdata │ │ │ │ │ │ ├── makefsdata.c │ │ │ │ │ │ └── readme.txt │ │ │ │ ├── lwiperf │ │ │ │ │ └── lwiperf.c │ │ │ │ ├── mdns │ │ │ │ │ └── mdns.c │ │ │ │ ├── mqtt │ │ │ │ │ └── mqtt.c │ │ │ │ ├── netbiosns │ │ │ │ │ └── netbiosns.c │ │ │ │ ├── ping │ │ │ │ │ └── ping.c │ │ │ │ ├── snmp │ │ │ │ │ ├── snmp_asn1.c │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_core.c │ │ │ │ │ ├── snmp_core_priv.h │ │ │ │ │ ├── snmp_mib2.c │ │ │ │ │ ├── snmp_mib2_icmp.c │ │ │ │ │ ├── snmp_mib2_interfaces.c │ │ │ │ │ ├── snmp_mib2_ip.c │ │ │ │ │ ├── snmp_mib2_snmp.c │ │ │ │ │ ├── snmp_mib2_system.c │ │ │ │ │ ├── snmp_mib2_tcp.c │ │ │ │ │ ├── snmp_mib2_udp.c │ │ │ │ │ ├── snmp_msg.c │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_netconn.c │ │ │ │ │ ├── snmp_pbuf_stream.c │ │ │ │ │ ├── snmp_pbuf_stream.h │ │ │ │ │ ├── snmp_raw.c │ │ │ │ │ ├── snmp_scalar.c │ │ │ │ │ ├── snmp_table.c │ │ │ │ │ ├── snmp_threadsync.c │ │ │ │ │ ├── snmp_traps.c │ │ │ │ │ ├── snmpv3.c │ │ │ │ │ ├── snmpv3_dummy.c │ │ │ │ │ ├── snmpv3_mbedtls.c │ │ │ │ │ └── snmpv3_priv.h │ │ │ │ ├── sntp │ │ │ │ │ └── sntp.c │ │ │ │ └── tftp │ │ │ │ │ ├── tftp_port.c │ │ │ │ │ └── tftp_server.c │ │ │ ├── arch │ │ │ │ ├── include │ │ │ │ │ └── arch │ │ │ │ │ │ ├── bpstruct.h │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── epstruct.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ └── sys_arch.c │ │ │ ├── core │ │ │ │ ├── def.c │ │ │ │ ├── dns.c │ │ │ │ ├── inet_chksum.c │ │ │ │ ├── init.c │ │ │ │ ├── ip.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── dhcp.c │ │ │ │ │ ├── etharp.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── ip4.c │ │ │ │ │ ├── ip4_addr.c │ │ │ │ │ └── ip4_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── dhcp6.c │ │ │ │ │ ├── ethip6.c │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ ├── ip6_addr.c │ │ │ │ │ ├── ip6_frag.c │ │ │ │ │ ├── mld6.c │ │ │ │ │ └── nd6.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ ├── timeouts.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── lwip │ │ │ │ │ ├── api.h │ │ │ │ │ ├── apps │ │ │ │ │ │ ├── FILES │ │ │ │ │ │ ├── fs.h │ │ │ │ │ │ ├── httpd.h │ │ │ │ │ │ ├── httpd_opts.h │ │ │ │ │ │ ├── lwiperf.h │ │ │ │ │ │ ├── mdns.h │ │ │ │ │ │ ├── mdns_opts.h │ │ │ │ │ │ ├── mdns_priv.h │ │ │ │ │ │ ├── mqtt.h │ │ │ │ │ │ ├── mqtt_opts.h │ │ │ │ │ │ ├── netbiosns.h │ │ │ │ │ │ ├── netbiosns_opts.h │ │ │ │ │ │ ├── snmp.h │ │ │ │ │ │ ├── snmp_core.h │ │ │ │ │ │ ├── snmp_mib2.h │ │ │ │ │ │ ├── snmp_opts.h │ │ │ │ │ │ ├── snmp_scalar.h │ │ │ │ │ │ ├── snmp_table.h │ │ │ │ │ │ ├── snmp_threadsync.h │ │ │ │ │ │ ├── snmpv3.h │ │ │ │ │ │ ├── sntp.h │ │ │ │ │ │ ├── sntp_opts.h │ │ │ │ │ │ ├── tftp_opts.h │ │ │ │ │ │ └── tftp_server.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── autoip.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethip6.h │ │ │ │ │ ├── icmp.h │ │ │ │ │ ├── icmp6.h │ │ │ │ │ ├── igmp.h │ │ │ │ │ ├── inet.h │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── ip.h │ │ │ │ │ ├── ip4.h │ │ │ │ │ ├── ip4_addr.h │ │ │ │ │ ├── ip4_frag.h │ │ │ │ │ ├── ip6.h │ │ │ │ │ ├── ip6_addr.h │ │ │ │ │ ├── ip6_frag.h │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── mld6.h │ │ │ │ │ ├── nd6.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── priv │ │ │ │ │ │ ├── api_msg.h │ │ │ │ │ │ ├── memp_priv.h │ │ │ │ │ │ ├── memp_std.h │ │ │ │ │ │ ├── nd6_priv.h │ │ │ │ │ │ ├── tcp_priv.h │ │ │ │ │ │ └── tcpip_priv.h │ │ │ │ │ ├── prot │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── dhcp.h │ │ │ │ │ │ ├── dns.h │ │ │ │ │ │ ├── etharp.h │ │ │ │ │ │ ├── ethernet.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── icmp6.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ ├── ip4.h │ │ │ │ │ │ ├── ip6.h │ │ │ │ │ │ ├── mld6.h │ │ │ │ │ │ ├── nd6.h │ │ │ │ │ │ ├── tcp.h │ │ │ │ │ │ └── udp.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ ├── timeouts.h │ │ │ │ │ └── udp.h │ │ │ │ ├── netif │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernet.h │ │ │ │ │ ├── ethernetif.h │ │ │ │ │ ├── lowpan6.h │ │ │ │ │ ├── lowpan6_opts.h │ │ │ │ │ ├── ppp │ │ │ │ │ │ ├── ccp.h │ │ │ │ │ │ ├── chap-md5.h │ │ │ │ │ │ ├── chap-new.h │ │ │ │ │ │ ├── chap_ms.h │ │ │ │ │ │ ├── eap.h │ │ │ │ │ │ ├── ecp.h │ │ │ │ │ │ ├── eui64.h │ │ │ │ │ │ ├── fsm.h │ │ │ │ │ │ ├── ipcp.h │ │ │ │ │ │ ├── ipv6cp.h │ │ │ │ │ │ ├── lcp.h │ │ │ │ │ │ ├── magic.h │ │ │ │ │ │ ├── mppe.h │ │ │ │ │ │ ├── polarssl │ │ │ │ │ │ │ ├── arc4.h │ │ │ │ │ │ │ ├── des.h │ │ │ │ │ │ │ ├── md4.h │ │ │ │ │ │ │ ├── md5.h │ │ │ │ │ │ │ └── sha1.h │ │ │ │ │ │ ├── ppp.h │ │ │ │ │ │ ├── ppp_impl.h │ │ │ │ │ │ ├── ppp_opts.h │ │ │ │ │ │ ├── pppapi.h │ │ │ │ │ │ ├── pppcrypt.h │ │ │ │ │ │ ├── pppdebug.h │ │ │ │ │ │ ├── pppoe.h │ │ │ │ │ │ ├── pppol2tp.h │ │ │ │ │ │ ├── pppos.h │ │ │ │ │ │ ├── upap.h │ │ │ │ │ │ └── vj.h │ │ │ │ │ └── slipif.h │ │ │ │ └── posix │ │ │ │ │ ├── netdb.h │ │ │ │ │ └── sys │ │ │ │ │ └── socket.h │ │ │ ├── lwipopts.h │ │ │ ├── lwippools.h │ │ │ └── netif │ │ │ │ ├── FILES │ │ │ │ ├── ethernet.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── lowpan6.c │ │ │ │ ├── ppp │ │ │ │ ├── PPPD_FOLLOWUP │ │ │ │ ├── auth.c │ │ │ │ ├── ccp.c │ │ │ │ ├── chap-md5.c │ │ │ │ ├── chap-new.c │ │ │ │ ├── chap_ms.c │ │ │ │ ├── demand.c │ │ │ │ ├── eap.c │ │ │ │ ├── ecp.c │ │ │ │ ├── eui64.c │ │ │ │ ├── fsm.c │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipv6cp.c │ │ │ │ ├── lcp.c │ │ │ │ ├── magic.c │ │ │ │ ├── mppe.c │ │ │ │ ├── multilink.c │ │ │ │ ├── polarssl │ │ │ │ │ ├── README │ │ │ │ │ ├── arc4.c │ │ │ │ │ ├── des.c │ │ │ │ │ ├── md4.c │ │ │ │ │ ├── md5.c │ │ │ │ │ └── sha1.c │ │ │ │ ├── ppp.c │ │ │ │ ├── pppapi.c │ │ │ │ ├── pppcrypt.c │ │ │ │ ├── pppoe.c │ │ │ │ ├── pppol2tp.c │ │ │ │ ├── pppos.c │ │ │ │ ├── upap.c │ │ │ │ ├── utils.c │ │ │ │ └── vj.c │ │ │ │ └── slipif.c │ │ └── test │ │ │ ├── fuzz │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── config.h │ │ │ ├── fuzz.c │ │ │ ├── lwipopts.h │ │ │ └── output_to_pcap.sh │ │ │ └── unit │ │ │ ├── core │ │ │ ├── test_mem.c │ │ │ ├── test_mem.h │ │ │ ├── test_pbuf.c │ │ │ └── test_pbuf.h │ │ │ ├── dhcp │ │ │ ├── test_dhcp.c │ │ │ └── test_dhcp.h │ │ │ ├── etharp │ │ │ ├── test_etharp.c │ │ │ └── test_etharp.h │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── lwipopts.h │ │ │ ├── mdns │ │ │ ├── test_mdns.c │ │ │ └── test_mdns.h │ │ │ ├── tcp │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ ├── lwip-2.0.3 │ │ ├── CHANGELOG │ │ ├── COPYING │ │ ├── FILES │ │ ├── README │ │ ├── READTEST.md │ │ ├── SConscript │ │ ├── UPGRADING │ │ ├── doc │ │ │ ├── FILES │ │ │ ├── NO_SYS_SampleCode.c │ │ │ ├── contrib.txt │ │ │ ├── doxygen │ │ │ │ ├── generate.bat │ │ │ │ ├── generate.sh │ │ │ │ ├── lwip.Doxyfile │ │ │ │ ├── main_page.h │ │ │ │ └── output │ │ │ │ │ └── index.html │ │ │ ├── mdns.txt │ │ │ ├── mqtt_client.txt │ │ │ ├── ppp.txt │ │ │ ├── rawapi.txt │ │ │ ├── savannah.txt │ │ │ └── sys_arch.txt │ │ ├── src │ │ │ ├── FILES │ │ │ ├── Filelists.mk │ │ │ ├── api │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── apps │ │ │ │ ├── README.md │ │ │ │ ├── httpd │ │ │ │ │ ├── fs.c │ │ │ │ │ ├── fs │ │ │ │ │ │ ├── 404.html │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ └── sics.gif │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── fsdata.c │ │ │ │ │ ├── fsdata.h │ │ │ │ │ ├── httpd.c │ │ │ │ │ ├── httpd_structs.h │ │ │ │ │ └── makefsdata │ │ │ │ │ │ ├── makefsdata │ │ │ │ │ │ ├── makefsdata.c │ │ │ │ │ │ └── readme.txt │ │ │ │ ├── lwiperf │ │ │ │ │ └── lwiperf.c │ │ │ │ ├── mdns │ │ │ │ │ └── mdns.c │ │ │ │ ├── mqtt │ │ │ │ │ └── mqtt.c │ │ │ │ ├── netbiosns │ │ │ │ │ └── netbiosns.c │ │ │ │ ├── ping │ │ │ │ │ └── ping.c │ │ │ │ ├── snmp │ │ │ │ │ ├── snmp_asn1.c │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_core.c │ │ │ │ │ ├── snmp_core_priv.h │ │ │ │ │ ├── snmp_mib2.c │ │ │ │ │ ├── snmp_mib2_icmp.c │ │ │ │ │ ├── snmp_mib2_interfaces.c │ │ │ │ │ ├── snmp_mib2_ip.c │ │ │ │ │ ├── snmp_mib2_snmp.c │ │ │ │ │ ├── snmp_mib2_system.c │ │ │ │ │ ├── snmp_mib2_tcp.c │ │ │ │ │ ├── snmp_mib2_udp.c │ │ │ │ │ ├── snmp_msg.c │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_netconn.c │ │ │ │ │ ├── snmp_pbuf_stream.c │ │ │ │ │ ├── snmp_pbuf_stream.h │ │ │ │ │ ├── snmp_raw.c │ │ │ │ │ ├── snmp_scalar.c │ │ │ │ │ ├── snmp_table.c │ │ │ │ │ ├── snmp_threadsync.c │ │ │ │ │ ├── snmp_traps.c │ │ │ │ │ ├── snmpv3.c │ │ │ │ │ ├── snmpv3_dummy.c │ │ │ │ │ ├── snmpv3_mbedtls.c │ │ │ │ │ └── snmpv3_priv.h │ │ │ │ ├── sntp │ │ │ │ │ └── sntp.c │ │ │ │ └── tftp │ │ │ │ │ ├── tftp_port.c │ │ │ │ │ └── tftp_server.c │ │ │ ├── arch │ │ │ │ ├── include │ │ │ │ │ └── arch │ │ │ │ │ │ ├── bpstruct.h │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── epstruct.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ └── sys_arch.c │ │ │ ├── core │ │ │ │ ├── def.c │ │ │ │ ├── dns.c │ │ │ │ ├── inet_chksum.c │ │ │ │ ├── init.c │ │ │ │ ├── ip.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── dhcp.c │ │ │ │ │ ├── etharp.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── ip4.c │ │ │ │ │ ├── ip4_addr.c │ │ │ │ │ └── ip4_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── dhcp6.c │ │ │ │ │ ├── ethip6.c │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ ├── ip6_addr.c │ │ │ │ │ ├── ip6_frag.c │ │ │ │ │ ├── mld6.c │ │ │ │ │ └── nd6.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ ├── timeouts.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── lwip │ │ │ │ │ ├── api.h │ │ │ │ │ ├── apps │ │ │ │ │ │ ├── FILES │ │ │ │ │ │ ├── fs.h │ │ │ │ │ │ ├── httpd.h │ │ │ │ │ │ ├── httpd_opts.h │ │ │ │ │ │ ├── lwiperf.h │ │ │ │ │ │ ├── mdns.h │ │ │ │ │ │ ├── mdns_opts.h │ │ │ │ │ │ ├── mdns_priv.h │ │ │ │ │ │ ├── mqtt.h │ │ │ │ │ │ ├── mqtt_opts.h │ │ │ │ │ │ ├── netbiosns.h │ │ │ │ │ │ ├── netbiosns_opts.h │ │ │ │ │ │ ├── snmp.h │ │ │ │ │ │ ├── snmp_core.h │ │ │ │ │ │ ├── snmp_mib2.h │ │ │ │ │ │ ├── snmp_opts.h │ │ │ │ │ │ ├── snmp_scalar.h │ │ │ │ │ │ ├── snmp_table.h │ │ │ │ │ │ ├── snmp_threadsync.h │ │ │ │ │ │ ├── snmpv3.h │ │ │ │ │ │ ├── sntp.h │ │ │ │ │ │ ├── sntp_opts.h │ │ │ │ │ │ ├── tftp_opts.h │ │ │ │ │ │ └── tftp_server.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── autoip.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethip6.h │ │ │ │ │ ├── icmp.h │ │ │ │ │ ├── icmp6.h │ │ │ │ │ ├── igmp.h │ │ │ │ │ ├── inet.h │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── ip.h │ │ │ │ │ ├── ip4.h │ │ │ │ │ ├── ip4_addr.h │ │ │ │ │ ├── ip4_frag.h │ │ │ │ │ ├── ip6.h │ │ │ │ │ ├── ip6_addr.h │ │ │ │ │ ├── ip6_frag.h │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── mld6.h │ │ │ │ │ ├── nd6.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── priv │ │ │ │ │ │ ├── api_msg.h │ │ │ │ │ │ ├── memp_priv.h │ │ │ │ │ │ ├── memp_std.h │ │ │ │ │ │ ├── nd6_priv.h │ │ │ │ │ │ ├── tcp_priv.h │ │ │ │ │ │ └── tcpip_priv.h │ │ │ │ │ ├── prot │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── dhcp.h │ │ │ │ │ │ ├── dns.h │ │ │ │ │ │ ├── etharp.h │ │ │ │ │ │ ├── ethernet.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── icmp6.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ ├── ip4.h │ │ │ │ │ │ ├── ip6.h │ │ │ │ │ │ ├── mld6.h │ │ │ │ │ │ ├── nd6.h │ │ │ │ │ │ ├── tcp.h │ │ │ │ │ │ └── udp.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ ├── timeouts.h │ │ │ │ │ └── udp.h │ │ │ │ ├── netif │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernet.h │ │ │ │ │ ├── ethernetif.h │ │ │ │ │ ├── lowpan6.h │ │ │ │ │ ├── lowpan6_opts.h │ │ │ │ │ ├── ppp │ │ │ │ │ │ ├── ccp.h │ │ │ │ │ │ ├── chap-md5.h │ │ │ │ │ │ ├── chap-new.h │ │ │ │ │ │ ├── chap_ms.h │ │ │ │ │ │ ├── eap.h │ │ │ │ │ │ ├── ecp.h │ │ │ │ │ │ ├── eui64.h │ │ │ │ │ │ ├── fsm.h │ │ │ │ │ │ ├── ipcp.h │ │ │ │ │ │ ├── ipv6cp.h │ │ │ │ │ │ ├── lcp.h │ │ │ │ │ │ ├── magic.h │ │ │ │ │ │ ├── mppe.h │ │ │ │ │ │ ├── polarssl │ │ │ │ │ │ │ ├── arc4.h │ │ │ │ │ │ │ ├── des.h │ │ │ │ │ │ │ ├── md4.h │ │ │ │ │ │ │ ├── md5.h │ │ │ │ │ │ │ └── sha1.h │ │ │ │ │ │ ├── ppp.h │ │ │ │ │ │ ├── ppp_impl.h │ │ │ │ │ │ ├── ppp_opts.h │ │ │ │ │ │ ├── pppapi.h │ │ │ │ │ │ ├── pppcrypt.h │ │ │ │ │ │ ├── pppdebug.h │ │ │ │ │ │ ├── pppoe.h │ │ │ │ │ │ ├── pppol2tp.h │ │ │ │ │ │ ├── pppos.h │ │ │ │ │ │ ├── upap.h │ │ │ │ │ │ └── vj.h │ │ │ │ │ └── slipif.h │ │ │ │ └── posix │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ └── sys │ │ │ │ │ └── socket.h │ │ │ ├── lwipopts.h │ │ │ ├── lwippools.h │ │ │ └── netif │ │ │ │ ├── FILES │ │ │ │ ├── ethernet.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── lowpan6.c │ │ │ │ ├── ppp │ │ │ │ ├── PPPD_FOLLOWUP │ │ │ │ ├── auth.c │ │ │ │ ├── ccp.c │ │ │ │ ├── chap-md5.c │ │ │ │ ├── chap-new.c │ │ │ │ ├── chap_ms.c │ │ │ │ ├── demand.c │ │ │ │ ├── eap.c │ │ │ │ ├── ecp.c │ │ │ │ ├── eui64.c │ │ │ │ ├── fsm.c │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipv6cp.c │ │ │ │ ├── lcp.c │ │ │ │ ├── magic.c │ │ │ │ ├── mppe.c │ │ │ │ ├── multilink.c │ │ │ │ ├── polarssl │ │ │ │ │ ├── README │ │ │ │ │ ├── arc4.c │ │ │ │ │ ├── des.c │ │ │ │ │ ├── md4.c │ │ │ │ │ ├── md5.c │ │ │ │ │ └── sha1.c │ │ │ │ ├── ppp.c │ │ │ │ ├── pppapi.c │ │ │ │ ├── pppcrypt.c │ │ │ │ ├── pppoe.c │ │ │ │ ├── pppol2tp.c │ │ │ │ ├── pppos.c │ │ │ │ ├── upap.c │ │ │ │ ├── utils.c │ │ │ │ └── vj.c │ │ │ │ └── slipif.c │ │ └── test │ │ │ ├── fuzz │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── config.h │ │ │ ├── fuzz.c │ │ │ ├── lwipopts.h │ │ │ └── output_to_pcap.sh │ │ │ └── unit │ │ │ ├── core │ │ │ ├── test_mem.c │ │ │ ├── test_mem.h │ │ │ ├── test_pbuf.c │ │ │ └── test_pbuf.h │ │ │ ├── dhcp │ │ │ ├── test_dhcp.c │ │ │ └── test_dhcp.h │ │ │ ├── etharp │ │ │ ├── test_etharp.c │ │ │ └── test_etharp.h │ │ │ ├── ip4 │ │ │ ├── test_ip4.c │ │ │ └── test_ip4.h │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── lwipopts.h │ │ │ ├── mdns │ │ │ ├── test_mdns.c │ │ │ └── test_mdns.h │ │ │ ├── tcp │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ ├── lwip-2.1.2 │ │ ├── CHANGELOG │ │ ├── CMakeLists.txt │ │ ├── COPYING │ │ ├── FEATURES │ │ ├── FILES │ │ ├── README │ │ ├── README_RT-THREAD.md │ │ ├── SConscript │ │ ├── UPGRADING │ │ ├── src │ │ │ ├── FILES │ │ │ ├── Filelists.cmake │ │ │ ├── Filelists.mk │ │ │ ├── api │ │ │ │ ├── api_lib.c │ │ │ │ ├── api_msg.c │ │ │ │ ├── err.c │ │ │ │ ├── if_api.c │ │ │ │ ├── netbuf.c │ │ │ │ ├── netdb.c │ │ │ │ ├── netifapi.c │ │ │ │ ├── sockets.c │ │ │ │ └── tcpip.c │ │ │ ├── apps │ │ │ │ ├── altcp_tls │ │ │ │ │ ├── altcp_tls_mbedtls.c │ │ │ │ │ ├── altcp_tls_mbedtls_mem.c │ │ │ │ │ ├── altcp_tls_mbedtls_mem.h │ │ │ │ │ └── altcp_tls_mbedtls_structs.h │ │ │ │ ├── http │ │ │ │ │ ├── altcp_proxyconnect.c │ │ │ │ │ ├── fs.c │ │ │ │ │ ├── fs │ │ │ │ │ │ ├── 404.html │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ └── sics.gif │ │ │ │ │ │ └── index.html │ │ │ │ │ ├── fsdata.c │ │ │ │ │ ├── fsdata.h │ │ │ │ │ ├── http_client.c │ │ │ │ │ ├── httpd.c │ │ │ │ │ ├── httpd_structs.h │ │ │ │ │ └── makefsdata │ │ │ │ │ │ ├── makefsdata │ │ │ │ │ │ ├── makefsdata.c │ │ │ │ │ │ ├── readme.txt │ │ │ │ │ │ └── tinydir.h │ │ │ │ ├── lwiperf │ │ │ │ │ └── lwiperf.c │ │ │ │ ├── mdns │ │ │ │ │ └── mdns.c │ │ │ │ ├── mqtt │ │ │ │ │ └── mqtt.c │ │ │ │ ├── netbiosns │ │ │ │ │ └── netbiosns.c │ │ │ │ ├── ping │ │ │ │ │ └── ping.c │ │ │ │ ├── smtp │ │ │ │ │ └── smtp.c │ │ │ │ ├── snmp │ │ │ │ │ ├── snmp_asn1.c │ │ │ │ │ ├── snmp_asn1.h │ │ │ │ │ ├── snmp_core.c │ │ │ │ │ ├── snmp_core_priv.h │ │ │ │ │ ├── snmp_mib2.c │ │ │ │ │ ├── snmp_mib2_icmp.c │ │ │ │ │ ├── snmp_mib2_interfaces.c │ │ │ │ │ ├── snmp_mib2_ip.c │ │ │ │ │ ├── snmp_mib2_snmp.c │ │ │ │ │ ├── snmp_mib2_system.c │ │ │ │ │ ├── snmp_mib2_tcp.c │ │ │ │ │ ├── snmp_mib2_udp.c │ │ │ │ │ ├── snmp_msg.c │ │ │ │ │ ├── snmp_msg.h │ │ │ │ │ ├── snmp_netconn.c │ │ │ │ │ ├── snmp_pbuf_stream.c │ │ │ │ │ ├── snmp_pbuf_stream.h │ │ │ │ │ ├── snmp_raw.c │ │ │ │ │ ├── snmp_scalar.c │ │ │ │ │ ├── snmp_snmpv2_framework.c │ │ │ │ │ ├── snmp_snmpv2_usm.c │ │ │ │ │ ├── snmp_table.c │ │ │ │ │ ├── snmp_threadsync.c │ │ │ │ │ ├── snmp_traps.c │ │ │ │ │ ├── snmpv3.c │ │ │ │ │ ├── snmpv3_mbedtls.c │ │ │ │ │ └── snmpv3_priv.h │ │ │ │ ├── sntp │ │ │ │ │ └── sntp.c │ │ │ │ └── tftp │ │ │ │ │ ├── tftp_port.c │ │ │ │ │ └── tftp_server.c │ │ │ ├── arch │ │ │ │ ├── include │ │ │ │ │ └── arch │ │ │ │ │ │ ├── bpstruct.h │ │ │ │ │ │ ├── cc.h │ │ │ │ │ │ ├── epstruct.h │ │ │ │ │ │ ├── perf.h │ │ │ │ │ │ └── sys_arch.h │ │ │ │ └── sys_arch.c │ │ │ ├── core │ │ │ │ ├── altcp.c │ │ │ │ ├── altcp_alloc.c │ │ │ │ ├── altcp_tcp.c │ │ │ │ ├── def.c │ │ │ │ ├── dns.c │ │ │ │ ├── inet_chksum.c │ │ │ │ ├── init.c │ │ │ │ ├── ip.c │ │ │ │ ├── ipv4 │ │ │ │ │ ├── autoip.c │ │ │ │ │ ├── dhcp.c │ │ │ │ │ ├── etharp.c │ │ │ │ │ ├── icmp.c │ │ │ │ │ ├── igmp.c │ │ │ │ │ ├── ip4.c │ │ │ │ │ ├── ip4_addr.c │ │ │ │ │ └── ip4_frag.c │ │ │ │ ├── ipv6 │ │ │ │ │ ├── dhcp6.c │ │ │ │ │ ├── ethip6.c │ │ │ │ │ ├── icmp6.c │ │ │ │ │ ├── inet6.c │ │ │ │ │ ├── ip6.c │ │ │ │ │ ├── ip6_addr.c │ │ │ │ │ ├── ip6_frag.c │ │ │ │ │ ├── mld6.c │ │ │ │ │ └── nd6.c │ │ │ │ ├── mem.c │ │ │ │ ├── memp.c │ │ │ │ ├── netif.c │ │ │ │ ├── pbuf.c │ │ │ │ ├── raw.c │ │ │ │ ├── stats.c │ │ │ │ ├── sys.c │ │ │ │ ├── tcp.c │ │ │ │ ├── tcp_in.c │ │ │ │ ├── tcp_out.c │ │ │ │ ├── timeouts.c │ │ │ │ └── udp.c │ │ │ ├── include │ │ │ │ ├── compat │ │ │ │ │ ├── posix │ │ │ │ │ │ ├── arpa │ │ │ │ │ │ │ └── inet.h │ │ │ │ │ │ ├── net │ │ │ │ │ │ │ └── if.h │ │ │ │ │ │ ├── netdb.h │ │ │ │ │ │ └── sys │ │ │ │ │ │ │ └── socket.h │ │ │ │ │ └── stdc │ │ │ │ │ │ └── errno.h │ │ │ │ ├── lwip │ │ │ │ │ ├── altcp.h │ │ │ │ │ ├── altcp_tcp.h │ │ │ │ │ ├── altcp_tls.h │ │ │ │ │ ├── api.h │ │ │ │ │ ├── apps │ │ │ │ │ │ ├── FILES │ │ │ │ │ │ ├── altcp_proxyconnect.h │ │ │ │ │ │ ├── altcp_tls_mbedtls_opts.h │ │ │ │ │ │ ├── fs.h │ │ │ │ │ │ ├── http_client.h │ │ │ │ │ │ ├── httpd.h │ │ │ │ │ │ ├── httpd_opts.h │ │ │ │ │ │ ├── lwiperf.h │ │ │ │ │ │ ├── mdns.h │ │ │ │ │ │ ├── mdns_opts.h │ │ │ │ │ │ ├── mdns_priv.h │ │ │ │ │ │ ├── mqtt.h │ │ │ │ │ │ ├── mqtt_opts.h │ │ │ │ │ │ ├── mqtt_priv.h │ │ │ │ │ │ ├── netbiosns.h │ │ │ │ │ │ ├── netbiosns_opts.h │ │ │ │ │ │ ├── smtp.h │ │ │ │ │ │ ├── smtp_opts.h │ │ │ │ │ │ ├── snmp.h │ │ │ │ │ │ ├── snmp_core.h │ │ │ │ │ │ ├── snmp_mib2.h │ │ │ │ │ │ ├── snmp_opts.h │ │ │ │ │ │ ├── snmp_scalar.h │ │ │ │ │ │ ├── snmp_snmpv2_framework.h │ │ │ │ │ │ ├── snmp_snmpv2_usm.h │ │ │ │ │ │ ├── snmp_table.h │ │ │ │ │ │ ├── snmp_threadsync.h │ │ │ │ │ │ ├── snmpv3.h │ │ │ │ │ │ ├── sntp.h │ │ │ │ │ │ ├── sntp_opts.h │ │ │ │ │ │ ├── tftp_opts.h │ │ │ │ │ │ └── tftp_server.h │ │ │ │ │ ├── arch.h │ │ │ │ │ ├── autoip.h │ │ │ │ │ ├── debug.h │ │ │ │ │ ├── def.h │ │ │ │ │ ├── dhcp.h │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ ├── dns.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── errno.h │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethip6.h │ │ │ │ │ ├── icmp.h │ │ │ │ │ ├── icmp6.h │ │ │ │ │ ├── if_api.h │ │ │ │ │ ├── igmp.h │ │ │ │ │ ├── inet.h │ │ │ │ │ ├── inet_chksum.h │ │ │ │ │ ├── init.h │ │ │ │ │ ├── init.h.cmake.in │ │ │ │ │ ├── ip.h │ │ │ │ │ ├── ip4.h │ │ │ │ │ ├── ip4_addr.h │ │ │ │ │ ├── ip4_frag.h │ │ │ │ │ ├── ip6.h │ │ │ │ │ ├── ip6_addr.h │ │ │ │ │ ├── ip6_frag.h │ │ │ │ │ ├── ip6_zone.h │ │ │ │ │ ├── ip_addr.h │ │ │ │ │ ├── mem.h │ │ │ │ │ ├── memp.h │ │ │ │ │ ├── mld6.h │ │ │ │ │ ├── nd6.h │ │ │ │ │ ├── netbuf.h │ │ │ │ │ ├── netdb.h │ │ │ │ │ ├── netif.h │ │ │ │ │ ├── netifapi.h │ │ │ │ │ ├── opt.h │ │ │ │ │ ├── pbuf.h │ │ │ │ │ ├── priv │ │ │ │ │ │ ├── altcp_priv.h │ │ │ │ │ │ ├── api_msg.h │ │ │ │ │ │ ├── mem_priv.h │ │ │ │ │ │ ├── memp_priv.h │ │ │ │ │ │ ├── memp_std.h │ │ │ │ │ │ ├── nd6_priv.h │ │ │ │ │ │ ├── raw_priv.h │ │ │ │ │ │ ├── sockets_priv.h │ │ │ │ │ │ ├── tcp_priv.h │ │ │ │ │ │ └── tcpip_priv.h │ │ │ │ │ ├── prot │ │ │ │ │ │ ├── autoip.h │ │ │ │ │ │ ├── dhcp.h │ │ │ │ │ │ ├── dhcp6.h │ │ │ │ │ │ ├── dns.h │ │ │ │ │ │ ├── etharp.h │ │ │ │ │ │ ├── ethernet.h │ │ │ │ │ │ ├── iana.h │ │ │ │ │ │ ├── icmp.h │ │ │ │ │ │ ├── icmp6.h │ │ │ │ │ │ ├── ieee.h │ │ │ │ │ │ ├── igmp.h │ │ │ │ │ │ ├── ip.h │ │ │ │ │ │ ├── ip4.h │ │ │ │ │ │ ├── ip6.h │ │ │ │ │ │ ├── mld6.h │ │ │ │ │ │ ├── nd6.h │ │ │ │ │ │ ├── tcp.h │ │ │ │ │ │ └── udp.h │ │ │ │ │ ├── raw.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── snmp.h │ │ │ │ │ ├── sockets.h │ │ │ │ │ ├── stats.h │ │ │ │ │ ├── sys.h │ │ │ │ │ ├── tcp.h │ │ │ │ │ ├── tcpbase.h │ │ │ │ │ ├── tcpip.h │ │ │ │ │ ├── timeouts.h │ │ │ │ │ └── udp.h │ │ │ │ └── netif │ │ │ │ │ ├── bridgeif.h │ │ │ │ │ ├── bridgeif_opts.h │ │ │ │ │ ├── etharp.h │ │ │ │ │ ├── ethernet.h │ │ │ │ │ ├── ethernetif.h │ │ │ │ │ ├── ieee802154.h │ │ │ │ │ ├── lowpan6.h │ │ │ │ │ ├── lowpan6_ble.h │ │ │ │ │ ├── lowpan6_common.h │ │ │ │ │ ├── lowpan6_opts.h │ │ │ │ │ ├── ppp │ │ │ │ │ ├── ccp.h │ │ │ │ │ ├── chap-md5.h │ │ │ │ │ ├── chap-new.h │ │ │ │ │ ├── chap_ms.h │ │ │ │ │ ├── eap.h │ │ │ │ │ ├── ecp.h │ │ │ │ │ ├── eui64.h │ │ │ │ │ ├── fsm.h │ │ │ │ │ ├── ipcp.h │ │ │ │ │ ├── ipv6cp.h │ │ │ │ │ ├── lcp.h │ │ │ │ │ ├── magic.h │ │ │ │ │ ├── mppe.h │ │ │ │ │ ├── polarssl │ │ │ │ │ │ ├── arc4.h │ │ │ │ │ │ ├── des.h │ │ │ │ │ │ ├── md4.h │ │ │ │ │ │ ├── md5.h │ │ │ │ │ │ └── sha1.h │ │ │ │ │ ├── ppp.h │ │ │ │ │ ├── ppp_impl.h │ │ │ │ │ ├── ppp_opts.h │ │ │ │ │ ├── pppapi.h │ │ │ │ │ ├── pppcrypt.h │ │ │ │ │ ├── pppdebug.h │ │ │ │ │ ├── pppoe.h │ │ │ │ │ ├── pppol2tp.h │ │ │ │ │ ├── pppos.h │ │ │ │ │ ├── upap.h │ │ │ │ │ └── vj.h │ │ │ │ │ ├── slipif.h │ │ │ │ │ └── zepif.h │ │ │ ├── lwipopts.h │ │ │ ├── lwippools.h │ │ │ └── netif │ │ │ │ ├── FILES │ │ │ │ ├── bridgeif.c │ │ │ │ ├── bridgeif_fdb.c │ │ │ │ ├── ethernet.c │ │ │ │ ├── ethernetif.c │ │ │ │ ├── lowpan6.c │ │ │ │ ├── lowpan6_ble.c │ │ │ │ ├── lowpan6_common.c │ │ │ │ ├── ppp │ │ │ │ ├── PPPD_FOLLOWUP │ │ │ │ ├── auth.c │ │ │ │ ├── ccp.c │ │ │ │ ├── chap-md5.c │ │ │ │ ├── chap-new.c │ │ │ │ ├── chap_ms.c │ │ │ │ ├── demand.c │ │ │ │ ├── eap.c │ │ │ │ ├── ecp.c │ │ │ │ ├── eui64.c │ │ │ │ ├── fsm.c │ │ │ │ ├── ipcp.c │ │ │ │ ├── ipv6cp.c │ │ │ │ ├── lcp.c │ │ │ │ ├── magic.c │ │ │ │ ├── mppe.c │ │ │ │ ├── multilink.c │ │ │ │ ├── polarssl │ │ │ │ │ ├── README │ │ │ │ │ ├── arc4.c │ │ │ │ │ ├── des.c │ │ │ │ │ ├── md4.c │ │ │ │ │ ├── md5.c │ │ │ │ │ └── sha1.c │ │ │ │ ├── ppp.c │ │ │ │ ├── pppapi.c │ │ │ │ ├── pppcrypt.c │ │ │ │ ├── pppoe.c │ │ │ │ ├── pppol2tp.c │ │ │ │ ├── pppos.c │ │ │ │ ├── upap.c │ │ │ │ ├── utils.c │ │ │ │ └── vj.c │ │ │ │ ├── slipif.c │ │ │ │ └── zepif.c │ │ └── test │ │ │ ├── fuzz │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── config.h │ │ │ ├── fuzz.c │ │ │ ├── lwipopts.h │ │ │ └── output_to_pcap.sh │ │ │ ├── sockets │ │ │ ├── sockets_stresstest.c │ │ │ └── sockets_stresstest.h │ │ │ └── unit │ │ │ ├── Filelists.cmake │ │ │ ├── Filelists.mk │ │ │ ├── api │ │ │ ├── test_sockets.c │ │ │ └── test_sockets.h │ │ │ ├── arch │ │ │ ├── sys_arch.c │ │ │ └── sys_arch.h │ │ │ ├── core │ │ │ ├── test_def.c │ │ │ ├── test_def.h │ │ │ ├── test_mem.c │ │ │ ├── test_mem.h │ │ │ ├── test_netif.c │ │ │ ├── test_netif.h │ │ │ ├── test_pbuf.c │ │ │ ├── test_pbuf.h │ │ │ ├── test_timers.c │ │ │ └── test_timers.h │ │ │ ├── dhcp │ │ │ ├── test_dhcp.c │ │ │ └── test_dhcp.h │ │ │ ├── etharp │ │ │ ├── test_etharp.c │ │ │ └── test_etharp.h │ │ │ ├── ip4 │ │ │ ├── test_ip4.c │ │ │ └── test_ip4.h │ │ │ ├── ip6 │ │ │ ├── test_ip6.c │ │ │ └── test_ip6.h │ │ │ ├── lwip_check.h │ │ │ ├── lwip_unittests.c │ │ │ ├── lwipopts.h │ │ │ ├── mdns │ │ │ ├── test_mdns.c │ │ │ └── test_mdns.h │ │ │ ├── mqtt │ │ │ ├── test_mqtt.c │ │ │ └── test_mqtt.h │ │ │ ├── tcp │ │ │ ├── tcp_helper.c │ │ │ ├── tcp_helper.h │ │ │ ├── test_tcp.c │ │ │ ├── test_tcp.h │ │ │ ├── test_tcp_oos.c │ │ │ └── test_tcp_oos.h │ │ │ └── udp │ │ │ ├── test_udp.c │ │ │ └── test_udp.h │ ├── lwip_dhcpd │ │ ├── SConscript │ │ ├── dhcp_server.c │ │ ├── dhcp_server.h │ │ └── dhcp_server_raw.c │ ├── lwip_nat │ │ ├── README.md │ │ ├── SConscript │ │ ├── ipv4_nat.c │ │ └── ipv4_nat.h │ ├── netdev │ │ ├── SConscript │ │ ├── include │ │ │ ├── arpa │ │ │ │ └── inet.h │ │ │ ├── netdev.h │ │ │ └── netdev_ipaddr.h │ │ └── src │ │ │ ├── netdev.c │ │ │ └── netdev_ipaddr.c │ └── sal_socket │ │ ├── SConscript │ │ ├── dfs_net │ │ └── dfs_net.c │ │ ├── impl │ │ ├── af_inet.h │ │ ├── af_inet_at.c │ │ ├── af_inet_lwip.c │ │ └── proto_mbedtls.c │ │ ├── include │ │ ├── dfs_net │ │ │ └── dfs_net.h │ │ ├── sal.h │ │ ├── sal_netdb.h │ │ ├── sal_socket.h │ │ ├── sal_tls.h │ │ └── socket │ │ │ ├── netdb.h │ │ │ ├── netinet │ │ │ ├── in.h │ │ │ ├── tcp.h │ │ │ └── udp.h │ │ │ └── sys_socket │ │ │ └── sys │ │ │ └── socket.h │ │ ├── socket │ │ ├── net_netdb.c │ │ └── net_sockets.c │ │ └── src │ │ └── sal_socket.c ├── utilities │ ├── Kconfig │ ├── SConscript │ ├── rt-link │ │ ├── Kconfig │ │ ├── SConscript │ │ ├── inc │ │ │ ├── rtlink.h │ │ │ ├── rtlink_dev.h │ │ │ ├── rtlink_hw.h │ │ │ ├── rtlink_port.h │ │ │ └── rtlink_utils.h │ │ └── src │ │ │ ├── SConscript │ │ │ ├── rtlink.c │ │ │ ├── rtlink_dev.c │ │ │ ├── rtlink_hw.c │ │ │ └── rtlink_utils.c │ ├── ulog │ │ ├── SConscript │ │ ├── backend │ │ │ └── console_be.c │ │ ├── syslog │ │ │ ├── syslog.c │ │ │ └── syslog.h │ │ ├── ulog.c │ │ ├── ulog.h │ │ └── ulog_def.h │ ├── utest │ │ ├── SConscript │ │ ├── utest.c │ │ ├── utest.h │ │ ├── utest_assert.h │ │ └── utest_log.h │ ├── var_export │ │ ├── SConscript │ │ ├── var_export.c │ │ ├── var_export.h │ │ └── var_export_cmd.c │ ├── ymodem │ │ ├── SConscript │ │ ├── ry_sy.c │ │ ├── ymodem.c │ │ └── ymodem.h │ └── zmodem │ │ ├── crc.h │ │ ├── rz.c │ │ ├── sz.c │ │ ├── zcore.c │ │ ├── zdef.h │ │ ├── zdevice.c │ │ └── zstart.c ├── vbus │ ├── Kconfig │ ├── SConscript │ ├── prio_queue.c │ ├── prio_queue.h │ ├── share_hdr │ │ └── vbus_api.h │ ├── vbus.c │ ├── vbus.h │ ├── vbus_chnx.c │ ├── watermark_queue.c │ └── watermark_queue.h └── vmm │ ├── SConscript │ ├── linux_patch-v3.8 │ ├── 0001-RTT-VMM-implement-dual-system-running-on-realview-pb.patch │ └── 0002-arm-gic-correct-the-cpu-map-on-gic_raise_softirq-for.patch │ ├── vmm.c │ ├── vmm.h │ ├── vmm_context.c │ ├── vmm_context.h │ ├── vmm_iomap.c │ └── vmm_vector.c ├── documentation ├── Doxyfile ├── coding_style_cn.md ├── coding_style_en.txt ├── doxygen │ ├── Kernel_Object.png │ ├── System_Arch.png │ ├── Thread_Scheduler.png │ ├── basicdef.h │ ├── dfs.png │ ├── filesystem.h │ ├── finsh.h │ ├── finsh.png │ ├── hardware.h │ ├── kernel.h │ ├── mainpage.h │ ├── module.h │ ├── rtthread_logo.png │ └── systeminit.h ├── figures │ ├── architecture.png │ ├── architecturezh.png │ ├── env.png │ ├── logo.png │ ├── qrcode.jpg │ ├── studio.gif │ └── studiozh.gif ├── roadmap-1.2.0.md └── roadmap-2.1.0.md ├── examples ├── file │ ├── listdir.c │ ├── readspeed.c │ ├── readwrite.c │ ├── seekdir.c │ └── writespeed.c ├── kernel │ ├── SConscript │ ├── cpuusage.c │ ├── event_simple.c │ ├── heap_malloc.c │ ├── heap_realloc.c │ ├── mbox_send_wait.c │ ├── mbox_simple.c │ ├── memp_simple.c │ ├── messageq_simple.c │ ├── mutex_priority.c │ ├── mutex_simple.c │ ├── semaphore_buffer_worker.c │ ├── semaphore_dynamic.c │ ├── semaphore_priority.c │ ├── semaphore_producer_consumer.c │ ├── semaphore_static.c │ ├── tc_comm.c │ ├── tc_comm.h │ ├── tc_sample.c │ ├── thread_delay.c │ ├── thread_delete.c │ ├── thread_detach.c │ ├── thread_dynamic.c │ ├── thread_dynamic_simple.c │ ├── thread_priority.c │ ├── thread_resume.c │ ├── thread_same_priority.c │ ├── thread_static.c │ ├── thread_static_simple.c │ ├── thread_suspend.c │ ├── thread_yield.c │ ├── timer_control.c │ ├── timer_dynamic.c │ ├── timer_static.c │ ├── timer_stop_self.c │ └── timer_timeout.c ├── libc │ ├── SConscript │ ├── dirent.c │ ├── env.c │ ├── ex1.c │ ├── ex2.c │ ├── ex3.c │ ├── ex4.c │ ├── ex5.c │ ├── ex6.c │ ├── ex7.c │ ├── file.c │ ├── memory.c │ ├── mq.c │ ├── printf.c │ ├── rand.c │ ├── sem.c │ ├── termios_test.c │ └── time.c ├── network │ ├── chargen.c │ ├── tcp_client.py │ ├── tcp_server.py │ ├── tcpclient.c │ ├── tcpsendpacket.c │ ├── tcpserver.c │ ├── udpclient.c │ └── udpserver.c ├── pm │ ├── timer_app.c │ └── wakeup_app.c ├── rt-link │ ├── rtlink_dev_example.c │ └── rtlink_example.c ├── test │ ├── device_test.c │ ├── dhry.h │ ├── dhry_1.c │ ├── dhry_2.c │ ├── fs_test.c │ ├── hwtimer_test.c │ ├── mem_test.c │ ├── net_test.c │ ├── rbb_test.c │ └── rtc_test.c ├── ulog │ └── ulog_example.c ├── utest │ ├── README.md │ ├── configs │ │ ├── kernel │ │ │ ├── ipc.conf │ │ │ ├── irq.conf │ │ │ ├── mem.conf │ │ │ ├── thread.conf │ │ │ └── timer.conf │ │ └── utest_self │ │ │ └── self.conf │ └── testcases │ │ ├── Kconfig │ │ ├── SConscript │ │ ├── drivers │ │ ├── SConscript │ │ └── serial_v2 │ │ │ ├── Kconfig │ │ │ ├── README.md │ │ │ ├── SConscript │ │ │ ├── uart_rxb_txb.c │ │ │ ├── uart_rxb_txnb.c │ │ │ ├── uart_rxnb_txb.c │ │ │ └── uart_rxnb_txnb.c │ │ ├── kernel │ │ ├── Kconfig │ │ ├── SConscript │ │ ├── event_tc.c │ │ ├── irq_tc.c │ │ ├── mailbox_tc.c │ │ ├── mem_tc.c │ │ ├── memheap_tc.c │ │ ├── messagequeue_tc.c │ │ ├── mutex_tc.c │ │ ├── semaphore_tc.c │ │ ├── signal_tc.c │ │ ├── slab_tc.c │ │ ├── thread_tc.c │ │ └── timer_tc.c │ │ └── utest │ │ ├── Kconfig │ │ ├── SConscript │ │ └── pass_tc.c ├── var_export │ └── var_export_example.c └── ymodem │ ├── echo.c │ ├── null.c │ └── tofile.c ├── include ├── rtdbg.h ├── rtdebug.h ├── rtdef.h ├── rthw.h ├── rtm.h ├── rtservice.h └── rtthread.h ├── libcpu ├── Kconfig ├── SConscript └── risc-v │ ├── SConscript │ ├── c906 │ ├── SConscript │ ├── asm │ │ ├── sbiasm.h │ │ └── sbidef.h │ ├── cache.c │ ├── cache.h │ ├── clint.c │ ├── clint.h │ ├── context_gcc.S │ ├── cpuport.c │ ├── cpuport.h │ ├── encoding.h │ ├── interrupt.c │ ├── interrupt_gcc.S │ ├── io.h │ ├── mmu.c │ ├── mmu.h │ ├── page.c │ ├── page.h │ ├── plic.c │ ├── plic.h │ ├── riscv.h │ ├── riscv_io.h │ ├── riscv_mmu.c │ ├── riscv_mmu.h │ ├── rt_interrupt.h │ ├── sbi.c │ ├── sbi.h │ ├── stack.h │ ├── stackframe.h │ ├── startup_gcc.S │ ├── symbol_analysis.c │ ├── symbol_analysis.h │ ├── syscall_c.c │ ├── tick.c │ ├── tick.h │ └── trap.c │ └── common │ ├── SConscript │ ├── context_gcc.S │ ├── cpuport.c │ ├── cpuport.h │ ├── riscv-ops.h │ └── riscv-plic.h ├── src ├── Kconfig ├── SConscript ├── clock.c ├── components.c ├── cpu.c ├── device.c ├── idle.c ├── ipc.c ├── irq.c ├── kservice.c ├── mem.c ├── memheap.c ├── mempool.c ├── object.c ├── scheduler.c ├── signal.c ├── slab.c ├── thread.c └── timer.c └── tools ├── .ignore_format.yml ├── WCS.py ├── __pycache__ ├── building.cpython-37.pyc ├── gcc.cpython-37.pyc ├── menuconfig.cpython-37.pyc ├── mkdist.cpython-37.pyc └── utils.cpython-37.pyc ├── as.sh ├── auto-ci.py ├── buildbot.py ├── building.py ├── cdk.py ├── clang-analyze.py ├── cmake.py ├── codeblocks.py ├── codelite.py ├── codelite_template.project ├── codelite_template.workspace ├── cscope.py ├── defconfig.py ├── eclipse.py ├── file_check.py ├── gcc.py ├── genconf.py ├── iar.py ├── kconfig-frontends ├── .sconsign.dblite ├── .version ├── AUTHORS ├── COPYING ├── INSTALL ├── Makefile.am ├── Makefile.in ├── README ├── SConstruct ├── aclocal.m4 ├── configure ├── configure.ac ├── docs │ ├── kconfig-language.txt │ └── kconfig.txt ├── frontends │ ├── conf │ │ └── conf.c │ ├── gconf │ │ ├── gconf.c │ │ ├── gconf.c.patch │ │ └── gconf.glade │ ├── kconfig.in │ ├── mconf │ │ └── mconf.c │ ├── nconf │ │ ├── nconf.c │ │ ├── nconf.gui.c │ │ └── nconf.h │ └── qconf │ │ ├── qconf.cc │ │ ├── qconf.cc.patch │ │ └── qconf.h ├── kconfig-mconf ├── libs │ ├── images │ │ └── images.c_orig │ ├── lxdialog │ │ ├── checklist.c │ │ ├── dialog.h │ │ ├── inputbox.c │ │ ├── menubox.c │ │ ├── textbox.c │ │ ├── util.c │ │ └── yesno.c │ └── parser │ │ ├── confdata.c │ │ ├── expr.c │ │ ├── expr.h │ │ ├── hconf.c │ │ ├── hconf.gperf │ │ ├── hconf.gperf.patch │ │ ├── kconfig-parser.pc.in │ │ ├── lconf.c │ │ ├── lconf.l │ │ ├── list.h │ │ ├── lkc.h │ │ ├── lkc_proto.h │ │ ├── menu.c │ │ ├── symbol.c │ │ ├── util.c │ │ ├── yconf.c │ │ ├── yconf.y │ │ └── yconf.y.patch ├── scripts │ ├── .autostuff │ │ ├── config.h.in │ │ ├── m4 │ │ │ ├── libtool.m4 │ │ │ ├── ltoptions.m4 │ │ │ ├── ltsugar.m4 │ │ │ ├── ltversion.m4 │ │ │ └── lt~obsolete.m4 │ │ └── scripts │ │ │ ├── ar-lib │ │ │ ├── compile │ │ │ ├── config.guess │ │ │ ├── config.sub │ │ │ ├── depcomp │ │ │ ├── install-sh │ │ │ ├── ltmain.sh │ │ │ ├── missing │ │ │ └── ylwrap │ ├── ksync.list │ ├── ksync.sh │ └── version.sh └── utils │ ├── gettext.c │ ├── kconfig-diff │ ├── kconfig-merge │ ├── kconfig-tweak.in │ └── kconfig-tweak.in.patch ├── kconfiglib.py ├── keil.py ├── makefile.py ├── menuconfig.py ├── mkdist.py ├── mkromfs.py ├── package.py ├── pyguiconfig.py ├── rt_studio.py ├── rtthread.mk ├── sconsui.py ├── ses.py ├── template.cbp ├── ua.py ├── utils.py ├── vs.py ├── vs2012.py ├── vsc.py ├── win32spawn.py └── wizard.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "cpuport.h": "c", 4 | "rtconfig.h": "c" 5 | } 6 | } -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Kernel Design & Implementation 2 | - Bernard Xiong 3 | 4 | LwIP 1.3.0/1.3.1/1.3.2/1.4.0 5 | - Porting 6 | Qiu Yi 7 | Mbbill 8 | - Testing 9 | Bernard Xiong 10 | 11 | Filesystem 12 | - Porting and Add Virtual Filesystem 13 | - Testing 14 | Qiu Yi 15 | prife 16 | 17 | RTGUI 18 | - Design and Implemenation 19 | Bernard Xiong 20 | Grissiom 21 | 22 | BSP 23 | Bernard Xiong 24 | - ATMEL AT91SAM7S64 & AT91SAM7X256 Porting 25 | - STM32 Porting 26 | - S3C4510 Porting 27 | 28 | Mbbill 29 | - ATMEL AT91SAM7X256 30 | 31 | Xulong Cao 32 | - QEMU/x86 33 | 34 | Aozima 35 | - LPC 2148 Porting 36 | - STM32 Porting 37 | 38 | Jing Lee 39 | - LPC 2478 Porting 40 | 41 | Qiu Yi 42 | - S3C2410 & S3C2440 Porting 43 | - TI LM3S 44 | 45 | others... 46 | -------------------------------------------------------------------------------- /Kconfig: -------------------------------------------------------------------------------- 1 | source "$RTT_DIR/src/Kconfig" 2 | source "$RTT_DIR/libcpu/Kconfig" 3 | source "$RTT_DIR/components/Kconfig" 4 | source "$RTT_DIR/examples/utest/testcases/Kconfig" 5 | -------------------------------------------------------------------------------- /bsp/d1-nezha/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | rtthread.bin 3 | rtthread.elf 4 | *.map 5 | build/ 6 | .sconsign.dblite 7 | cconfig.h 8 | .vscode/ 9 | rtconfig.pyc 10 | -------------------------------------------------------------------------------- /bsp/d1-nezha/Kconfig: -------------------------------------------------------------------------------- 1 | mainmenu "RT-Thread Project Configuration" 2 | 3 | config BSP_DIR 4 | string 5 | option env="BSP_ROOT" 6 | default "." 7 | 8 | config RTT_DIR 9 | string 10 | option env="RTT_ROOT" 11 | default "../.." 12 | 13 | config PKGS_DIR 14 | string 15 | option env="PKGS_ROOT" 16 | default "packages" 17 | 18 | source "$RTT_DIR/Kconfig" 19 | source "$PKGS_DIR/Kconfig" 20 | 21 | config BOARD_allwinnerd1 22 | bool 23 | select ARCH_RISCV64 24 | select RT_USING_COMPONENTS_INIT 25 | select RT_USING_USER_MAIN 26 | select RT_USING_CACHE 27 | select ARCH_MM_MMU 28 | default y 29 | 30 | config ENABLE_FPU 31 | bool "Enable FPU" 32 | default n 33 | 34 | config RT_USING_USERSPACE_32BIT_LIMIT 35 | bool "Enable userspace 32bit limit" 36 | default n 37 | 38 | source "drivers/Kconfig" 39 | source "libraries/Kconfig" 40 | 41 | config __STACKSIZE__ 42 | int "stack size for interrupt" 43 | default 4096 44 | -------------------------------------------------------------------------------- /bsp/d1-nezha/README.md: -------------------------------------------------------------------------------- 1 | # RT-Thread全志D1移植 2 | -------------------------------------------------------------------------------- /bsp/d1-nezha/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | objs = [] 7 | list = os.listdir(cwd) 8 | 9 | for d in list: 10 | path = os.path.join(cwd, d) 11 | if os.path.isfile(os.path.join(path, 'SConscript')): 12 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 13 | 14 | Return('objs') 15 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | 7 | group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) 8 | 9 | objs = [group] 10 | 11 | list = os.listdir(cwd) 12 | 13 | for item in list: 14 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 15 | objs = objs + SConscript(os.path.join(item, 'SConscript')) 16 | 17 | Return('objs') 18 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/lvgl/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | import os 3 | 4 | cwd = GetCurrentDir() 5 | group = [] 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | list = os.listdir(cwd) 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | group = group + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | group += DefineGroup('LVGL-port', src, depend = ['PKG_USING_LVGL'], CPPPATH = CPPPATH) 16 | 17 | Return('group') 18 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/lvgl/lv_conf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-10-18 Meco Man First version 9 | */ 10 | 11 | #ifndef LV_CONF_H 12 | #define LV_CONF_H 13 | 14 | #define LV_USE_DEMO_WIDGETS 1 15 | #define LV_USE_PERF_MONITOR 1 16 | #define LV_COLOR_DEPTH 32 17 | 18 | /* music player demo */ 19 | #include 20 | 21 | #define LV_DISP_DEF_REFR_PERIOD 10 22 | #define LV_HOR_RES_MAX 800 23 | #define LV_VER_RES_MAX 480 24 | #define LV_USE_DEMO_RTT_MUSIC 1 25 | #define LV_DEMO_RTT_MUSIC_AUTO_PLAY 1 26 | #define LV_FONT_MONTSERRAT_12 1 27 | #define LV_FONT_MONTSERRAT_16 1 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/lvgl/lv_demo_widgets.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_widgets.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_WIDGETS_H 7 | #define LV_DEMO_WIDGETS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_demo_widgets(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /* extern "C" */ 36 | #endif 37 | 38 | #endif /*LV_DEMO_WIDGETS_H*/ 39 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/lvgl/lv_port_disp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-10-18 Meco Man The first version 9 | */ 10 | #ifndef LV_PORT_DISP_H 11 | #define LV_PORT_DISP_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | void lv_port_disp_init(void); 18 | 19 | #ifdef __cplusplus 20 | } /*extern "C"*/ 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/lvgl/lv_port_indev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-10-18 Meco Man The first version 9 | */ 10 | #ifndef LV_PORT_INDEV_H 11 | #define LV_PORT_INDEV_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | void lv_port_indev_init(void); 18 | 19 | #ifdef __cplusplus 20 | } /*extern "C"*/ 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | int main(void) 18 | { 19 | printf("Hello RISC-V!\n"); 20 | 21 | int led_pin = rt_pin_get("PD.22"); 22 | rt_pin_mode(led_pin, PIN_MODE_OUTPUT); 23 | 24 | while(1) 25 | { 26 | rt_pin_write(led_pin, 1); 27 | rt_thread_mdelay(500); 28 | rt_pin_write(led_pin, 0); 29 | rt_thread_mdelay(500); 30 | } 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/mnt.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef RT_USING_DFS 4 | #include 5 | #include 6 | 7 | int mnt_init(void) 8 | { 9 | if (dfs_mount(RT_NULL, "/", "rom", 0, &romfs_root) != 0) 10 | { 11 | rt_kprintf("Dir / mount failed!\n"); 12 | return -1; 13 | } 14 | 15 | rt_kprintf("file system initialization done!\n"); 16 | return 0; 17 | } 18 | INIT_ENV_EXPORT(mnt_init); 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/test/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | 7 | group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) 8 | 9 | Return('group') -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/test/auto_rvv.c.bak: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | vint16m1_t test_vaddvv_int16xm1 (vint16m1_t a, vint16m1_t b) 10 | { 11 | return a + b; 12 | } 13 | 14 | void test_auto_rvv() 15 | { 16 | vint16m1_t aa = {1}; 17 | vint16m1_t bb = {1}; 18 | 19 | test_vaddvv_int16xm1(aa, bb); 20 | } 21 | MSH_CMD_EXPORT(test_auto_rvv, test auto rvv); -------------------------------------------------------------------------------- /bsp/d1-nezha/applications/test/test_thead.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | unsigned long test_addsl(unsigned long b,unsigned long c) 6 | { 7 | unsigned long a; 8 | a = b + (c << 9); 9 | return a; 10 | } 11 | 12 | void test_thead_custom(void) 13 | { 14 | unsigned long test1 = 5; 15 | unsigned long test2 = 6; 16 | unsigned long test3 = 0; 17 | test3 = test_addsl(test1, test2); 18 | rt_kprintf("aa is %d\n", test3); 19 | } 20 | MSH_CMD_EXPORT(test_thead_custom, test thead custom); -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/Kconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | menu "General Purpose UARTs" 4 | 5 | menuconfig BSP_USING_UART1 6 | bool "Enable UART1" 7 | default n 8 | if BSP_USING_UART1 9 | config BSP_UART1_TXD_PIN 10 | int "uart1 TXD pin number" 11 | default 20 12 | config BSP_UART1_RXD_PIN 13 | int "uart1 RXD pin number" 14 | default 21 15 | endif 16 | 17 | endmenu 18 | 19 | -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) 10 | 11 | objs = [group] 12 | 13 | list = os.listdir(cwd) 14 | 15 | for item in list: 16 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 17 | objs = objs + SConscript(os.path.join(item, 'SConscript')) 18 | 19 | Return('objs') 20 | -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/board.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-01-30 lizhirui first version 9 | */ 10 | 11 | #ifndef BOARD_H__ 12 | #define BOARD_H__ 13 | 14 | #include 15 | #include "common.h" 16 | 17 | extern unsigned int __bss_start; 18 | extern unsigned int __bss_end; 19 | 20 | #define RT_HW_HEAP_BEGIN ((void *)&__bss_end) 21 | #define RT_HW_HEAP_END ((void *)(((rt_size_t)RT_HW_HEAP_BEGIN) + 50 * 1024 * 1024)) 22 | #define RT_HW_PAGE_START RT_HW_HEAP_END 23 | #define RT_HW_PAGE_END ((void *)(((rt_size_t)RT_HW_PAGE_START) + 50 * 1024 * 1024)) 24 | 25 | void rt_hw_board_init(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H__ 2 | #define COMMON_H__ 3 | 4 | #include "rtthread.h" 5 | 6 | rt_inline rt_uint32_t read32(void *addr) 7 | { 8 | return (*((volatile unsigned int *)(addr))); 9 | } 10 | 11 | rt_inline void write32(void *addr, rt_uint32_t value) 12 | { 13 | (*((volatile unsigned int *)(addr))) = value; 14 | } 15 | 16 | rt_inline uint64_t counter(void) 17 | { 18 | uint64_t cnt; 19 | __asm__ __volatile__("csrr %0, time\n" : "=r"(cnt) :: "memory"); 20 | return cnt; 21 | } 22 | 23 | rt_inline void sdelay(unsigned long us) 24 | { 25 | uint64_t t1 = counter(); 26 | uint64_t t2 = t1 + us * 24; 27 | do { 28 | t1 = counter(); 29 | } while(t2 >= t1); 30 | } 31 | 32 | #endif -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/drv_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef __DRV_I2C_H__ 2 | #define __DRV_I2C_H__ 3 | 4 | #define TWI0_ADDR_BASE (0x02502000) 5 | #define TWI1_ADDR_BASE (0x02502400) 6 | #define TWI2_ADDR_BASE (0x02502800) 7 | #define TWI3_ADDR_BASE (0x02502C00) 8 | 9 | #define TWI_ADDR_OFFSET (0x0000) 10 | #define TWI_XADDR_OFFSET (0x0004) 11 | #define TWI_DATA_OFFSET (0x0008) 12 | #define TWI_CNTR_OFFSET (0x000c) 13 | #define TWI_STAT_OFFSET (0x0010) 14 | #define TWI_CCR_OFFSET (0x0014) 15 | #define TWI_SRST_OFFSET (0x0018) 16 | #define TWI_EFR_OFFSET (0x001c) 17 | #define TWI_LCR_OFFSET (0x0020) 18 | 19 | #define TWI_DRV_CTRL_OFFSET (0x0200) 20 | #define TWI_DRV_CFG_OFFSET (0x0204) 21 | #define TWI_DRV_SLV_OFFSET (0x0208) 22 | #define TWI_DRV_FMT_OFFSET (0x020C) 23 | #define TWI_DRV_BUS_CTRL (0x0210) 24 | #define TWI_DRV_INT_CTRL (0x0214) 25 | #define TWI_DRV_DMA_CFG (0x0218) 26 | #define TWI_DRV_FIFO_CON (0x021C) 27 | #define TWI_DRV_SEND_FIFO_ACC (0x0300) 28 | #define TWI_DRV_RECV_FIFO_ACC (0x0304) 29 | 30 | #endif -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/drv_watchdog.h: -------------------------------------------------------------------------------- 1 | #ifndef __DRV_WDT_H__ 2 | #define __DRV_WDT_H__ 3 | 4 | #define KEY_FIELD (0x16AA) 5 | #define WDOG_KEY_FIELD (0xA57) 6 | 7 | //init watchdog 8 | #define WDOG_IRQ_EN_REG (0x020500A0) 9 | #define WDOG_IRQ_STA_REG (0x020500A4) 10 | #define WDOG_SOFT_RST_REG (0x020500A8) 11 | #define WDOG_CTRL_REG (0x020500B0) 12 | #define WDOG_CFG_REG (0x020500B4) 13 | #define WDOG_MODE_REG (0x020500B8) 14 | #define WDOG_OUTPUT_CFG_REG (0x020500BC) 15 | 16 | #define IRQ_WATCHDOG_NUM (79) 17 | #endif -------------------------------------------------------------------------------- /bsp/d1-nezha/drivers/lcd/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | 7 | group = DefineGroup('lcd', src, depend = [''], CPPPATH = CPPPATH) 8 | 9 | Return('group') 10 | -------------------------------------------------------------------------------- /bsp/d1-nezha/generateimg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkimage -A riscv -O linux -T kernel -C none -a 0x45000000 -e 0x45000000 -d rtthread.bin rtthread.img -------------------------------------------------------------------------------- /bsp/d1-nezha/libraries/Kconfig: -------------------------------------------------------------------------------- 1 | menuconfig RT_USING_SUNXI_HAL 2 | bool "HAL library from sunxi" 3 | default n 4 | -------------------------------------------------------------------------------- /bsp/d1-nezha/libraries/README.md: -------------------------------------------------------------------------------- 1 | # allwinner-libraries 2 | 3 | 针对全志芯片的外设驱动库 -------------------------------------------------------------------------------- /bsp/d1-nezha/libraries/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | if not GetDepend('RT_USING_SUNXI_HAL'): 11 | Return('objs') 12 | 13 | for d in list: 14 | path = os.path.join(cwd, d) 15 | if os.path.isfile(os.path.join(path, 'SConscript')): 16 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 17 | 18 | Return('objs') 19 | -------------------------------------------------------------------------------- /bsp/d1-nezha/link_stacksize.lds: -------------------------------------------------------------------------------- 1 | __STACKSIZE__ = 16384; -------------------------------------------------------------------------------- /bsp/d1-nezha/rtthread.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/bsp/d1-nezha/rtthread.img -------------------------------------------------------------------------------- /bsp/d1-nezha/sdcard.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%1" EQU "" ( 4 | echo Please input you sdcard volumn! sucn as "sdcard.bat G" 5 | ) else ( 6 | echo copy rtthread.bin to volumn:%1 7 | copy rtthread.bin %1: 8 | ) 9 | 10 | @echo on 11 | -------------------------------------------------------------------------------- /components/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | Import('remove_components') 4 | from building import * 5 | 6 | objs = [] 7 | cwd = GetCurrentDir() 8 | list = os.listdir(cwd) 9 | 10 | for item in list: 11 | if item in remove_components: 12 | continue 13 | 14 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 15 | objs = objs + SConscript(os.path.join(item, 'SConscript')) 16 | 17 | Return('objs') 18 | -------------------------------------------------------------------------------- /components/cplusplus/Kconfig: -------------------------------------------------------------------------------- 1 | menu "C++ features" 2 | 3 | config RT_USING_CPLUSPLUS 4 | bool "Support C++ features" 5 | default n 6 | 7 | if RT_USING_CPLUSPLUS 8 | 9 | config RT_USING_CPLUSPLUS11 10 | bool "Enable c++11 threading feature support" 11 | default n 12 | select RT_USING_LIBC 13 | select RT_LIBC_USING_FILEIO 14 | select RT_USING_PTHREADS 15 | select RT_USING_RTC 16 | 17 | endif 18 | 19 | endmenu 20 | -------------------------------------------------------------------------------- /components/cplusplus/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | Import('rtconfig') 5 | 6 | cwd = GetCurrentDir() 7 | src = Glob('*.cpp') + Glob('*.c') 8 | 9 | if GetDepend('RT_USING_CPLUSPLUS11'): 10 | src += Glob('cpp11/*.cpp') + Glob('cpp11/*.c') 11 | 12 | CPPPATH = [cwd] 13 | 14 | if rtconfig.PLATFORM == 'armclang' and GetDepend('RT_USING_CPLUSPLUS11'): 15 | src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c') 16 | CPPPATH += [cwd + '/cpp11/armclang'] 17 | elif rtconfig.PLATFORM == 'gcc' and GetDepend('RT_USING_CPLUSPLUS11'): 18 | src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c') 19 | CPPPATH += [cwd + '/cpp11/gcc'] 20 | 21 | group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH) 22 | 23 | Return('group') -------------------------------------------------------------------------------- /components/cplusplus/cpp11/armclang/clock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-04-27 flybreak the first version. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | extern "C" int __ARM_TPL_clock_realtime(__ARM_TPL_timespec_t* __ts) 16 | { 17 | unsigned int t = std::time(nullptr); 18 | __ts->tv_sec = t; 19 | __ts->tv_nsec = 0; 20 | return 0; 21 | } 22 | 23 | extern "C" int __ARM_TPL_clock_monotonic(__ARM_TPL_timespec_t* __ts) 24 | { 25 | unsigned int t = rt_tick_get(); 26 | __ts->tv_sec = t / RT_TICK_PER_SECOND; 27 | __ts->tv_nsec = (t %RT_TICK_PER_SECOND) * NANOSECOND_PER_TICK ; 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /components/cplusplus/cpp11/armclang/miscellaneous.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-04-27 flybreak the first version. 9 | */ 10 | 11 | #include 12 | 13 | extern "C" int __ARM_TPL_execute_once(__ARM_TPL_exec_once_flag *__flag, 14 | void (*__init_routine)(void)) 15 | { 16 | if (*__flag == 0) 17 | { 18 | __init_routine(); 19 | *__flag = 1; 20 | } 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /components/cplusplus/cpp11/figures/Snipaste_2021-09-02_16-00-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/cplusplus/cpp11/figures/Snipaste_2021-09-02_16-00-09.png -------------------------------------------------------------------------------- /components/cplusplus/cpp11/gcc/condition_variable.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-04-27 flybreak the first version. 9 | */ 10 | 11 | #include "condition_variable" 12 | 13 | namespace std 14 | { 15 | void condition_variable::wait(unique_lock& lock) 16 | { 17 | int err = pthread_cond_wait(&_m_cond, lock.mutex()->native_handle()); 18 | 19 | if (err) 20 | { 21 | throw_system_error(err, "condition_variable::wait: failed to wait on a condition"); 22 | } 23 | } 24 | 25 | void notify_all_at_thread_exit(condition_variable& cond, unique_lock lk) 26 | { 27 | // TLS currently not available 28 | mutex* mut = lk.release(); 29 | mut->unlock(); 30 | cond.notify_all(); 31 | } 32 | 33 | 34 | } // namespace std 35 | -------------------------------------------------------------------------------- /components/cplusplus/cpp11/gcc/utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-04-27 flybreak the first version. 9 | */ 10 | 11 | #include "__utils.h" 12 | #include 13 | 14 | tick_clock::time_point tick_clock::now() 15 | { 16 | tick_clock::rep cur_tk = clock(); 17 | tick_clock::duration cur_time(cur_tk); 18 | 19 | return tick_clock::time_point(cur_time); 20 | } 21 | 22 | real_time_clock::time_point real_time_clock::now() noexcept 23 | { 24 | timespec tp; 25 | clock_gettime(CLOCK_REALTIME, &tp); 26 | 27 | return time_point(duration(std::chrono::seconds(tp.tv_sec)) 28 | + std::chrono::nanoseconds(tp.tv_nsec)); 29 | } 30 | -------------------------------------------------------------------------------- /components/cplusplus/cpp11/thread_local_impl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-04-27 flybreak the first version. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | typedef void (*destructor) (void *); 15 | 16 | extern "C" 17 | int __cxa_thread_atexit_impl(destructor dtor, void* obj, void* dso_symbol) 18 | { 19 | pthread_key_t key_tmp; 20 | if (pthread_key_create(&key_tmp, dtor) != 0) 21 | abort(); 22 | pthread_setspecific(key_tmp, obj); 23 | return 0; 24 | } 25 | 26 | #if defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/ 27 | #include 28 | 29 | extern"C" 30 | int __cxxabiv1::__cxa_thread_atexit(destructor dtor, void *obj, void *dso_handle) 31 | { 32 | return __cxa_thread_atexit_impl(dtor, obj, dso_handle); 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /components/cplusplus/cxx_Mutex.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #include "cxx_mutex.h" 11 | 12 | using namespace rtthread; 13 | 14 | Mutex::Mutex(const char *name) 15 | { 16 | rt_mutex_init(&mID, name, RT_IPC_FLAG_PRIO); 17 | } 18 | 19 | bool Mutex::lock(int32_t millisec) 20 | { 21 | rt_int32_t tick; 22 | 23 | if (millisec < 0) 24 | tick = -1; 25 | else 26 | tick = rt_tick_from_millisecond(millisec); 27 | 28 | return rt_mutex_take(&mID, tick) == RT_EOK; 29 | } 30 | 31 | bool Mutex::trylock() 32 | { 33 | return lock(0); 34 | } 35 | 36 | void Mutex::unlock() 37 | { 38 | rt_mutex_release(&mID); 39 | } 40 | 41 | Mutex::~Mutex() 42 | { 43 | rt_mutex_detach(&mID); 44 | } 45 | -------------------------------------------------------------------------------- /components/cplusplus/cxx_Semaphore.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #include "cxx_semaphore.h" 11 | 12 | using namespace rtthread; 13 | 14 | Semaphore::Semaphore(const char *name, int32_t count) 15 | { 16 | rt_sem_init(&mID, name, count, RT_IPC_FLAG_FIFO); 17 | } 18 | 19 | bool Semaphore::wait(int32_t millisec) 20 | { 21 | rt_int32_t tick; 22 | 23 | if (millisec < 0) 24 | tick = -1; 25 | else 26 | tick = rt_tick_from_millisecond(millisec); 27 | 28 | return rt_sem_take(&mID, tick) == RT_EOK; 29 | } 30 | 31 | void Semaphore::release(void) 32 | { 33 | rt_sem_release(&mID); 34 | } 35 | 36 | Semaphore::~Semaphore() 37 | { 38 | rt_sem_detach(&mID); 39 | } 40 | -------------------------------------------------------------------------------- /components/cplusplus/cxx_crt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-03-07 Bernard Add copyright header. 9 | */ 10 | 11 | #include 12 | #include "cxx_crt.h" 13 | 14 | void *operator new(size_t size) 15 | { 16 | return rt_malloc(size); 17 | } 18 | 19 | void *operator new[](size_t size) 20 | { 21 | return rt_malloc(size); 22 | } 23 | 24 | void operator delete(void *ptr) 25 | { 26 | rt_free(ptr); 27 | } 28 | 29 | void operator delete[](void *ptr) 30 | { 31 | return rt_free(ptr); 32 | } 33 | 34 | void __cxa_pure_virtual(void) 35 | { 36 | rt_kprintf("Illegal to call a pure virtual function.\n"); 37 | } 38 | -------------------------------------------------------------------------------- /components/cplusplus/cxx_crt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-03-07 Bernard Add copyright header. 9 | */ 10 | 11 | #ifndef CRT_H_ 12 | #define CRT_H_ 13 | 14 | #include 15 | #include 16 | 17 | void *operator new(size_t size); 18 | void *operator new[](size_t size); 19 | 20 | void operator delete(void * ptr); 21 | void operator delete[](void *ptr); 22 | 23 | extern "C" void __cxa_pure_virtual(void); 24 | extern "C" int cplusplus_system_init(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /components/cplusplus/cxx_lock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2016/10/1 Bernard The first version 9 | */ 10 | 11 | #pragma once 12 | 13 | #include 14 | #include 15 | 16 | namespace rtthread { 17 | 18 | class Lock 19 | { 20 | public: 21 | Lock(Mutex& mutex) : m(mutex) {m.lock();} 22 | ~Lock() {m.unlock();} 23 | 24 | protected: 25 | Mutex &m; 26 | }; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /components/dfs/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | import os 3 | 4 | # The set of source files associated with this SConscript file. 5 | src = Split(''' 6 | src/dfs.c 7 | src/dfs_file.c 8 | src/dfs_fs.c 9 | ''') 10 | cwd = GetCurrentDir() 11 | CPPPATH = [cwd + "/include"] 12 | 13 | if GetDepend('DFS_USING_POSIX'): 14 | src += ['src/dfs_posix.c'] 15 | 16 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH) 17 | 18 | if GetDepend('RT_USING_DFS'): 19 | # search in the file system implementation 20 | list = os.listdir(cwd) 21 | 22 | for item in list: 23 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 24 | group = group + SConscript(os.path.join(item, 'SConscript')) 25 | 26 | Return('group') 27 | -------------------------------------------------------------------------------- /components/dfs/filesystems/.ignore_format.yml: -------------------------------------------------------------------------------- 1 | # files format check exclude path, please follow the instructions below to modify; 2 | 3 | dir_path: 4 | - elmfat 5 | -------------------------------------------------------------------------------- /components/dfs/filesystems/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/dfs/filesystems/devfs/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_DEVFS'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/dfs/filesystems/devfs/devfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef __DEVICE_FS_H__ 11 | #define __DEVICE_FS_H__ 12 | 13 | #include 14 | 15 | int devfs_init(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /components/dfs/filesystems/elmfat/.ignore_format.yml: -------------------------------------------------------------------------------- 1 | # files format check exclude path, please follow the instructions below to modify; 2 | # If you need to exclude an entire folder, add the folder path in dir_path; 3 | # If you need to exclude a file, add the path to the file in file_path. 4 | 5 | file_path: 6 | - diskio.h 7 | - ff.c 8 | - ff.h 9 | - ffconf.h 10 | - ffunicode.c 11 | -------------------------------------------------------------------------------- /components/dfs/filesystems/elmfat/00readme.txt: -------------------------------------------------------------------------------- 1 | FatFs Module Source Files R0.14b 2 | 3 | 4 | FILES 5 | 6 | 00readme.txt This file. 7 | 00history.txt Revision history. 8 | ff.c FatFs module. 9 | ffconf.h Configuration file of FatFs module. 10 | ff.h Common include file for FatFs and application module. 11 | diskio.h Common include file for FatFs and disk I/O module. 12 | diskio.c An example of glue function to attach existing disk I/O module to FatFs. 13 | ffunicode.c Optional Unicode utility functions. 14 | ffsystem.c An example of optional O/S related functions. 15 | 16 | 17 | Low level disk I/O module is not included in this archive because the FatFs 18 | module is only a generic file system layer and it does not depend on any specific 19 | storage device. You need to provide a low level disk I/O module written to 20 | control the storage device that attached to the target system. 21 | 22 | -------------------------------------------------------------------------------- /components/dfs/filesystems/elmfat/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_ELMFAT'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/dfs/filesystems/elmfat/dfs_elm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-02-06 Bernard Add elm_init function declaration 9 | */ 10 | 11 | #ifndef __DFS_ELM_H__ 12 | #define __DFS_ELM_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | int elm_init(void); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /components/dfs/filesystems/nfs/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') + Glob('rpc/*.c') 7 | CPPPATH = [cwd] 8 | 9 | SrcRemove(src, ['rpc/auth_none.c']) 10 | 11 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_NFS'], CPPPATH = CPPPATH) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /components/dfs/filesystems/nfs/dfs_nfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef __NFS_H__ 11 | #define __NFS_H__ 12 | 13 | int nfs_init(void); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/dfs/filesystems/ramfs/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | 7 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_MEMHEAP', 'RT_USING_DFS_RAMFS'], CPPPATH = CPPPATH) 8 | 9 | Return('group') 10 | -------------------------------------------------------------------------------- /components/dfs/filesystems/ramfs/dfs_ramfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2013-04-15 Bernard the first version 9 | * 2013-05-05 Bernard remove CRC for ramfs persistence 10 | */ 11 | 12 | #ifndef __DFS_RAMFS_H__ 13 | #define __DFS_RAMFS_H__ 14 | 15 | #include 16 | #include 17 | 18 | #define RAMFS_NAME_MAX 32 19 | #define RAMFS_MAGIC 0x0A0A0A0A 20 | 21 | struct ramfs_dirent 22 | { 23 | rt_list_t list; 24 | struct dfs_ramfs *fs; /* file system ref */ 25 | 26 | char name[RAMFS_NAME_MAX]; /* dirent name */ 27 | rt_uint8_t *data; 28 | 29 | rt_size_t size; /* file size */ 30 | }; 31 | 32 | /** 33 | * DFS ramfs object 34 | */ 35 | struct dfs_ramfs 36 | { 37 | rt_uint32_t magic; 38 | 39 | struct rt_memheap memheap; 40 | struct ramfs_dirent root; 41 | }; 42 | 43 | int dfs_ramfs_init(void); 44 | struct dfs_ramfs *dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size); 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /components/dfs/filesystems/romfs/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | if GetDepend('DFS_ROMFS_ROOT'): 10 | # A new ROMFS root has been defined, we should remove the romfs.c 11 | SrcRemove(src, ['romfs.c']) 12 | 13 | group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS','RT_USING_DFS_ROMFS'], CPPPATH = CPPPATH) 14 | 15 | Return('group') 16 | -------------------------------------------------------------------------------- /components/dfs/filesystems/romfs/dfs_romfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2019/01/13 Bernard code cleanup 9 | */ 10 | 11 | #ifndef __DFS_ROMFS_H__ 12 | #define __DFS_ROMFS_H__ 13 | 14 | #include 15 | 16 | #define ROMFS_DIRENT_FILE 0x00 17 | #define ROMFS_DIRENT_DIR 0x01 18 | 19 | struct romfs_dirent 20 | { 21 | rt_uint32_t type; /* dirent type */ 22 | 23 | const char *name; /* dirent name */ 24 | const rt_uint8_t *data; /* file date ptr */ 25 | rt_size_t size; /* file size */ 26 | }; 27 | 28 | int dfs_romfs_init(void); 29 | extern const struct romfs_dirent romfs_root; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /components/dfs/filesystems/skeleton/skeleton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef __SKELETON_H__ 11 | #define __SKELETON_H__ 12 | 13 | #include 14 | 15 | int dfs_skt_init(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /components/dfs/include/dfs_posix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2009-05-27 Yi.qiu The first version. 9 | * 2010-07-18 Bernard add stat and statfs structure definitions. 10 | * 2011-05-16 Yi.qiu Change parameter name of rename, "new" is C++ key word. 11 | * 2017-12-27 Bernard Add fcntl API. 12 | * 2018-02-07 Bernard Change the 3rd parameter of open/fcntl/ioctl to '...' 13 | */ 14 | 15 | #ifndef __DFS_POSIX_H__ 16 | #define __DFS_POSIX_H__ 17 | 18 | #include 19 | #include 20 | #include /* rename() */ 21 | #include 22 | #include /* statfs() */ 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /components/dfs/include/dfs_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef DFS_PRIVATE_H__ 11 | #define DFS_PRIVATE_H__ 12 | 13 | #include 14 | 15 | #define DBG_TAG "DFS" 16 | #define DBG_LVL DBG_INFO 17 | #include 18 | 19 | #define NO_WORKING_DIR "system does not support working directory\n" 20 | 21 | /* extern variable */ 22 | extern const struct dfs_filesystem_ops *filesystem_operation_table[]; 23 | extern struct dfs_filesystem filesystem_table[]; 24 | extern const struct dfs_mount_tbl mount_table[]; 25 | 26 | extern char working_directory[]; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /components/drivers/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | objs = [] 7 | list = os.listdir(cwd) 8 | 9 | for d in list: 10 | path = os.path.join(cwd, d) 11 | if os.path.isfile(os.path.join(path, 'SConscript')): 12 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 13 | 14 | Return('objs') 15 | -------------------------------------------------------------------------------- /components/drivers/audio/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | 7 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_AUDIO'], CPPPATH = CPPPATH) 8 | 9 | Return('group') 10 | -------------------------------------------------------------------------------- /components/drivers/can/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_CAN'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/drivers/cputime/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | CPPPATH = [cwd + '/../include'] 5 | src = Split(''' 6 | cputime.c 7 | ''') 8 | 9 | if GetDepend('RT_USING_CPUTIME_CORTEXM'): 10 | src += ['cputime_cortexm.c'] 11 | 12 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_CPUTIME'], CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/drivers/hwcrypto/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | Import('rtconfig') 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | CPPPATH = [cwd, str(Dir('#'))] 7 | 8 | src = ['hwcrypto.c'] 9 | 10 | if (GetDepend(['RT_HWCRYPTO_USING_AES']) or 11 | GetDepend(['RT_HWCRYPTO_USING_DES']) or 12 | GetDepend(['RT_HWCRYPTO_USING_3DES']) or 13 | GetDepend(['RT_HWCRYPTO_USING_RC4'])): 14 | src += ['hw_symmetric.c'] 15 | if GetDepend(['RT_HWCRYPTO_USING_GCM']): 16 | src += ['hw_gcm.c'] 17 | 18 | if (GetDepend(['RT_HWCRYPTO_USING_MD5']) or 19 | GetDepend(['RT_HWCRYPTO_USING_SHA1']) or 20 | GetDepend(['RT_HWCRYPTO_USING_SHA2'])): 21 | src += ['hw_hash.c'] 22 | 23 | if GetDepend(['RT_HWCRYPTO_USING_RNG']): 24 | src += ['hw_rng.c'] 25 | 26 | if GetDepend(['RT_HWCRYPTO_USING_CRC']): 27 | src += ['hw_crc.c'] 28 | 29 | if GetDepend(['RT_HWCRYPTO_USING_BIGNUM']): 30 | src += ['hw_bignum.c'] 31 | 32 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_HWCRYPTO'], CPPPATH = CPPPATH) 33 | 34 | Return('group') 35 | -------------------------------------------------------------------------------- /components/drivers/hwtimer/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_HWTIMER'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/drivers/i2c/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(""" 6 | i2c_core.c 7 | i2c_dev.c 8 | """) 9 | 10 | if GetDepend('RT_USING_I2C_BITOPS'): 11 | src = src + ['i2c-bit-ops.c'] 12 | 13 | # The set of source files associated with this SConscript file. 14 | path = [cwd + '/../include'] 15 | 16 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_I2C'], CPPPATH = path) 17 | 18 | Return('group') 19 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/cputime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2017-12-23 Bernard first version 9 | */ 10 | 11 | #ifndef CPUTIME_H__ 12 | #define CPUTIME_H__ 13 | 14 | #include 15 | 16 | struct rt_clock_cputime_ops 17 | { 18 | float (*cputime_getres) (void); 19 | uint64_t (*cputime_gettime)(void); 20 | }; 21 | 22 | float clock_cpu_getres(void); 23 | uint64_t clock_cpu_gettime(void); 24 | 25 | uint32_t clock_cpu_microsecond(uint32_t cpu_tick); 26 | uint32_t clock_cpu_millisecond(uint32_t cpu_tick); 27 | 28 | int clock_cpu_setops(const struct rt_clock_cputime_ops *ops); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/crypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2019-05-17 tyx the first version 9 | */ 10 | 11 | #ifndef __CRYPTO_H__ 12 | #define __CRYPTO_H__ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/i2c-bit-ops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2012-04-25 weety first version 9 | */ 10 | 11 | #ifndef __I2C_BIT_OPS_H__ 12 | #define __I2C_BIT_OPS_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | struct rt_i2c_bit_ops 19 | { 20 | void *data; /* private data for lowlevel routines */ 21 | void (*set_sda)(void *data, rt_int32_t state); 22 | void (*set_scl)(void *data, rt_int32_t state); 23 | rt_int32_t (*get_sda)(void *data); 24 | rt_int32_t (*get_scl)(void *data); 25 | 26 | void (*udelay)(rt_uint32_t us); 27 | 28 | rt_uint32_t delay_us; /* scl and sda line delay */ 29 | rt_uint32_t timeout; /* in tick */ 30 | }; 31 | 32 | rt_err_t rt_i2c_bit_add_bus(struct rt_i2c_bus_device *bus, 33 | const char *bus_name); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/i2c_dev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2012-04-25 weety first version 9 | * 2021-04-20 RiceChen added bus clock command 10 | */ 11 | 12 | #ifndef __I2C_DEV_H__ 13 | #define __I2C_DEV_H__ 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define RT_I2C_DEV_CTRL_10BIT 0x20 22 | #define RT_I2C_DEV_CTRL_ADDR 0x21 23 | #define RT_I2C_DEV_CTRL_TIMEOUT 0x22 24 | #define RT_I2C_DEV_CTRL_RW 0x23 25 | #define RT_I2C_DEV_CTRL_CLK 0x24 26 | 27 | struct rt_i2c_priv_data 28 | { 29 | struct rt_i2c_msg *msgs; 30 | rt_size_t number; 31 | }; 32 | 33 | rt_err_t rt_i2c_bus_device_device_init(struct rt_i2c_bus_device *bus, 34 | const char *name); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/lptimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-10-11 zhangsz the first version 9 | */ 10 | 11 | #ifndef __LPTIMER_H__ 12 | #define __LPTIMER_H__ 13 | 14 | #include 15 | 16 | struct rt_lptimer 17 | { 18 | struct rt_timer timer; 19 | rt_list_t list; 20 | }; 21 | typedef struct rt_lptimer *rt_lptimer_t; 22 | 23 | void rt_lptimer_init(rt_lptimer_t timer, 24 | const char *name, 25 | void (*timeout)(void *parameter), 26 | void *parameter, 27 | rt_tick_t time, 28 | rt_uint8_t flag); 29 | 30 | rt_err_t rt_lptimer_detach(rt_lptimer_t timer); 31 | rt_err_t rt_lptimer_start(rt_lptimer_t timer); 32 | rt_err_t rt_lptimer_stop(rt_lptimer_t timer); 33 | 34 | rt_err_t rt_lptimer_control(rt_lptimer_t timer, int cmd, void *arg); 35 | 36 | rt_tick_t rt_lptimer_next_timeout_tick(void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/phy_mdio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2020-10-14 wangqiang the first version 9 | */ 10 | 11 | #ifndef __MDIO_H__ 12 | #define __MDIO_H__ 13 | 14 | #include 15 | 16 | #ifdef __cplusplus 17 | extern "C" 18 | { 19 | #endif 20 | 21 | 22 | struct rt_mdio_bus_ops 23 | { 24 | rt_bool_t (*init)(void *bus, rt_uint32_t src_clock_hz); 25 | rt_size_t (*read)(void *bus, rt_uint32_t addr, rt_uint32_t reg, void *data, rt_uint32_t size); 26 | rt_size_t (*write)(void *bus, rt_uint32_t addr, rt_uint32_t reg, void *data, rt_uint32_t size); 27 | rt_bool_t (*uninit)(void *bus); 28 | }; 29 | 30 | struct rt_mdio_bus 31 | { 32 | void *hw_obj; 33 | char *name; 34 | struct rt_mdio_bus_ops *ops; 35 | }; 36 | 37 | typedef struct rt_mdio_bus rt_mdio_t; 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/sd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2011-07-25 weety first version 9 | */ 10 | 11 | #ifndef __SD_H__ 12 | #define __SD_H__ 13 | 14 | #include 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | rt_err_t mmcsd_send_if_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr); 22 | rt_err_t mmcsd_send_app_op_cond(struct rt_mmcsd_host *host, rt_uint32_t ocr, rt_uint32_t *rocr); 23 | 24 | rt_err_t mmcsd_get_card_addr(struct rt_mmcsd_host *host, rt_uint32_t *rca); 25 | rt_int32_t mmcsd_get_scr(struct rt_mmcsd_card *card, rt_uint32_t *scr); 26 | 27 | rt_int32_t init_sd(struct rt_mmcsd_host *host, rt_uint32_t ocr); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /components/drivers/include/drivers/wlan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-09-15 tyx the first version 9 | */ 10 | 11 | #ifndef __WLAN_H__ 12 | #define __WLAN_H__ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /components/drivers/include/ipc/completion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | #ifndef COMPLETION_H_ 10 | #define COMPLETION_H_ 11 | 12 | #include 13 | 14 | /** 15 | * Completion 16 | */ 17 | 18 | struct rt_completion 19 | { 20 | rt_uint32_t flag; 21 | 22 | /* suspended list */ 23 | rt_list_t suspended_list; 24 | }; 25 | 26 | void rt_completion_init(struct rt_completion *completion); 27 | rt_err_t rt_completion_wait(struct rt_completion *completion, 28 | rt_int32_t timeout); 29 | void rt_completion_done(struct rt_completion *completion); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /components/drivers/include/ipc/pipe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | #ifndef PIPE_H__ 10 | #define PIPE_H__ 11 | 12 | /** 13 | * Pipe Device 14 | */ 15 | #include 16 | #include 17 | 18 | struct rt_pipe_device 19 | { 20 | struct rt_device parent; 21 | rt_bool_t is_named; 22 | 23 | /* ring buffer in pipe device */ 24 | struct rt_ringbuffer *fifo; 25 | rt_uint16_t bufsz; 26 | 27 | rt_uint8_t readers; 28 | rt_uint8_t writers; 29 | 30 | rt_wqueue_t reader_queue; 31 | rt_wqueue_t writer_queue; 32 | 33 | struct rt_mutex lock; 34 | }; 35 | typedef struct rt_pipe_device rt_pipe_t; 36 | 37 | rt_pipe_t *rt_pipe_create(const char *name, int bufsz); 38 | int rt_pipe_delete(const char *name); 39 | #endif /* PIPE_H__ */ 40 | -------------------------------------------------------------------------------- /components/drivers/include/ipc/poll.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2016-09-19 Heyuanjie The first version. 9 | * 2016-12-26 Bernard Update poll interface 10 | */ 11 | #ifndef IPC_POLL_H__ 12 | #define IPC_POLL_H__ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | struct rt_pollreq; 19 | typedef void (*poll_queue_proc)(rt_wqueue_t *, struct rt_pollreq *); 20 | 21 | typedef struct rt_pollreq 22 | { 23 | poll_queue_proc _proc; 24 | short _key; 25 | } rt_pollreq_t; 26 | 27 | rt_inline void rt_poll_add(rt_wqueue_t *wq, rt_pollreq_t *req) 28 | { 29 | if (req && req->_proc && wq) 30 | { 31 | req->_proc(wq, req); 32 | } 33 | } 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /components/drivers/misc/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = [] 5 | CPPPATH = [cwd + '/../include'] 6 | group = [] 7 | 8 | if GetDepend(['RT_USING_PIN']): 9 | src = src + ['pin.c'] 10 | 11 | if GetDepend(['RT_USING_ADC']): 12 | src = src + ['adc.c'] 13 | 14 | if GetDepend(['RT_USING_DAC']): 15 | src = src + ['dac.c'] 16 | 17 | if GetDepend(['RT_USING_PWM']): 18 | src = src + ['rt_drv_pwm.c'] 19 | 20 | if GetDepend(['RT_USING_PULSE_ENCODER']): 21 | src = src + ['pulse_encoder.c'] 22 | 23 | if GetDepend(['RT_USING_INPUT_CAPTURE']): 24 | src = src + ['rt_inputcapture.c'] 25 | 26 | if len(src): 27 | group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) 28 | 29 | Return('group') 30 | -------------------------------------------------------------------------------- /components/drivers/mtd/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = [] 5 | depend = [] 6 | 7 | CPPPATH = [cwd + '/../include'] 8 | group = [] 9 | 10 | if GetDepend(['RT_USING_MTD_NOR']): 11 | src += ['mtd_nor.c'] 12 | depend += ['RT_USING_MTD_NOR'] 13 | 14 | if GetDepend(['RT_USING_MTD_NAND']): 15 | src += ['mtd_nand.c'] 16 | depend += ['RT_USING_MTD_NAND'] 17 | 18 | if src: 19 | group = DefineGroup('DeviceDrivers', src, depend = depend, CPPPATH = CPPPATH) 20 | 21 | Return('group') 22 | -------------------------------------------------------------------------------- /components/drivers/phy/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_PHY'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/drivers/pm/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = [] 5 | CPPPATH = [cwd + '/../include'] 6 | group = [] 7 | 8 | if GetDepend(['RT_USING_PM']): 9 | src = src + ['pm.c'] 10 | src = src + ['lptimer.c'] 11 | 12 | if len(src): 13 | group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) 14 | 15 | Return('group') 16 | -------------------------------------------------------------------------------- /components/drivers/rtc/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = [] 5 | 6 | CPPPATH = [cwd + '/../include'] 7 | group = [] 8 | 9 | if GetDepend(['RT_USING_RTC']): 10 | src = src + ['rtc.c'] 11 | if GetDepend(['RT_USING_ALARM']): 12 | src = src + ['alarm.c'] 13 | if GetDepend(['RT_USING_SOFT_RTC']): 14 | src = src + ['soft_rtc.c'] 15 | 16 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_RTC'], CPPPATH = CPPPATH) 17 | 18 | Return('group') -------------------------------------------------------------------------------- /components/drivers/sdio/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(""" 6 | block_dev.c 7 | mmcsd_core.c 8 | sd.c 9 | sdio.c 10 | mmc.c 11 | """) 12 | 13 | # The set of source files associated with this SConscript file. 14 | path = [cwd + '/../include'] 15 | 16 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SDIO'], CPPPATH = path) 17 | 18 | Return('group') 19 | -------------------------------------------------------------------------------- /components/drivers/sensors/SConscript: -------------------------------------------------------------------------------- 1 | # SConscript for sensor framework 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = ['sensor.c'] 7 | CPPPATH = [cwd, cwd + '/../include'] 8 | 9 | if GetDepend('RT_USING_SENSOR_CMD'): 10 | src += ['sensor_cmd.c'] 11 | 12 | group = DefineGroup('Sensors', src, depend = ['RT_USING_SENSOR', 'RT_USING_DEVICE'], CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/drivers/sensors/sensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2019-01-31 flybreak first version 9 | */ 10 | 11 | 12 | #include 13 | #include 14 | 15 | -------------------------------------------------------------------------------- /components/drivers/serial/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | CPPPATH = [cwd + '/../include'] 5 | group = [] 6 | if GetDepend(['RT_USING_SERIAL']): 7 | if GetDepend(['RT_USING_SERIAL_V2']): 8 | src = Glob('serial_v2.c') 9 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SERIAL_V2'], CPPPATH = CPPPATH) 10 | else: 11 | src = Glob('serial.c') 12 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SERIAL'], CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/drivers/spi/device_driver_list.txt: -------------------------------------------------------------------------------- 1 | spi_wifi_rw009.c/spi_wifi_rw009.h 2 | RW009 3 | http://www.rt-thread.com/ 4 | 5 | enc28j60.c/enc28j60.h 6 | http://www.microchip.com/ 7 | 8 | spi_flash_sfud: Serial Flash Universal Driver 9 | https://github.com/armink/SFUD -------------------------------------------------------------------------------- /components/drivers/spi/spi_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2016/5/20 bernard the first version 9 | * 2020/1/7 redoc add include 10 | */ 11 | 12 | #ifndef SPI_FLASH_H__ 13 | #define SPI_FLASH_H__ 14 | 15 | #include 16 | 17 | struct spi_flash_device 18 | { 19 | struct rt_device flash_device; 20 | struct rt_device_blk_geometry geometry; 21 | struct rt_spi_device * rt_spi_device; 22 | struct rt_mutex lock; 23 | void * user_data; 24 | }; 25 | 26 | typedef struct spi_flash_device *rt_spi_flash_device_t; 27 | 28 | #ifdef RT_USING_MTD_NOR 29 | struct spi_flash_mtd 30 | { 31 | struct rt_mtd_nor_device mtd_device; 32 | struct rt_spi_device * rt_spi_device; 33 | struct rt_mutex lock; 34 | void * user_data; 35 | }; 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /components/drivers/src/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | 7 | if not GetDepend('RT_USING_HEAP'): 8 | SrcRemove(src, 'dataqueue.c') 9 | SrcRemove(src, 'pipe.c') 10 | 11 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_DEVICE_IPC'], CPPPATH = CPPPATH) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /components/drivers/touch/SConscript: -------------------------------------------------------------------------------- 1 | # SConscript for touch framework 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = ['touch.c'] 7 | CPPPATH = [cwd, cwd + '/../include'] 8 | 9 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_TOUCH', 'RT_USING_DEVICE'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/drivers/usb/SConscript: -------------------------------------------------------------------------------- 1 | # for module compiling 2 | import os 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | objs = [] 7 | list = os.listdir(cwd) 8 | 9 | for d in list: 10 | path = os.path.join(cwd, d) 11 | if os.path.isfile(os.path.join(path, 'SConscript')): 12 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 13 | Return('objs') 14 | -------------------------------------------------------------------------------- /components/drivers/usb/usbdevice/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(""" 6 | core/usbdevice_core.c 7 | core/usbdevice.c 8 | """) 9 | 10 | if GetDepend('RT_USB_DEVICE_CDC'): 11 | src += Glob('class/cdc_vcom.c') 12 | 13 | if GetDepend('RT_USB_DEVICE_HID'): 14 | src += Glob('class/hid.c') 15 | 16 | if GetDepend('RT_USB_DEVICE_MSTORAGE'): 17 | src += Glob('class/mstorage.c') 18 | 19 | if GetDepend('RT_USB_DEVICE_ECM'): 20 | src += Glob('class/ecm.c') 21 | 22 | if GetDepend('RT_USB_DEVICE_RNDIS'): 23 | src += Glob('class/rndis.c') 24 | 25 | if GetDepend('RT_USB_DEVICE_WINUSB'): 26 | src += Glob('class/winusb.c') 27 | 28 | if GetDepend('RT_USB_DEVICE_AUDIO_MIC'): 29 | src += Glob('class/audio_mic.c') 30 | 31 | if GetDepend('RT_USB_DEVICE_AUDIO_SPEAKER'): 32 | src += Glob('class/audio_speaker.c') 33 | 34 | CPPPATH = [cwd] 35 | 36 | group = DefineGroup('rt_usbd', src, depend = ['RT_USING_USB_DEVICE'], CPPPATH = CPPPATH) 37 | 38 | Return('group') 39 | -------------------------------------------------------------------------------- /components/drivers/usb/usbdevice/class/winusb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2017-11-16 ZYH first version 9 | */ 10 | #ifndef __WINUSB_H__ 11 | #define __WINUSB_H__ 12 | #include 13 | struct winusb_descriptor 14 | { 15 | #ifdef RT_USB_DEVICE_COMPOSITE 16 | struct uiad_descriptor iad_desc; 17 | #endif 18 | struct uinterface_descriptor intf_desc; 19 | struct uendpoint_descriptor ep_out_desc; 20 | struct uendpoint_descriptor ep_in_desc; 21 | }; 22 | typedef struct winusb_descriptor* winusb_desc_t; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /components/drivers/usb/usbhost/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(""" 6 | core/usbhost_core.c 7 | core/driver.c 8 | core/usbhost.c 9 | core/hub.c 10 | """) 11 | 12 | if GetDepend('RT_USBH_ADK'): 13 | src += Glob('class/adk.c') 14 | src += Glob('class/adkapp.c') 15 | 16 | if GetDepend('RT_USBH_MSTORAGE'): 17 | src += Glob('class/mass.c') 18 | src += Glob('class/udisk.c') 19 | 20 | if GetDepend('RT_USBH_HID'): 21 | src += Glob('class/hid.c') 22 | 23 | if GetDepend('RT_USBH_HID_MOUSE'): 24 | src += Glob('class/umouse.c') 25 | 26 | if GetDepend('RT_USBH_HID_KEYBOARD'): 27 | src += Glob('class/ukbd.c') 28 | 29 | CPPPATH = [cwd, cwd + '/class', cwd + '/core', \ 30 | cwd + '/include', cwd + '../../../include'] 31 | 32 | group = DefineGroup('rt_usbh', src, depend = ['RT_USING_USB_HOST'], CPPPATH = CPPPATH) 33 | 34 | Return('group') 35 | -------------------------------------------------------------------------------- /components/drivers/watchdog/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd + '/../include'] 6 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_WDT'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/drivers/wlan/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | CPPPATH = [cwd] 5 | 6 | src = Split(''' 7 | wlan_dev.c 8 | ''') 9 | 10 | if GetDepend(['RT_WLAN_MANAGE_ENABLE']): 11 | src += ['wlan_mgnt.c'] 12 | 13 | if GetDepend(['RT_WLAN_MSH_CMD_ENABLE']): 14 | src += ['wlan_cmd.c'] 15 | 16 | if GetDepend(['RT_WLAN_PROT_ENABLE']): 17 | src += ['wlan_prot.c'] 18 | 19 | if GetDepend(['RT_WLAN_PROT_LWIP_ENABLE']): 20 | src += ['wlan_lwip.c'] 21 | 22 | if GetDepend(['RT_WLAN_CFG_ENABLE']): 23 | src += ['wlan_cfg.c'] 24 | 25 | if GetDepend(['RT_WLAN_WORK_THREAD_ENABLE']): 26 | src += ['wlan_workqueue.c'] 27 | 28 | group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_WIFI'], CPPPATH = CPPPATH) 29 | 30 | Return('group') 31 | -------------------------------------------------------------------------------- /components/drivers/wlan/wlan_workqueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-08-19 tyx the first version 9 | */ 10 | 11 | #ifndef __WLAN_WORKQUEUE_H__ 12 | #define __WLAN_WORKQUEUE_H__ 13 | 14 | #include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | #ifndef RT_WLAN_WORKQUEUE_THREAD_NAME 21 | #define RT_WLAN_WORKQUEUE_THREAD_NAME ("wlan_job") 22 | #endif 23 | 24 | #ifndef RT_WLAN_WORKQUEUE_THREAD_SIZE 25 | #define RT_WLAN_WORKQUEUE_THREAD_SIZE (2048) 26 | #endif 27 | 28 | #ifndef RT_WLAN_WORKQUEUE_THREAD_PRIO 29 | #define RT_WLAN_WORKQUEUE_THREAD_PRIO (20) 30 | #endif 31 | 32 | int rt_wlan_workqueue_init(void); 33 | 34 | rt_err_t rt_wlan_workqueue_dowork(void (*func)(void *parameter), void *parameter); 35 | 36 | struct rt_workqueue *rt_wlan_get_workqueue(void); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /components/finsh/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Split(''' 5 | shell.c 6 | msh.c 7 | ''') 8 | 9 | if GetDepend('MSH_USING_BUILT_IN_COMMANDS'): 10 | src += ['cmd.c'] 11 | 12 | if GetDepend('DFS_USING_POSIX'): 13 | src += ['msh_file.c'] 14 | 15 | CPPPATH = [cwd] 16 | 17 | group = DefineGroup('Finsh', src, depend = ['RT_USING_FINSH'], CPPPATH = CPPPATH) 18 | 19 | Return('group') 20 | -------------------------------------------------------------------------------- /components/finsh/msh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2013-03-30 Bernard the first verion for FinSH 9 | */ 10 | 11 | #ifndef __M_SHELL__ 12 | #define __M_SHELL__ 13 | 14 | #include 15 | 16 | int msh_exec(char *cmd, rt_size_t length); 17 | void msh_auto_complete(char *prefix); 18 | 19 | int msh_exec_module(const char *cmd_line, int size); 20 | int msh_exec_script(const char *cmd_line, int size); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /components/legacy/README.md: -------------------------------------------------------------------------------- 1 | # RT-Thread Legacy 2 | 3 | -------------------------------------------------------------------------------- /components/legacy/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | import os 3 | 4 | src = Split(''' 5 | ipc/workqueue_legacy.c 6 | ''') 7 | 8 | cwd = GetCurrentDir() 9 | CPPPATH = [cwd] 10 | 11 | if GetDepend('RT_USING_DFS'): 12 | dfs_cwd = os.path.join(cwd,'dfs') 13 | CPPPATH += [dfs_cwd] 14 | 15 | group = DefineGroup('Legacy', src, depend = ['RT_USING_LEGACY'], CPPPATH = CPPPATH) 16 | 17 | list = os.listdir(cwd) 18 | for item in list: 19 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 20 | group = group + SConscript(os.path.join(item, 'SConscript')) 21 | 22 | Return('group') 23 | -------------------------------------------------------------------------------- /components/legacy/dfs/dfs_poll.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-14 Meco Man the first version 9 | */ 10 | 11 | #ifndef DFS_POLL_H__ 12 | #define DFS_POLL_H__ 13 | 14 | #include 15 | 16 | #endif /* DFS_POLL_H__ */ 17 | -------------------------------------------------------------------------------- /components/legacy/dfs/dfs_select.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-14 Meco Man the first version 9 | */ 10 | 11 | #ifndef DFS_SELECT_H__ 12 | #define DFS_SELECT_H__ 13 | 14 | #include 15 | 16 | #endif /* DFS_SELECT_H__ */ 17 | -------------------------------------------------------------------------------- /components/legacy/ipc/workqueue_legacy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-14 Meco Man the first version 9 | */ 10 | 11 | #include "workqueue_legacy.h" 12 | 13 | void rt_delayed_work_init(struct rt_delayed_work *work, 14 | void (*work_func)(struct rt_work *work, 15 | void *work_data), void *work_data) 16 | { 17 | rt_work_init(&work->work, work_func, work_data); 18 | } 19 | -------------------------------------------------------------------------------- /components/legacy/ipc/workqueue_legacy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-14 Meco Man the first version 9 | */ 10 | 11 | #ifndef __WORKQUEUE_LEGACY_H__ 12 | #define __WORKQUEUE_LEGACY_H__ 13 | 14 | #include 15 | 16 | struct rt_delayed_work 17 | { 18 | struct rt_work work; 19 | }; 20 | 21 | void rt_delayed_work_init(struct rt_delayed_work *work, 22 | void (*work_func)(struct rt_work *work, 23 | void *work_data), void *work_data); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /components/legacy/rtlegacy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-14 Meco Man the first version 9 | */ 10 | 11 | #ifndef __RT_LEGACY_H__ 12 | #define __RT_LEGACY_H__ 13 | 14 | #include 15 | 16 | /* rtlibc */ 17 | #include 18 | #include 19 | 20 | /* IPC */ 21 | #ifdef RT_USING_DEVICE_IPC 22 | #include "ipc/workqueue_legacy.h" 23 | #endif /* RT_USING_DEVICE_IPC */ 24 | 25 | /* FinSH */ 26 | 27 | #endif /* __RT_LEGACY_H__ */ 28 | -------------------------------------------------------------------------------- /components/libc/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/libc/compilers/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/libc/compilers/armlibc/README.md: -------------------------------------------------------------------------------- 1 | # ARMLIB (Keil-MDK) porting for RT-Thread 2 | 3 | Please define RT_USING_LIBC and compile RT-Thread with Keil-MDK compiler. 4 | 5 | 6 | 7 | ## More Information 8 | 9 | https://www.keil.com/support/man/docs/armlib/ -------------------------------------------------------------------------------- /components/libc/compilers/armlibc/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | Import('rtconfig') 3 | 4 | src = Glob('*.c') 5 | group = [] 6 | 7 | CPPDEFINES = ['RT_USING_ARM_LIBC'] 8 | 9 | if rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'armclang': 10 | group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'], CPPDEFINES = CPPDEFINES) 11 | 12 | Return('group') 13 | -------------------------------------------------------------------------------- /components/libc/compilers/armlibc/libc_syms.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | /* some export routines for module */ 16 | 17 | RTM_EXPORT(strstr); 18 | RTM_EXPORT(strlen); 19 | RTM_EXPORT(strchr); 20 | RTM_EXPORT(strcpy); 21 | RTM_EXPORT(strncpy); 22 | RTM_EXPORT(strcmp); 23 | RTM_EXPORT(strncmp); 24 | RTM_EXPORT(strcat); 25 | RTM_EXPORT(strtol); 26 | 27 | RTM_EXPORT(memcpy); 28 | RTM_EXPORT(memcmp); 29 | RTM_EXPORT(memmove); 30 | RTM_EXPORT(memset); 31 | RTM_EXPORT(memchr); 32 | 33 | RTM_EXPORT(toupper); 34 | RTM_EXPORT(atoi); 35 | 36 | /* import the full stdio for printf */ 37 | #if defined(RT_USING_MODULE) && defined(__MICROLIB) 38 | #error "[RT_USING_LIBC] Please use standard libc but not microlib." 39 | #endif 40 | 41 | RTM_EXPORT(puts); 42 | RTM_EXPORT(printf); 43 | -------------------------------------------------------------------------------- /components/libc/compilers/common/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | Import('rtconfig') 3 | 4 | src = [] 5 | cwd = GetCurrentDir() 6 | group = [] 7 | CPPPATH = [cwd] 8 | CPPDEFINES = [] 9 | 10 | if rtconfig.CROSS_TOOL == 'keil': 11 | CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND'] 12 | 13 | if GetDepend('RT_USING_LIBC'): 14 | src += Glob('*.c') 15 | elif GetDepend('RT_LIBC_USING_TIME'): 16 | src += ['time.c'] 17 | 18 | group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) 19 | 20 | list = os.listdir(cwd) 21 | for item in list: 22 | if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 23 | group = group + SConscript(os.path.join(item, 'SConscript')) 24 | 25 | Return('group') 26 | -------------------------------------------------------------------------------- /components/libc/compilers/common/delay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-05-07 Meco Man first Version 9 | */ 10 | #ifndef __DELAY_H__ 11 | #define __DELAY_H__ 12 | 13 | void msleep(unsigned int msecs); 14 | void ssleep(unsigned int seconds); 15 | void mdelay(unsigned long msecs); 16 | void udelay(unsigned long usecs); 17 | void ndelay(unsigned long nsecs); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /components/libc/compilers/common/nogcc/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | Import('rtconfig') 4 | 5 | src = [] 6 | cwd = GetCurrentDir() 7 | CPPPATH = [cwd] 8 | group = [] 9 | 10 | if GetDepend('RT_USING_LIBC'): 11 | src += Glob('*.c') 12 | 13 | if rtconfig.PLATFORM != 'gcc' or rtconfig.ARCH == 'sim': 14 | group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH) 15 | Return('group') 16 | -------------------------------------------------------------------------------- /components/libc/compilers/common/nogcc/readme.md: -------------------------------------------------------------------------------- 1 | ## Attentions 2 | 3 | This folder is "common" for toolchains excluding gcc. -------------------------------------------------------------------------------- /components/libc/compilers/common/nogcc/unistd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | #include "sys/unistd.h" 10 | -------------------------------------------------------------------------------- /components/libc/compilers/common/readme.md: -------------------------------------------------------------------------------- 1 | This folder is "common" for all toolchains. -------------------------------------------------------------------------------- /components/libc/compilers/common/stdlib.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-02-15 Meco Man first version 9 | */ 10 | 11 | #include 12 | 13 | #define DBG_TAG "stdlib" 14 | #define DBG_LVL DBG_INFO 15 | #include 16 | 17 | void __rt_libc_exit(int status) 18 | { 19 | rt_thread_t self = rt_thread_self(); 20 | 21 | if (self != RT_NULL) 22 | { 23 | LOG_E("thread:%s exit:%d!", self->name, status); 24 | rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL); 25 | } 26 | } 27 | 28 | #ifdef RT_USING_MSH 29 | int system(const char *command) 30 | { 31 | extern int msh_exec(char *cmd, rt_size_t length); 32 | 33 | int ret = -RT_ENOMEM; 34 | char *cmd = rt_strdup(command); 35 | 36 | if (cmd) 37 | { 38 | ret = msh_exec(cmd, rt_strlen(cmd)); 39 | rt_free(cmd); 40 | } 41 | 42 | return ret; 43 | } 44 | RTM_EXPORT(system); 45 | #endif 46 | -------------------------------------------------------------------------------- /components/libc/compilers/common/sys/statfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | #ifndef __SYS_STATFS_H__ 10 | #define __SYS_STATFS_H__ 11 | 12 | #include 13 | 14 | struct statfs 15 | { 16 | size_t f_bsize; /* block size */ 17 | size_t f_blocks; /* total data blocks in file system */ 18 | size_t f_bfree; /* free blocks in file system */ 19 | }; 20 | 21 | int statfs(const char *path, struct statfs *buf); 22 | int fstatfs(int fd, struct statfs *buf); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /components/libc/compilers/common/sys/vfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-09-11 Meco Man First version 9 | */ 10 | #ifndef __SYS_VFS_H__ 11 | #define __SYS_VFS_H__ 12 | 13 | #include "statfs.h" /* */ 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/libc/compilers/dlib/README.md: -------------------------------------------------------------------------------- 1 | # DLIB (IAR) porting for RT-Thread 2 | 3 | Please define RT_USING_LIBC and compile RT-Thread with IAR compiler. 4 | 5 | 6 | 7 | ## More Information 8 | 9 | http://www.iarsys.co.jp/download/LMS2/arm/7502/ewarm7502doc/arm/doc/EWARM_DevelopmentGuide.ENU.pdf P.130 -------------------------------------------------------------------------------- /components/libc/compilers/dlib/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | Import('rtconfig') 3 | 4 | src = Glob('*.c') 5 | group = [] 6 | 7 | CPPDEFINES = ['RT_USING_DLIBC'] 8 | 9 | if rtconfig.PLATFORM == 'iar': 10 | if GetDepend('DFS_USING_POSIX'): 11 | from distutils.version import LooseVersion 12 | from iar import IARVersion 13 | 14 | CPPDEFINES = CPPDEFINES + ['_DLIB_FILE_DESCRIPTOR'] 15 | if LooseVersion(IARVersion()) < LooseVersion("8.20.1"): 16 | CPPDEFINES = CPPDEFINES + ['_DLIB_THREAD_SUPPORT'] 17 | 18 | group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'], CPPDEFINES = CPPDEFINES) 19 | 20 | Return('group') 21 | -------------------------------------------------------------------------------- /components/libc/compilers/dlib/environ.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-01-28 Bernard first version 9 | */ 10 | 11 | const char *__environ = "OS=RT-Thread"; 12 | 13 | -------------------------------------------------------------------------------- /components/libc/compilers/dlib/syscall_close.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-01-28 Bernard first version 9 | */ 10 | #include 11 | #include 12 | #include 13 | 14 | /* 15 | * The "__close" function should close the file corresponding to 16 | * "handle". It should return 0 on success and nonzero on failure. 17 | */ 18 | 19 | #pragma module_name = "?__close" 20 | 21 | int __close(int handle) 22 | { 23 | if (handle == _LLIO_STDOUT || 24 | handle == _LLIO_STDERR || 25 | handle == _LLIO_STDIN) 26 | return _LLIO_ERROR; 27 | #ifdef DFS_USING_POSIX 28 | return close(handle); 29 | #else 30 | return _LLIO_ERROR; 31 | #endif /* DFS_USING_POSIX */ 32 | } 33 | -------------------------------------------------------------------------------- /components/libc/compilers/dlib/syscall_remove.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-01-28 Bernard first version 9 | */ 10 | #include 11 | #include 12 | #include 13 | 14 | /* 15 | * The "remove" function should remove the file named "filename". It 16 | * should return 0 on success and nonzero on failure. 17 | */ 18 | 19 | #pragma module_name = "?remove" 20 | 21 | int remove(const char *filename) 22 | { 23 | #ifdef DFS_USING_POSIX 24 | return unlink(filename); 25 | #else 26 | return _LLIO_ERROR; 27 | #endif /* DFS_USING_POSIX */ 28 | } 29 | -------------------------------------------------------------------------------- /components/libc/compilers/dlib/syscalls.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-02-13 Meco Man implement exit() and abort() 9 | */ 10 | #include 11 | 12 | /* for exit() and abort() */ 13 | void __exit (int status) 14 | { 15 | extern void __rt_libc_exit(int status); 16 | __rt_libc_exit(status); 17 | while(1); 18 | } 19 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/newlib/README.md: -------------------------------------------------------------------------------- 1 | # NEWLIB (GCC) porting for RT-Thread 2 | 3 | Please define RT_USING_LIBC and compile RT-Thread with GCC compiler. 4 | 5 | 6 | 7 | ## More Information 8 | 9 | https://sourceware.org/newlib/libc.html#Reentrancy 10 | 11 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/newlib/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | Import('rtconfig') 3 | 4 | src = [] 5 | cwd = GetCurrentDir() 6 | group = [] 7 | LIBS = ['m'] # link libm 8 | CPPDEFINES = ['RT_USING_NEWLIB'] 9 | CPPPATH = [cwd] 10 | 11 | if rtconfig.PLATFORM == 'gcc': 12 | if GetDepend('RT_USING_LIBC'): 13 | LIBS += ['c'] # link libc 14 | src += Glob('*.c') 15 | else: 16 | src += ['syscalls.c'] 17 | 18 | group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS) 19 | 20 | Return('group') 21 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/newlib/fcntl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-09-02 Meco Man First version 9 | */ 10 | #ifndef __FCNTL_H__ 11 | #define __FCNTL_H__ 12 | 13 | #include 14 | 15 | #ifndef O_DIRECTORY 16 | #define O_DIRECTORY 0x200000 17 | #endif 18 | 19 | #ifndef O_BINARY 20 | #define O_BINARY 0x10000 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/newlib/machine/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHTIME_H_ 2 | #define _MACHTIME_H_ 3 | 4 | #include 5 | #define _CLOCKS_PER_SEC_ RT_TICK_PER_SECOND 6 | 7 | #ifdef __SPU__ 8 | #include 9 | int nanosleep (const struct timespec *, struct timespec *); 10 | #endif 11 | 12 | #endif /* _MACHTIME_H_ */ 13 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/partial/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/partial/mips/SConscript: -------------------------------------------------------------------------------- 1 | from shutil import copy 2 | from building import * 3 | 4 | Import('rtconfig') 5 | 6 | src = [] 7 | cwd = GetCurrentDir() 8 | CPPPATH = [cwd] 9 | group = [] 10 | 11 | if rtconfig.PLATFORM == 'gcc' and ('mips' in rtconfig.PREFIX): # identify mips gcc tool chain 12 | try: 13 | # There is no 'sys/select.h' in tthe mips gcc toolchain; it will be copied from 'nogcc/sys/select.h' 14 | copy("../../../common/nogcc/sys/select.h", "./sys/select.h") 15 | except: 16 | pass 17 | 18 | group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH) 19 | 20 | Return('group') 21 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/partial/mips/readme.md: -------------------------------------------------------------------------------- 1 | These files don't exist in the mips gcc toolchain. They will be generated by scons automatically , and **DO NOT** change them: 2 | 3 | - sys/select.h 4 | 5 | -------------------------------------------------------------------------------- /components/libc/compilers/gcc/partial/readme.md: -------------------------------------------------------------------------------- 1 | This folder is for some particular targets. 2 | 3 | -------------------------------------------------------------------------------- /components/libc/compilers/readme.md: -------------------------------------------------------------------------------- 1 | This folder provides uniformed header files crossing different compiler platforms, and supports basic standard C library functions, such as memory management and time management, etc. -------------------------------------------------------------------------------- /components/libc/libdl/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | Import('rtconfig') 3 | 4 | src = Glob('*.c') + Glob('*.cpp') + Glob('arch/*.c') 5 | cwd = GetCurrentDir() 6 | group = [] 7 | CPPPATH = [cwd] 8 | 9 | if rtconfig.PLATFORM == 'gcc': 10 | group = DefineGroup('libc', src, 11 | depend = ['RT_USING_MODULE'], 12 | CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/libc/libdl/dlclose.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 yi.qiu first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "dlmodule.h" 15 | 16 | int dlclose(void *handle) 17 | { 18 | struct rt_dlmodule *module; 19 | 20 | RT_ASSERT(handle != RT_NULL); 21 | 22 | module = (struct rt_dlmodule *)handle; 23 | 24 | rt_enter_critical(); 25 | module->nref--; 26 | if (module->nref <= 0) 27 | { 28 | rt_exit_critical(); 29 | 30 | dlmodule_destroy(module); 31 | } 32 | else 33 | { 34 | rt_exit_critical(); 35 | } 36 | 37 | return RT_TRUE; 38 | } 39 | RTM_EXPORT(dlclose) 40 | -------------------------------------------------------------------------------- /components/libc/libdl/dlerror.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 yi.qiu first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | const char *dlerror(void) 15 | { 16 | return "TODO"; 17 | } 18 | RTM_EXPORT(dlerror) 19 | -------------------------------------------------------------------------------- /components/libc/libdl/dlfcn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 yi.qiu first version 9 | */ 10 | 11 | #ifndef __DLFCN_H_ 12 | #define __DLFCN_H_ 13 | 14 | #define RTLD_LAZY 0x00000 15 | #define RTLD_NOW 0x00001 16 | 17 | #define RTLD_LOCAL 0x00000 18 | #define RTLD_GLOBAL 0x10000 19 | 20 | #define RTLD_DEFAULT ((void*)1) 21 | #define RTLD_NEXT ((void*)2) 22 | 23 | void *dlopen (const char *filename, int flag); 24 | const char *dlerror(void); 25 | void *dlsym(void *handle, const char *symbol); 26 | int dlclose (void *handle); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /components/libc/libdl/dlsym.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 yi.qiu first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "dlmodule.h" 15 | 16 | void* dlsym(void *handle, const char* symbol) 17 | { 18 | int i; 19 | struct rt_dlmodule *module; 20 | 21 | RT_ASSERT(handle != RT_NULL); 22 | 23 | module = (struct rt_dlmodule *)handle; 24 | 25 | for(i=0; insym; i++) 26 | { 27 | if (rt_strcmp(module->symtab[i].name, symbol) == 0) 28 | return (void*)module->symtab[i].addr; 29 | } 30 | 31 | return RT_NULL; 32 | } 33 | RTM_EXPORT(dlsym) 34 | -------------------------------------------------------------------------------- /components/libc/posix/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/libc/posix/getline/README.md: -------------------------------------------------------------------------------- 1 | # getline/getdelim for RT-Thread POSIX(IEEE Std 1003.1-2008) 2 | 3 | [![Build Status](https://travis-ci.org/ivanrad/getline.svg?branch=master)](https://travis-ci.org/ivanrad/getline) 4 | 5 | https://github.com/ivanrad/getline 6 | 7 | Read a delimited record from stream. 8 | 9 | Yet another (hopefully portable C) implementation of getline/getdelim. 10 | These are ersatz functions, a drop-in replacement, to be used on those occasions when your C library does not already support them. 11 | 12 | For more details, see [Open Group Base Specification for getdelim/getline][opengroup-spec]. 13 | 14 | 15 | 16 | ## License 17 | 18 | This code is unlicensed -- free and released into the public domain. See `UNLICENSE` file for more information. 19 | 20 | [opengroup-spec]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html 21 | -------------------------------------------------------------------------------- /components/libc/posix/getline/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_GETLINE'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/libc/posix/getline/posix_getline.h: -------------------------------------------------------------------------------- 1 | /* posix_getline.h 2 | * RT-Thread POSIX 3 | * getdelim(), getline() - read a delimited record from stream, ersatz implementation 4 | * This code is unlicensed -- free and released into the public domain. 5 | * https://man7.org/linux/man-pages/man3/getline.3.html 6 | * Authors: 7 | * https://github.com/ivanrad/getline 8 | * 9 | * Meco Man 2020-09-03 porting to RT-Thread 10 | */ 11 | 12 | 13 | #ifndef POSIX_GETLINE_H 14 | #define POSIX_GETLINE_H 15 | 16 | #include 17 | #include 18 | 19 | ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); 20 | ssize_t getline(char **lineptr, size_t *n, FILE *stream); 21 | 22 | #endif /* POSIX_GETLINE_H */ 23 | 24 | -------------------------------------------------------------------------------- /components/libc/posix/io/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | import os 4 | from building import * 5 | 6 | src = [] 7 | cwd = GetCurrentDir() 8 | CPPPATH = [cwd] 9 | group = [] 10 | 11 | flag = False 12 | 13 | if GetDepend('RT_USING_POSIX_DEVIO'): 14 | src += ['libc.c'] 15 | flag = True 16 | 17 | if GetDepend('RT_USING_POSIX_SELECT'): 18 | src += ['select.c'] 19 | flag = True 20 | 21 | if flag == True: 22 | group = DefineGroup('POSIX', src, depend = [], CPPPATH = CPPPATH) 23 | 24 | list = os.listdir(cwd) 25 | for d in list: 26 | path = os.path.join(cwd, d) 27 | if os.path.isfile(os.path.join(path, 'SConscript')): 28 | group = group + SConscript(os.path.join(d, 'SConscript')) 29 | 30 | Return('group') 31 | -------------------------------------------------------------------------------- /components/libc/posix/io/aio/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = ['aio.c'] 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_AIO'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/libc/posix/io/libc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2017/10/15 bernard the first version 9 | */ 10 | #ifndef __RTT_LIBC_H__ 11 | #define __RTT_LIBC_H__ 12 | 13 | #include 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int libc_system_init(void); 20 | #ifdef RT_USING_POSIX_DEVIO 21 | int libc_stdio_get_console(void); 22 | int libc_stdio_set_console(const char* device_name, int mode); 23 | #endif /* RT_USING_POSIX_DEVIO */ 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /components/libc/posix/io/mman/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = ['mman.c'] 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_MMAN'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/libc/posix/io/poll/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = [] 7 | CPPPATH = [cwd] 8 | 9 | if GetDepend('RT_USING_POSIX_POLL'): 10 | src += ['poll.c'] 11 | 12 | group = DefineGroup('POSIX', src, depend = [], CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/libc/posix/io/termios/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = ['termios.c'] 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_TERMIOS'], CPPPATH = CPPPATH) 10 | 11 | Return('group') 12 | -------------------------------------------------------------------------------- /components/libc/posix/ipc/Kconfig: -------------------------------------------------------------------------------- 1 | menu "Interprocess Communication (IPC)" 2 | 3 | config RT_USING_POSIX_PIPE 4 | bool "Enable pipe and FIFO" 5 | select RT_USING_POSIX_FS 6 | select RT_USING_POSIX_DEVIO 7 | select RT_USING_POSIX_POLL 8 | default n 9 | 10 | config RT_USING_POSIX_PIPE_SIZE 11 | int "Set pipe buffer size" 12 | depends on RT_USING_POSIX_PIPE 13 | default 512 14 | 15 | comment "Socket is in the 'Network' category" 16 | 17 | endmenu 18 | -------------------------------------------------------------------------------- /components/libc/posix/ipc/sys/ipc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-12-07 Meco Man First version 9 | */ 10 | #ifndef __SYS_IPC_H__ 11 | #define __SYS_IPC_H__ 12 | 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/libc/posix/ipc/sys/msg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-12-07 Meco Man First version 9 | */ 10 | #ifndef __SYS_MSG_H__ 11 | #define __SYS_MSG_H__ 12 | 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/libc/posix/ipc/sys/sem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-12-07 Meco Man First version 9 | */ 10 | #ifndef __SYS_SEM_H__ 11 | #define __SYS_SEM_H__ 12 | 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/libc/posix/ipc/sys/shm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-12-07 Meco Man First version 9 | */ 10 | #ifndef __SYS_SHM_H__ 11 | #define __SYS_SHM_H__ 12 | 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /components/libc/posix/pthreads/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | from utils import VersionCmp 3 | 4 | cwd = GetCurrentDir() 5 | src = Glob('*.c') 6 | CPPPATH = [cwd] 7 | CPPDEFINES = [] 8 | 9 | # only enable POSIX.1b-1993 Real-time extensions 10 | libc_ver = GetDepend('LIBC_VERSION') 11 | try: 12 | ver = libc_ver.split(' ') 13 | ver = ver[1] 14 | if VersionCmp(ver, "2.5.0") == 1: 15 | CPPDEFINES = ['_POSIX_C_SOURCE=199309L'] 16 | except : 17 | pass 18 | 19 | group = DefineGroup('POSIX', src, 20 | depend = ['RT_USING_PTHREADS', 'RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) 21 | 22 | Return('group') 23 | -------------------------------------------------------------------------------- /components/libc/posix/pthreads/posix_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2013-12-23 Bernard Add the checking for ESHUTDOWN 9 | */ 10 | 11 | #ifndef __POSIX_TYPES_H__ 12 | #define __POSIX_TYPES_H__ 13 | 14 | #include 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /components/libc/posix/pthreads/sched.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #include 11 | 12 | int sched_yield(void) 13 | { 14 | rt_thread_yield(); 15 | 16 | return 0; 17 | } 18 | RTM_EXPORT(sched_yield); 19 | 20 | int sched_get_priority_min(int policy) 21 | { 22 | if (policy != SCHED_FIFO && policy != SCHED_RR) 23 | return EINVAL; 24 | 25 | return 0; 26 | } 27 | RTM_EXPORT(sched_get_priority_min); 28 | 29 | int sched_get_priority_max(int policy) 30 | { 31 | if (policy != SCHED_FIFO && policy != SCHED_RR) 32 | return EINVAL; 33 | 34 | return RT_THREAD_PRIORITY_MAX - 1; 35 | } 36 | RTM_EXPORT(sched_get_priority_max); 37 | 38 | int sched_setscheduler(pid_t pid, int policy) 39 | { 40 | return EOPNOTSUPP; 41 | } 42 | RTM_EXPORT(sched_setscheduler); 43 | -------------------------------------------------------------------------------- /components/libc/posix/pthreads/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #ifndef __SCHED_H__ 11 | #define __SCHED_H__ 12 | 13 | #include 14 | #include 15 | 16 | /* Thread scheduling policies */ 17 | enum 18 | { 19 | SCHED_OTHER = 0, 20 | SCHED_FIFO, 21 | SCHED_RR, 22 | SCHED_MIN = SCHED_OTHER, 23 | SCHED_MAX = SCHED_RR 24 | }; 25 | 26 | #ifdef __cplusplus 27 | extern "C" 28 | { 29 | #endif 30 | 31 | int sched_yield(void); 32 | int sched_get_priority_min(int policy); 33 | int sched_get_priority_max(int policy); 34 | int sched_setscheduler(pid_t pid, int policy); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /components/libc/posix/readme.md: -------------------------------------------------------------------------------- 1 | This folder provides functions that are not part of the standard C library but are part of the POSIX.1 (IEEE Standard 1003.1) standard. -------------------------------------------------------------------------------- /components/libc/posix/signal/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') + Glob('*.cpp') 7 | CPPPATH = [cwd] 8 | 9 | group = DefineGroup('POSIX', src, 10 | depend = ['RT_USING_SIGNALS', 'RT_USING_PTHREADS', 'RT_USING_LIBC'], 11 | CPPPATH = CPPPATH) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /components/libc/posix/src/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | src = [] 6 | cwd = GetCurrentDir() 7 | CPPPATH = [cwd] 8 | group = [] 9 | 10 | flag = False 11 | src += ['unistd.c'] #TODO 12 | 13 | if GetDepend('RT_USING_POSIX_DELAY'): 14 | src += ['delay.c'] 15 | flag = True 16 | 17 | if flag == True: 18 | group = DefineGroup('POSIX', src, depend = [], CPPPATH = CPPPATH) 19 | 20 | Return('group') 21 | -------------------------------------------------------------------------------- /components/libc/posix/src/unistd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2020-09-01 Meco Man first Version 9 | * 2021-02-12 Meco Man move all functions located in to this file 10 | */ 11 | 12 | #include 13 | #include 14 | 15 | #ifdef RT_USING_POSIX_TERMIOS 16 | #include "termios.h" 17 | int isatty(int fd) 18 | { 19 | struct termios ts; 20 | return(tcgetattr(fd, &ts) != -1); /*true if no error (is a tty)*/ 21 | } 22 | #else 23 | int isatty(int fd) 24 | { 25 | if (fd >=0 && fd < 3) 26 | { 27 | return 1; 28 | } 29 | else 30 | { 31 | return 0; 32 | } 33 | } 34 | #endif 35 | RTM_EXPORT(isatty); 36 | 37 | char *ttyname(int fd) 38 | { 39 | return "/dev/tty"; /* TODO: need to add more specific */ 40 | } 41 | RTM_EXPORT(ttyname); 42 | -------------------------------------------------------------------------------- /components/lwp/Kconfig: -------------------------------------------------------------------------------- 1 | config RT_USING_LWP 2 | bool "Using light-weight process" 3 | select RT_USING_POSIX_FS 4 | select RT_USING_POSIX_SELECT 5 | select RT_USING_LIBC 6 | depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A 7 | default n 8 | help 9 | The lwP is a light weight process running in user mode. 10 | -------------------------------------------------------------------------------- /components/lwp/SConscript: -------------------------------------------------------------------------------- 1 | Import('rtconfig') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = [] 6 | CPPPATH = [cwd] 7 | 8 | support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "arm926", "cortex-a"]} 9 | platform_file = {'armcc': 'rvds.S', 'gcc': 'gcc.S', 'iar': 'iar.S'} 10 | 11 | if rtconfig.PLATFORM in platform_file.keys(): # support platforms 12 | if rtconfig.ARCH in support_arch.keys() and rtconfig.CPU in support_arch[rtconfig.ARCH]: 13 | # arch/arm/cortex-m7/lwp_gcc.S 14 | asm_path = 'arch/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/*_' + platform_file[rtconfig.PLATFORM] 15 | src = Glob('*.c') + Glob(asm_path) 16 | CPPPATH = [cwd] 17 | 18 | group = DefineGroup('lwP', src, depend = ['RT_USING_LWP'], CPPPATH = CPPPATH) 19 | 20 | Return('group') 21 | -------------------------------------------------------------------------------- /components/lwp/lwp_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-06-10 Bernard first version 9 | */ 10 | 11 | #ifndef __LWP_MEM_H__ 12 | #define __LWP_MEM_H__ 13 | 14 | extern void rt_lwp_mem_init(struct rt_lwp *lwp); 15 | extern void rt_lwp_mem_deinit(struct rt_lwp *lwp); 16 | 17 | extern void *rt_lwp_mem_malloc(rt_uint32_t size); 18 | extern void rt_lwp_mem_free(void *addr); 19 | extern void *rt_lwp_mem_realloc(void *rmem, rt_size_t newsize); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /components/net/.ignore_format.yml: -------------------------------------------------------------------------------- 1 | # files format check exclude path, please follow the instructions below to modify; 2 | # If you need to exclude an entire folder, add the folder path in dir_path; 3 | # If you need to exclude a file, add the path to the file in file_path. 4 | 5 | dir_path: 6 | - lwip-1.4.1 7 | - lwip-2.0.2 8 | - lwip-2.0.3 9 | - lwip-2.1.2 10 | -------------------------------------------------------------------------------- /components/net/SConscript: -------------------------------------------------------------------------------- 1 | # for network related component 2 | import os 3 | Import('RTT_ROOT') 4 | from building import * 5 | 6 | objs = [] 7 | cwd = GetCurrentDir() 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/net/at/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | path = [cwd + '/include'] 5 | 6 | src = Glob('src/at_utils.c') 7 | 8 | if GetDepend(['AT_USING_CLI']): 9 | src += Glob('src/at_cli.c') 10 | 11 | if GetDepend(['AT_USING_SERVER']): 12 | src += Split(''' 13 | src/at_server.c 14 | src/at_base_cmd.c 15 | ''') 16 | 17 | if GetDepend(['AT_USING_CLIENT']): 18 | src += Glob('src/at_client.c') 19 | 20 | if GetDepend(['AT_USING_SOCKET']): 21 | src += Glob('at_socket/*.c') 22 | path += [cwd + '/at_socket'] 23 | 24 | group = DefineGroup('AT', src, depend = ['RT_USING_AT'], CPPPATH = path) 25 | 26 | Return('group') 27 | -------------------------------------------------------------------------------- /components/net/at/include/at_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-10-12 armink first version 9 | */ 10 | 11 | /* 12 | * NOTE: DO NOT include this file on the header file. 13 | */ 14 | 15 | #ifndef LOG_TAG 16 | #define DBG_TAG "at" 17 | #else 18 | #define DBG_TAG LOG_TAG 19 | #endif /* LOG_TAG */ 20 | 21 | #ifdef AT_DEBUG 22 | #define DBG_LVL DBG_LOG 23 | #else 24 | #define DBG_LVL DBG_INFO 25 | #endif /* AT_DEBUG */ 26 | 27 | #include 28 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-1.4.1/CHANGELOG -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | 4 | See also the FILES file in each subdirectory. 5 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/READTEST.md: -------------------------------------------------------------------------------- 1 | Porting network interface device for RT-Thread in lwIP. 2 | The major jobs following RT-Thread Team. The RT-Thread network interface device need to synchronize some network status and address information in lwIP, so it need to make some changes in the lwIP netwrok status and address operations function. 3 | The specific changes are as follows: 4 | 5 | - netif.c: add RT-Thread netdev header file , status synchronize(UP, LINK_UP), address synchronize(IP, netmask, gateway); 6 | 7 | - dns.c: add RT-Thread header file, dns servers synchronize; 8 | 9 | - sockets.c: custom 'select' function implementation in RT-Thread by the wait queue mode. 10 | 11 | by ChenYong 2019/3/26 10:00 AM 12 | chenyong@rt-thread.com 13 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/doc/FILES: -------------------------------------------------------------------------------- 1 | savannah.txt - How to obtain the current development source code. 2 | contrib.txt - How to contribute to lwIP as a developer. 3 | rawapi.txt - The documentation for the core API of lwIP. 4 | Also provides an overview about the other APIs and multithreading. 5 | snmp_agent.txt - The documentation for the lwIP SNMP agent. 6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 7 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | core/ - The core of the TPC/IP stack; protocol implementations, 5 | memory and buffer management, and the low-level raw API. 6 | 7 | include/ - lwIP include files. 8 | 9 | netif/ - Generic network interface device drivers are kept here, 10 | as well as the ARP module. 11 | 12 | For more information on the various subdirectories, check the FILES 13 | file in each directory. 14 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/src/core/ipv6/README: -------------------------------------------------------------------------------- 1 | IPv6 support in lwIP is very experimental. 2 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_MEM_H__ 2 | #define __TEST_MEM_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_ETHARP_H__ 2 | #define __TEST_ETHARP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/lwip_unittests.c: -------------------------------------------------------------------------------- 1 | #include "lwip_check.h" 2 | 3 | #include "udp/test_udp.h" 4 | #include "tcp/test_tcp.h" 5 | #include "tcp/test_tcp_oos.h" 6 | #include "core/test_mem.h" 7 | #include "etharp/test_etharp.h" 8 | 9 | #include "lwip/init.h" 10 | 11 | 12 | int main() 13 | { 14 | int number_failed; 15 | SRunner *sr; 16 | size_t i; 17 | suite_getter_fn* suites[] = { 18 | udp_suite, 19 | tcp_suite, 20 | tcp_oos_suite, 21 | mem_suite, 22 | etharp_suite 23 | }; 24 | size_t num = sizeof(suites)/sizeof(void*); 25 | LWIP_ASSERT("No suites defined", num > 0); 26 | 27 | lwip_init(); 28 | 29 | sr = srunner_create((suites[0])()); 30 | for(i = 1; i < num; i++) { 31 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); 32 | } 33 | 34 | #ifdef LWIP_UNITTESTS_NOFORK 35 | srunner_set_fork_status(sr, CK_NOFORK); 36 | #endif 37 | #ifdef LWIP_UNITTESTS_FORK 38 | srunner_set_fork_status(sr, CK_FORK); 39 | #endif 40 | 41 | srunner_run_all(sr, CK_NORMAL); 42 | number_failed = srunner_ntests_failed(sr); 43 | srunner_free(sr); 44 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; 45 | } 46 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_H__ 2 | #define __TEST_TCP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_TCP_OOS_H__ 2 | #define __TEST_TCP_OOS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-1.4.1/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEST_UDP_H__ 2 | #define __TEST_UDP_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | test/ - Some code to test whether the sources do what they should. 4 | 5 | See also the FILES file in each subdirectory. 6 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/doc/FILES: -------------------------------------------------------------------------------- 1 | doxygen/ - Configuration files and scripts to create the lwIP doxygen source 2 | documentation (found at http://www.nongnu.org/lwip/) 3 | 4 | savannah.txt - How to obtain the current development source code. 5 | contrib.txt - How to contribute to lwIP as a developer. 6 | rawapi.txt - The documentation for the core API of lwIP. 7 | Also provides an overview about the other APIs and multithreading. 8 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 9 | ppp.txt - Documentation of the PPP interface for lwIP. 10 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/doc/doxygen/generate.bat: -------------------------------------------------------------------------------- 1 | doxygen lwip.Doxyfile 2 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/doc/doxygen/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | doxygen lwip.Doxyfile 4 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/doc/doxygen/output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirection 5 | 6 | 7 | 8 | index.html 9 | 10 | 11 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/doc/doxygen_docs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.0.2/doc/doxygen_docs.zip -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | apps/ - Higher layer applications that are specifically programmed 5 | with the lwIP low-level raw API. 6 | 7 | core/ - The core of the TPC/IP stack; protocol implementations, 8 | memory and buffer management, and the low-level raw API. 9 | 10 | include/ - lwIP include files. 11 | 12 | netif/ - Generic network interface device drivers are kept here. 13 | 14 | For more information on the various subdirectories, check the FILES 15 | file in each directory. 16 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/apps/README.md: -------------------------------------------------------------------------------- 1 | Some net apps for current version LwIP. 2 | 3 | The RT-Thread develop team ported apps. It's easy to use it on finsh/msh. 4 | 5 | - ping 6 | - tftp 7 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/apps/httpd/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/apps/httpd/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.0.2/src/apps/httpd/fs/img/sics.gif -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/apps/httpd/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/include/lwip/apps/FILES: -------------------------------------------------------------------------------- 1 | This directory contains application headers. 2 | Every application shall provide one api file APP.h and optionally one options file APP_opts.h 3 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/lwippools.h: -------------------------------------------------------------------------------- 1 | #if 1 2 | LWIP_MALLOC_MEMPOOL_START 3 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 256) 4 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 512) 5 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1024) 6 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1514) 7 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1536) 8 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 4096) 9 | LWIP_MALLOC_MEMPOOL_END 10 | #endif 11 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | ethernet.c 6 | Shared code for Ethernet based interfaces. 7 | 8 | ethernetif.c 9 | An example of how an Ethernet device driver could look. This 10 | file can be used as a "skeleton" for developing new Ethernet 11 | network device drivers. It uses the etharp.c ARP code. 12 | 13 | lowpan6.c 14 | A 6LoWPAN implementation as a netif. 15 | 16 | slipif.c 17 | A generic implementation of the SLIP (Serial Line IP) 18 | protocol. It requires a sio (serial I/O) module to work. 19 | 20 | ppp/ Point-to-Point Protocol stack 21 | The lwIP PPP support is based from pppd (http://ppp.samba.org) with 22 | huge changes to match code size and memory requirements for embedded 23 | devices. Please read /doc/ppp.txt and ppp/PPPD_FOLLOWUP for a detailed 24 | explanation. 25 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/src/netif/ppp/polarssl/README: -------------------------------------------------------------------------------- 1 | About PolarSSL files into lwIP PPP support 2 | ------------------------------------------ 3 | 4 | This folder contains some files fetched from the latest BSD release of 5 | the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption 6 | methods we need for lwIP PPP support. 7 | 8 | The PolarSSL files were cleaned to contain only the necessary struct 9 | fields and functions needed for lwIP. 10 | 11 | The PolarSSL API was not changed at all, so if you are already using 12 | PolarSSL you can choose to skip the compilation of the included PolarSSL 13 | library into lwIP. 14 | 15 | If you are not using the embedded copy you must include external 16 | libraries into your arch/cc.h port file. 17 | 18 | Beware of the stack requirements which can be a lot larger if you are not 19 | using our cleaned PolarSSL library. 20 | 21 | 22 | PolarSSL project website: http://polarssl.org/ 23 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/fuzz/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.0.2/test/fuzz/config.h -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/fuzz/output_to_pcap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "This script will make pcap files from the afl-fuzz crash/hang files" 6 | echo "It needs hexdump and text2pcap" 7 | echo "Please give output directory as argument" 8 | exit 2 9 | fi 10 | 11 | for i in `ls $1/crashes/id*` 12 | do 13 | PCAPNAME=`echo $i | grep pcap` 14 | if [ -z "$PCAPNAME" ]; then 15 | hexdump -C $i > $1/$$.tmp 16 | text2pcap $1/$$.tmp ${i}.pcap 17 | fi 18 | done 19 | for i in `ls $1/hangs/id*` 20 | do 21 | PCAPNAME=`echo $i | grep pcap` 22 | if [ -z "$PCAPNAME" ]; then 23 | hexdump -C $i > $1/$$.tmp 24 | text2pcap $1/$$.tmp ${i}.pcap 25 | fi 26 | done 27 | rm -f $1/$$.tmp 28 | 29 | echo 30 | echo "Created pcap files:" 31 | ls $1/*/*.pcap 32 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MEM_H 2 | #define LWIP_HDR_TEST_MEM_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/core/test_pbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PBUF_H 2 | #define LWIP_HDR_TEST_PBUF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *pbuf_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/dhcp/test_dhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DHCP_H 2 | #define LWIP_HDR_TEST_DHCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* dhcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_ETHARP_H 2 | #define LWIP_HDR_TEST_ETHARP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/mdns/test_mdns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MDNS_H__ 2 | #define LWIP_HDR_TEST_MDNS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mdns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_H 2 | #define LWIP_HDR_TEST_TCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_OOS_H 2 | #define LWIP_HDR_TEST_TCP_OOS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.2/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_UDP_H 2 | #define LWIP_HDR_TEST_UDP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | test/ - Some code to test whether the sources do what they should. 4 | 5 | See also the FILES file in each subdirectory. 6 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/doc/FILES: -------------------------------------------------------------------------------- 1 | doxygen/ - Configuration files and scripts to create the lwIP doxygen source 2 | documentation (found at http://www.nongnu.org/lwip/) 3 | 4 | savannah.txt - How to obtain the current development source code. 5 | contrib.txt - How to contribute to lwIP as a developer. 6 | rawapi.txt - The documentation for the core API of lwIP. 7 | Also provides an overview about the other APIs and multithreading. 8 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 9 | ppp.txt - Documentation of the PPP interface for lwIP. 10 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/doc/doxygen/generate.bat: -------------------------------------------------------------------------------- 1 | doxygen lwip.Doxyfile 2 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/doc/doxygen/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | doxygen lwip.Doxyfile 4 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/doc/doxygen/output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirection 5 | 6 | 7 | 8 | index.html 9 | 10 | 11 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | apps/ - Higher layer applications that are specifically programmed 5 | with the lwIP low-level raw API. 6 | 7 | core/ - The core of the TPC/IP stack; protocol implementations, 8 | memory and buffer management, and the low-level raw API. 9 | 10 | include/ - lwIP include files. 11 | 12 | netif/ - Generic network interface device drivers are kept here. 13 | 14 | For more information on the various subdirectories, check the FILES 15 | file in each directory. 16 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/apps/README.md: -------------------------------------------------------------------------------- 1 | Some net apps for current version LwIP. 2 | 3 | The RT-Thread develop team ported apps. It's easy to use it on finsh/msh. 4 | 5 | - ping 6 | - tftp 7 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/apps/httpd/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/apps/httpd/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.0.3/src/apps/httpd/fs/img/sics.gif -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/apps/httpd/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/include/lwip/apps/FILES: -------------------------------------------------------------------------------- 1 | This directory contains application headers. 2 | Every application shall provide one api file APP.h and optionally one options file APP_opts.h 3 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/lwippools.h: -------------------------------------------------------------------------------- 1 | #if 1 2 | LWIP_MALLOC_MEMPOOL_START 3 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 256) 4 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 512) 5 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1024) 6 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1514) 7 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1536) 8 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 4096) 9 | LWIP_MALLOC_MEMPOOL_END 10 | #endif 11 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | ethernet.c 6 | Shared code for Ethernet based interfaces. 7 | 8 | ethernetif.c 9 | An example of how an Ethernet device driver could look. This 10 | file can be used as a "skeleton" for developing new Ethernet 11 | network device drivers. It uses the etharp.c ARP code. 12 | 13 | lowpan6.c 14 | A 6LoWPAN implementation as a netif. 15 | 16 | slipif.c 17 | A generic implementation of the SLIP (Serial Line IP) 18 | protocol. It requires a sio (serial I/O) module to work. 19 | 20 | ppp/ Point-to-Point Protocol stack 21 | The lwIP PPP support is based from pppd (http://ppp.samba.org) with 22 | huge changes to match code size and memory requirements for embedded 23 | devices. Please read /doc/ppp.txt and ppp/PPPD_FOLLOWUP for a detailed 24 | explanation. 25 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/src/netif/ppp/polarssl/README: -------------------------------------------------------------------------------- 1 | About PolarSSL files into lwIP PPP support 2 | ------------------------------------------ 3 | 4 | This folder contains some files fetched from the latest BSD release of 5 | the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption 6 | methods we need for lwIP PPP support. 7 | 8 | The PolarSSL files were cleaned to contain only the necessary struct 9 | fields and functions needed for lwIP. 10 | 11 | The PolarSSL API was not changed at all, so if you are already using 12 | PolarSSL you can choose to skip the compilation of the included PolarSSL 13 | library into lwIP. 14 | 15 | If you are not using the embedded copy you must include external 16 | libraries into your arch/cc.h port file. 17 | 18 | Beware of the stack requirements which can be a lot larger if you are not 19 | using our cleaned PolarSSL library. 20 | 21 | 22 | PolarSSL project website: http://polarssl.org/ 23 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/fuzz/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.0.3/test/fuzz/config.h -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/fuzz/output_to_pcap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "This script will make pcap files from the afl-fuzz crash/hang files" 6 | echo "It needs hexdump and text2pcap" 7 | echo "Please give output directory as argument" 8 | exit 2 9 | fi 10 | 11 | for i in `ls $1/crashes/id*` 12 | do 13 | PCAPNAME=`echo $i | grep pcap` 14 | if [ -z "$PCAPNAME" ]; then 15 | hexdump -C $i > $1/$$.tmp 16 | text2pcap $1/$$.tmp ${i}.pcap 17 | fi 18 | done 19 | for i in `ls $1/hangs/id*` 20 | do 21 | PCAPNAME=`echo $i | grep pcap` 22 | if [ -z "$PCAPNAME" ]; then 23 | hexdump -C $i > $1/$$.tmp 24 | text2pcap $1/$$.tmp ${i}.pcap 25 | fi 26 | done 27 | rm -f $1/$$.tmp 28 | 29 | echo 30 | echo "Created pcap files:" 31 | ls $1/*/*.pcap 32 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MEM_H 2 | #define LWIP_HDR_TEST_MEM_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/core/test_pbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PBUF_H 2 | #define LWIP_HDR_TEST_PBUF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *pbuf_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/dhcp/test_dhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DHCP_H 2 | #define LWIP_HDR_TEST_DHCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* dhcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_ETHARP_H 2 | #define LWIP_HDR_TEST_ETHARP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/ip4/test_ip4.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP4_H 2 | #define LWIP_HDR_TEST_IP4_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip4_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/mdns/test_mdns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MDNS_H__ 2 | #define LWIP_HDR_TEST_MDNS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mdns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_H 2 | #define LWIP_HDR_TEST_TCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_OOS_H 2 | #define LWIP_HDR_TEST_TCP_OOS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.0.3/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_UDP_H 2 | #define LWIP_HDR_TEST_UDP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.7) 2 | 3 | project(lwIP) 4 | 5 | set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 6 | include(src/Filelists.cmake) 7 | 8 | # Package generation 9 | set(CPACK_SOURCE_GENERATOR "ZIP") 10 | set(CPACK_SOURCE_PACKAGE_DESCRIPTION_SUMMARY "lwIP lightweight IP stack") 11 | set(CPACK_PACKAGE_VERSION_MAJOR "${LWIP_VERSION_MAJOR}") 12 | set(CPACK_PACKAGE_VERSION_MINOR "${LWIP_VERSION_MINOR}") 13 | set(CPACK_PACKAGE_VERSION_PATCH "${LWIP_VERSION_REVISION}") 14 | set(CPACK_SOURCE_IGNORE_FILES "/build/;${CPACK_SOURCE_IGNORE_FILES};.git") 15 | set(CPACK_SOURCE_PACKAGE_FILE_NAME "lwip-${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}") 16 | include(CPack) 17 | 18 | # Target for package generation 19 | add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) 20 | add_dependencies(dist lwipdocs) 21 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | test/ - Some code to test whether the sources do what they should. 4 | 5 | See also the FILES file in each subdirectory. 6 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | apps/ - Higher layer applications that are specifically programmed 5 | with the lwIP low-level raw API. 6 | 7 | core/ - The core of the TPC/IP stack; protocol implementations, 8 | memory and buffer management, and the low-level raw API. 9 | 10 | include/ - lwIP include files. 11 | 12 | netif/ - Generic network interface device drivers are kept here. 13 | 14 | For more information on the various subdirectories, check the FILES 15 | file in each directory. 16 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/apps/http/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/apps/http/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.1.2/src/apps/http/fs/img/sics.gif -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/apps/http/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/include/lwip/apps/FILES: -------------------------------------------------------------------------------- 1 | This directory contains application headers. 2 | Every application shall provide one api file APP.h and optionally one options file APP_opts.h 3 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/include/lwip/apps/snmp_snmpv2_framework.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_obj_id usmNoAuthProtocol; 18 | extern const struct snmp_obj_id usmHMACMD5AuthProtocol; 19 | extern const struct snmp_obj_id usmHMACSHAAuthProtocol; 20 | 21 | extern const struct snmp_obj_id usmNoPrivProtocol; 22 | extern const struct snmp_obj_id usmDESPrivProtocol; 23 | extern const struct snmp_obj_id usmAESPrivProtocol; 24 | 25 | extern const struct snmp_mib snmpframeworkmib; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif /* __cplusplus */ 30 | 31 | #endif /* LWIP_SNMP */ 32 | #endif /* LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H */ 33 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/include/lwip/apps/snmp_snmpv2_usm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_mib snmpusmmib; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif /* __cplusplus */ 22 | 23 | #endif /* LWIP_SNMP */ 24 | #endif /* LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H */ 25 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/lwippools.h: -------------------------------------------------------------------------------- 1 | #if 1 2 | LWIP_MALLOC_MEMPOOL_START 3 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 256) 4 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 512) 5 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1024) 6 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1514) 7 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 1536) 8 | LWIP_MALLOC_MEMPOOL((unsigned char)128, 4096) 9 | LWIP_MALLOC_MEMPOOL_END 10 | #endif 11 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | ethernet.c 6 | Shared code for Ethernet based interfaces. 7 | 8 | lowpan6.c 9 | A 6LoWPAN implementation as a netif. 10 | 11 | lowpan6_ble.c 12 | A 6LoWPAN over Bluetooth Low Energy (BLE) implementation as netif, 13 | according to RFC-7668. 14 | 15 | slipif.c 16 | A generic implementation of the SLIP (Serial Line IP) 17 | protocol. It requires a sio (serial I/O) module to work. 18 | 19 | ppp/ Point-to-Point Protocol stack 20 | The lwIP PPP support is based from pppd (http://ppp.samba.org) with 21 | huge changes to match code size and memory requirements for embedded 22 | devices. Please read /doc/ppp.txt and ppp/PPPD_FOLLOWUP for a detailed 23 | explanation. 24 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/src/netif/ppp/polarssl/README: -------------------------------------------------------------------------------- 1 | About PolarSSL files into lwIP PPP support 2 | ------------------------------------------ 3 | 4 | This folder contains some files fetched from the latest BSD release of 5 | the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption 6 | methods we need for lwIP PPP support. 7 | 8 | The PolarSSL files were cleaned to contain only the necessary struct 9 | fields and functions needed for lwIP. 10 | 11 | The PolarSSL API was not changed at all, so if you are already using 12 | PolarSSL you can choose to skip the compilation of the included PolarSSL 13 | library into lwIP. 14 | 15 | If you are not using the embedded copy you must include external 16 | libraries into your arch/cc.h port file. 17 | 18 | Beware of the stack requirements which can be a lot larger if you are not 19 | using our cleaned PolarSSL library. 20 | 21 | 22 | PolarSSL project website: http://polarssl.org/ 23 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/fuzz/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/components/net/lwip-2.1.2/test/fuzz/config.h -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/fuzz/output_to_pcap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "This script will make pcap files from the afl-fuzz crash/hang files" 6 | echo "It needs hexdump and text2pcap" 7 | echo "Please give output directory as argument" 8 | exit 2 9 | fi 10 | 11 | for i in `ls $1/crashes/id*` 12 | do 13 | PCAPNAME=`echo $i | grep pcap` 14 | if [ -z "$PCAPNAME" ]; then 15 | hexdump -C $i > $1/$$.tmp 16 | text2pcap $1/$$.tmp ${i}.pcap 17 | fi 18 | done 19 | for i in `ls $1/hangs/id*` 20 | do 21 | PCAPNAME=`echo $i | grep pcap` 22 | if [ -z "$PCAPNAME" ]; then 23 | hexdump -C $i > $1/$$.tmp 24 | text2pcap $1/$$.tmp ${i}.pcap 25 | fi 26 | done 27 | rm -f $1/$$.tmp 28 | 29 | echo 30 | echo "Created pcap files:" 31 | ls $1/*/*.pcap 32 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/api/test_sockets.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_SOCKETS_H 2 | #define LWIP_HDR_TEST_SOCKETS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *sockets_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/core/test_def.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DEF_H 2 | #define LWIP_HDR_TEST_DEF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *def_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MEM_H 2 | #define LWIP_HDR_TEST_MEM_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/core/test_netif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_NETIF_H 2 | #define LWIP_HDR_TEST_NETIF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *netif_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/core/test_pbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PBUF_H 2 | #define LWIP_HDR_TEST_PBUF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *pbuf_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/core/test_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TIMERS_H 2 | #define LWIP_HDR_TEST_TIMERS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *timers_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/dhcp/test_dhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DHCP_H 2 | #define LWIP_HDR_TEST_DHCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* dhcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_ETHARP_H 2 | #define LWIP_HDR_TEST_ETHARP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/ip4/test_ip4.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP4_H 2 | #define LWIP_HDR_TEST_IP4_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip4_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/ip6/test_ip6.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP6_H 2 | #define LWIP_HDR_TEST_IP6_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip6_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/mdns/test_mdns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MDNS_H__ 2 | #define LWIP_HDR_TEST_MDNS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mdns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/mqtt/test_mqtt.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MQTT_H__ 2 | #define LWIP_HDR_TEST_MQTT_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mqtt_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_H 2 | #define LWIP_HDR_TEST_TCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_OOS_H 2 | #define LWIP_HDR_TEST_TCP_OOS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip-2.1.2/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_UDP_H 2 | #define LWIP_HDR_TEST_UDP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /components/net/lwip_dhcpd/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | 5 | if GetDepend('RT_USING_LWIP202') or GetDepend('RT_USING_LWIP212') : 6 | src = ['dhcp_server_raw.c'] 7 | else: 8 | src = ['dhcp_server.c'] 9 | 10 | CPPPATH = [cwd] 11 | 12 | group = DefineGroup('lwIP', src, depend = ['RT_USING_LWIP', 'LWIP_USING_DHCPD'], CPPPATH = CPPPATH) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /components/net/lwip_nat/README.md: -------------------------------------------------------------------------------- 1 | lwIP NAT componenent 2 | 3 | If you want to use lwIP NAT componenent, please define LWIP_USING_NAT in rtconfig.h. 4 | 5 | In this case the network 213.129.231.168/29 is nat'ed when packets are sent to the 6 | destination network 10.0.0.0/24 (untypical example - most users will have the other 7 | way around). 8 | 9 | Use following code to add a NAT entry: 10 | 11 | ip_nat_entry_t nat_entry; 12 | 13 | nat_entry.out_if = (struct netif *)&emac_if1; 14 | nat_entry.in_if = (struct netif *)&emac_if2; 15 | IP4_ADDR(&nat_entry.source_net, 213, 129, 231, 168); 16 | IP4_ADDR(&nat_entry.source_netmask, 255, 255, 255, 248); 17 | IP4_ADDR(&nat_entry.dest_net, 10, 0, 0, 0); 18 | IP4_ADDR(&nat_entry.source_netmask, 255, 0, 0, 0); 19 | ip_nat_add(&_nat_entry); 20 | -------------------------------------------------------------------------------- /components/net/lwip_nat/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | 6 | CPPPATH = [cwd] 7 | 8 | group = DefineGroup('lwIP', src, depend = ['RT_USING_LWIP', 'LWIP_USING_NAT'], CPPPATH = CPPPATH) 9 | 10 | Return('group') 11 | -------------------------------------------------------------------------------- /components/net/netdev/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | 7 | src = Glob('src/*.c') 8 | 9 | CPPPATH = [cwd + '/include'] 10 | 11 | group = DefineGroup('SAL', src, depend = ['RT_USING_NETDEV'], CPPPATH = CPPPATH) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /components/net/netdev/include/arpa/inet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | */ 10 | 11 | #ifndef __INET_H__ 12 | #define __INET_H__ 13 | 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /components/net/sal_socket/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | 7 | src = Glob('src/*.c') 8 | src += Glob('socket/net_netdb.c') 9 | 10 | CPPPATH = [cwd + '/include'] 11 | CPPPATH += [cwd + '/include/socket'] 12 | 13 | if GetDepend('SAL_USING_LWIP'): 14 | src += Glob('impl/af_inet_lwip.c') 15 | 16 | if GetDepend('SAL_USING_AT'): 17 | src += Glob('impl/af_inet_at.c') 18 | 19 | if GetDepend('SAL_USING_LWIP') or GetDepend('SAL_USING_AT'): 20 | CPPPATH += [cwd + '/impl'] 21 | 22 | if GetDepend('SAL_USING_TLS'): 23 | src += Glob('impl/proto_mbedtls.c') 24 | 25 | if GetDepend('SAL_USING_POSIX'): 26 | CPPPATH += [cwd + '/include/dfs_net'] 27 | src += Glob('socket/net_sockets.c') 28 | src += Glob('dfs_net/*.c') 29 | 30 | if not GetDepend('HAVE_SYS_SOCKET_H'): 31 | CPPPATH += [cwd + '/include/socket/sys_socket'] 32 | 33 | group = DefineGroup('SAL', src, depend = ['RT_USING_SAL'], CPPPATH = CPPPATH) 34 | 35 | Return('group') 36 | -------------------------------------------------------------------------------- /components/net/sal_socket/impl/af_inet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-08-25 ChenYong First version 9 | */ 10 | 11 | #ifndef __AF_INET_H__ 12 | #define __AF_INET_H__ 13 | 14 | #include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | #ifdef SAL_USING_LWIP 21 | 22 | /* Set lwIP network interface device protocol family information */ 23 | int sal_lwip_netdev_set_pf_info(struct netdev *netdev); 24 | 25 | #endif /* SAL_USING_LWIP */ 26 | 27 | #ifdef SAL_USING_AT 28 | 29 | /* Set AT network interface device protocol family information */ 30 | int sal_at_netdev_set_pf_info(struct netdev *netdev); 31 | 32 | #endif /* SAL_USING_AT */ 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* __AF_INET_H__ */ 39 | -------------------------------------------------------------------------------- /components/net/sal_socket/include/dfs_net/dfs_net.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | * 2016-05-05 Bernard rename dfs_lwip to dfs_net. 10 | */ 11 | 12 | #ifndef DFS_NET_H__ 13 | #define DFS_NET_H__ 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | const struct dfs_file_ops* dfs_net_get_fops(void); 22 | int dfs_net_getsocket(int fd); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /components/net/sal_socket/include/socket/netdb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | * 2018-05-24 ChenYong Add socket abstraction layer 10 | */ 11 | 12 | #ifndef NETDB_H__ 13 | #define NETDB_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include 20 | #include 21 | 22 | struct hostent *gethostbyname(const char *name); 23 | 24 | int gethostbyname_r(const char *name, struct hostent *ret, char *buf, 25 | size_t buflen, struct hostent **result, int *h_errnop); 26 | void freeaddrinfo(struct addrinfo *ai); 27 | int getaddrinfo(const char *nodename, 28 | const char *servname, 29 | const struct addrinfo *hints, 30 | struct addrinfo **res); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /components/net/sal_socket/include/socket/netinet/in.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | */ 10 | 11 | #ifndef IN_H__ 12 | #define IN_H__ 13 | 14 | #include 15 | 16 | #ifndef IN6_IS_ADDR_MULTICAST 17 | #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff) 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /components/net/sal_socket/include/socket/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | */ 10 | 11 | #ifndef TCP_H__ 12 | #define TCP_H__ 13 | 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /components/net/sal_socket/include/socket/netinet/udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2015-02-17 Bernard First version 9 | */ 10 | 11 | #ifndef UDP_H__ 12 | #define UDP_H__ 13 | 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /components/utilities/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/utilities/rt-link/Kconfig: -------------------------------------------------------------------------------- 1 | # Kconfig file for rt_link 2 | menuconfig RT_USING_RT_LINK 3 | bool "RT-Link" 4 | default n 5 | 6 | if RT_USING_RT_LINK 7 | choice 8 | prompt"use hw crc device or not" 9 | default RT_LINK_USING_SF_CRC 10 | 11 | config RT_LINK_USING_SF_CRC 12 | bool "use software crc table" 13 | config RT_LINK_USING_HW_CRC 14 | bool "use hardware crc device" 15 | endchoice 16 | 17 | menu "rt link debug option" 18 | config USING_RT_LINK_DEBUG 19 | bool "Enable RT-Link debug" 20 | default n 21 | config USING_RT_LINK_HW_DEBUG 22 | bool "Enable RT-Link hw debug" 23 | default n 24 | endmenu 25 | endif 26 | -------------------------------------------------------------------------------- /components/utilities/rt-link/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /components/utilities/rt-link/inc/rtlink_hw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-02-02 xiangxistu the first version 9 | * 2021-07-13 Sherman add reconnect API 10 | * 11 | */ 12 | #ifndef __RT_LINK_HW_H__ 13 | #define __RT_LINK_HW_H__ 14 | 15 | #include 16 | 17 | rt_size_t rt_link_hw_recv_len(struct rt_link_receive_buffer *buffer); 18 | void rt_link_hw_copy(rt_uint8_t *dst, rt_uint8_t *src, rt_size_t count); 19 | void rt_link_hw_buffer_point_shift(rt_uint8_t **pointer_address, rt_size_t length); 20 | 21 | rt_err_t rt_link_hw_init(void); 22 | rt_err_t rt_link_hw_deinit(void); 23 | rt_err_t rt_link_hw_reconnect(void); 24 | rt_size_t rt_link_hw_send(void *data, rt_size_t length); 25 | 26 | #endif /* _RT_LINK_PORT_INTERNAL_H_ */ 27 | -------------------------------------------------------------------------------- /components/utilities/rt-link/inc/rtlink_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-05-15 Sherman the first version 9 | */ 10 | #ifndef __RT_LINK_UTILITIES_H__ 11 | #define __RT_LINK_UTILITIES_H__ 12 | 13 | #include 14 | 15 | /* Calculate the number of '1' */ 16 | int rt_link_utils_num1(rt_uint32_t n); 17 | 18 | rt_err_t rt_link_sf_crc32_reset(void); 19 | rt_uint32_t rt_link_sf_crc32(rt_uint8_t *data, rt_size_t len); 20 | 21 | #endif /* __RT_LINK_UTILITIES_H__ */ 22 | -------------------------------------------------------------------------------- /components/utilities/rt-link/src/SConscript: -------------------------------------------------------------------------------- 1 | Import('rtconfig') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Glob('*.c') 6 | CPPPATH = [cwd + '/../inc'] 7 | 8 | group = DefineGroup('rt-link', src, depend = ['RT_USING_RT_LINK'], CPPPATH = CPPPATH) 9 | 10 | if os.path.isfile(os.path.join(cwd, 'hw', 'SConscript')): 11 | group = group + SConscript(os.path.join('hw', 'SConscript')) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /components/utilities/ulog/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | path = [cwd] 6 | 7 | if GetDepend('ULOG_BACKEND_USING_CONSOLE'): 8 | src += ['backend/console_be.c'] 9 | 10 | if GetDepend('ULOG_USING_SYSLOG'): 11 | path += [cwd + '/syslog'] 12 | src += Glob('syslog/*.c') 13 | 14 | group = DefineGroup('Utilities', src, depend = ['RT_USING_ULOG'], CPPPATH = path) 15 | 16 | Return('group') 17 | -------------------------------------------------------------------------------- /components/utilities/utest/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | group = DefineGroup('UTest', src, depend = ['RT_USING_UTEST'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/utilities/utest/utest_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-11-19 MurphyZhao the first version 9 | */ 10 | 11 | #ifndef __UTEST_LOG_H__ 12 | #define __UTEST_LOG_H__ 13 | 14 | #include 15 | 16 | #define UTEST_DEBUG 17 | 18 | #undef DBG_TAG 19 | #undef DBG_LVL 20 | 21 | #define DBG_TAG "testcase" 22 | #ifdef UTEST_DEBUG 23 | #define DBG_LVL DBG_LOG 24 | #else 25 | #define DBG_LVL DBG_INFO 26 | #endif 27 | #include 28 | 29 | #define UTEST_LOG_ALL (1u) 30 | #define UTEST_LOG_ASSERT (2u) 31 | 32 | void utest_log_lv_set(rt_uint8_t lv); 33 | 34 | #endif /* __UTEST_LOG_H__ */ 35 | -------------------------------------------------------------------------------- /components/utilities/var_export/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Glob('*.c') 5 | CPPPATH = [cwd] 6 | group = DefineGroup('var_export', src, depend = ['RT_USING_VAR_EXPORT'], CPPPATH = CPPPATH) 7 | 8 | Return('group') 9 | -------------------------------------------------------------------------------- /components/utilities/ymodem/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = Split(''' 5 | ymodem.c 6 | ''') 7 | 8 | CPPPATH = [cwd] 9 | 10 | if GetDepend('YMODEM_USING_FILE_TRANSFER'): 11 | src += ['ry_sy.c'] 12 | 13 | group = DefineGroup('Utilities', src, depend = ['RT_USING_RYM'], CPPPATH = CPPPATH) 14 | 15 | Return('group') 16 | -------------------------------------------------------------------------------- /components/vbus/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | import SCons, os 4 | from building import * 5 | 6 | group = [] 7 | if not GetDepend(['RT_USING_VBUS']): 8 | Return('group') 9 | 10 | cwd = GetCurrentDir() 11 | src = Glob('*.c') 12 | 13 | for c, f in [['RT_USING_VBUS_RFS', 'utilities/rfs.c'], 14 | ['RT_USING_VBUS_RSHELL', 'utilities/rshell.c'], 15 | ]: 16 | if GetDepend(c): 17 | src += Glob(f) 18 | 19 | CPPPATH = [cwd, os.path.join(cwd, 'share_hdr')] 20 | 21 | group = DefineGroup('VBus', src, depend = ['RT_USING_VBUS'], CPPPATH = CPPPATH) 22 | 23 | Return('group') 24 | -------------------------------------------------------------------------------- /components/vmm/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') 7 | src += Glob('utilities/rshell.c') 8 | if GetDepend('RT_USING_VMM_RFS'): 9 | src += Glob('utilities/rfs.c') 10 | 11 | CPPPATH = [cwd, os.path.join(cwd, 'share_hdr')] 12 | 13 | group = DefineGroup('VMM', src, depend = ['RT_USING_VMM'], CPPPATH = CPPPATH) 14 | 15 | Return('group') 16 | -------------------------------------------------------------------------------- /components/vmm/vmm_context.h: -------------------------------------------------------------------------------- 1 | /* 2 | * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd 3 | * All rights reserved 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | * 7 | * Change Logs: 8 | * Date Author Notes 9 | * 2013-11-04 Grissiom add comment 10 | */ 11 | 12 | #ifndef __VMM_CONTEXT_H__ 13 | #define __VMM_CONTEXT_H__ 14 | 15 | #include // for struct rt_hw_stack 16 | 17 | #include "vmm.h" 18 | 19 | void vmm_context_init(void *context_addr); 20 | #ifdef RT_VMM_USING_DOMAIN 21 | void vmm_context_init_domain(struct vmm_domain *domain); 22 | #endif 23 | void vmm_virq_pending(int irq); 24 | void vmm_verify_guest_status(struct rt_hw_stack *sp); 25 | 26 | void vmm_show_guest(void); 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /components/vmm/vmm_vector.c: -------------------------------------------------------------------------------- 1 | /* 2 | * VMM vector handle 3 | * 4 | * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd 5 | * All rights reserved 6 | * 7 | * SPDX-License-Identifier: Apache-2.0 8 | * 9 | * Change Logs: 10 | * Date Author Notes 11 | * 2013-06-15 Bernard the first verion 12 | */ 13 | #include 14 | #include 15 | #include 16 | #include "vmm.h" 17 | 18 | void vmm_guest_isr(int irqno, void* parameter) 19 | { 20 | /* nothing, let GuestOS to handle it */ 21 | rt_hw_interrupt_clear(irqno); 22 | } 23 | 24 | void vmm_vector_init(void) 25 | { 26 | rt_hw_interrupt_install(RT_VMM_VIRQ_TRIGGER, vmm_guest_isr, RT_NULL, "virq"); 27 | rt_hw_interrupt_umask(RT_VMM_VIRQ_TRIGGER); 28 | 29 | return; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /documentation/doxygen/Kernel_Object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/Kernel_Object.png -------------------------------------------------------------------------------- /documentation/doxygen/System_Arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/System_Arch.png -------------------------------------------------------------------------------- /documentation/doxygen/Thread_Scheduler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/Thread_Scheduler.png -------------------------------------------------------------------------------- /documentation/doxygen/basicdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is only used for doxygen document generation. 3 | */ 4 | 5 | /** 6 | * @defgroup BasicDef Basic Definitions 7 | * 8 | * @brief Basic data type in RT-Thread RTOS. 9 | * 10 | * These are the basic definitions which used in RT-Thread RTOS. In general, 11 | * RT-Thread kernel uses its own definition of the basic data types, such as 12 | * rt_uint32_t, rt_uint8_t, etc., which does not depend on the compiler or 13 | * architecture. 14 | */ 15 | -------------------------------------------------------------------------------- /documentation/doxygen/dfs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/dfs.png -------------------------------------------------------------------------------- /documentation/doxygen/finsh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is only used for doxygen document generation. 3 | */ 4 | 5 | /** 6 | * @defgroup finsh finsh shell 7 | * 8 | * @brief finsh shell is a user command shell in RT-Thread RTOS. 9 | * 10 | * finsh shell is a user command shell in RT-Thread RTOS, which is a shell can 11 | * accept C-expression like syntax in command. From finsh shell, user can access 12 | * system area, such as memory, variables and function by input C-expression in 13 | * command. 14 | * 15 | * @image html finsh.png "Figure 3: finsh shell architecture" 16 | * There is a shell thread, which named as "tshell", in the finsh shell, it read 17 | * user command from console device, and then invokes system function or access 18 | * system variable to output result (by rt_kprintf). 19 | */ 20 | -------------------------------------------------------------------------------- /documentation/doxygen/finsh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/finsh.png -------------------------------------------------------------------------------- /documentation/doxygen/module.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is only used for doxygen document generation. 3 | */ 4 | 5 | /** 6 | * @defgroup Module Application Module 7 | * 8 | * @brief Application Module is a feature let user to execute application in RT-Thread RTOS. 9 | * 10 | * Application Module is implemented as dynamic object loader, but it can handle 11 | * the dependences relationship between application and dynamic library, moreover, 12 | * it also can handle the kernel object destroy and memory release issue when application 13 | * (abnormally) exit. 14 | */ 15 | -------------------------------------------------------------------------------- /documentation/doxygen/rtthread_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/doxygen/rtthread_logo.png -------------------------------------------------------------------------------- /documentation/figures/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/architecture.png -------------------------------------------------------------------------------- /documentation/figures/architecturezh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/architecturezh.png -------------------------------------------------------------------------------- /documentation/figures/env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/env.png -------------------------------------------------------------------------------- /documentation/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/logo.png -------------------------------------------------------------------------------- /documentation/figures/qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/qrcode.jpg -------------------------------------------------------------------------------- /documentation/figures/studio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/studio.gif -------------------------------------------------------------------------------- /documentation/figures/studiozh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/documentation/figures/studiozh.gif -------------------------------------------------------------------------------- /examples/kernel/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | src = Split(""" 4 | tc_comm.c 5 | thread_static.c 6 | thread_dynamic.c 7 | thread_priority.c 8 | thread_same_priority.c 9 | thread_static_simple.c 10 | thread_dynamic_simple.c 11 | thread_delete.c 12 | thread_detach.c 13 | thread_yield.c 14 | thread_suspend.c 15 | thread_resume.c 16 | semaphore_static.c 17 | semaphore_dynamic.c 18 | semaphore_priority.c 19 | semaphore_buffer_worker.c 20 | semaphore_producer_consumer.c 21 | mutex_simple.c 22 | mutex_priority.c 23 | event_simple.c 24 | mbox_simple.c 25 | mbox_send_wait.c 26 | messageq_simple.c 27 | timer_static.c 28 | timer_dynamic.c 29 | timer_stop_self.c 30 | timer_control.c 31 | timer_timeout.c 32 | heap_malloc.c 33 | heap_realloc.c 34 | memp_simple.c 35 | tc_sample.c 36 | """) 37 | 38 | group = DefineGroup('Examples', src, 39 | depend = ['RT_USING_TC'], 40 | CPPPATH=[GetCurrentDir()]) 41 | 42 | Return('group') 43 | -------------------------------------------------------------------------------- /examples/libc/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | src = Glob('*.c') 4 | group = DefineGroup('UTest', src, depend = ['RT_USING_NEWLIB', 'RT_USING_PTHREADS']) 5 | 6 | Return('group') 7 | -------------------------------------------------------------------------------- /examples/libc/env.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 Bernard first version 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | int libc_env() 16 | { 17 | printf("PATH=%s\n", getenv("PATH")); 18 | putenv("foo=bar"); 19 | printf("foo=%s\n", getenv("foo")); 20 | return 0; 21 | } 22 | FINSH_FUNCTION_EXPORT(libc_env, get/set_env test); 23 | -------------------------------------------------------------------------------- /examples/libc/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2010-11-17 Bernard first version 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | int speed() 16 | { 17 | int i; 18 | time_t t; 19 | 20 | printf("%d\n", time(0)); 21 | for (i = 0; i < 10000000; ++i) 22 | t = time(0); 23 | 24 | printf("%d\n", time(0)); 25 | return 0; 26 | } 27 | FINSH_FUNCTION_EXPORT(speed, speed test); 28 | -------------------------------------------------------------------------------- /examples/network/tcp_client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import socket 4 | 5 | s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) 6 | 7 | s.connect(('192.168.10.110',6001)) 8 | 9 | print s.recv(1024) 10 | 11 | for data in ['rtt_nano','rtt_thread','rtt_bsp']: 12 | s.send(data) 13 | print s.recv(1024) 14 | 15 | s.send('exit') 16 | s.close() -------------------------------------------------------------------------------- /examples/network/tcp_server.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | #引入模块 3 | import socket 4 | import threading 5 | import time 6 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 7 | 8 | # 监听端口: 9 | s.bind(('192.168.10.110', 6001)) 10 | 11 | s.listen(5) 12 | print 'Waiting for connection...' 13 | 14 | def tcp_link(sock,addr): 15 | print 'Accept new connection from %s:%s...' % addr 16 | sock.send('Welcome to RT-Thread!') 17 | while True: 18 | data=sock.recv(1024) 19 | time.sleep(1) 20 | if data=='exit' or not data: 21 | break 22 | print data 23 | sock.send('Hello,%s!'%data) 24 | sock.close() 25 | print 'Connection from %s:%s closed.'%addr 26 | 27 | while True: 28 | 29 | #接受一个新连接 30 | sock,addr=s.accept() 31 | 32 | #创建新线程来处理TCP连接 33 | t=threading.Thread(target=tcp_link(sock,addr)) 34 | 35 | -------------------------------------------------------------------------------- /examples/utest/configs/kernel/ipc.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_SEMAPHORE_TC=y 2 | CONFIG_UTEST_EVENT_TC=y 3 | CONFIG_UTEST_MESSAGEQUEUE_TC=y 4 | CONFIG_UTEST_SIGNAL_TC=y 5 | CONFIG_UTEST_MUTEX_TC=y 6 | CONFIG_UTEST_MAILBOX_TC=y 7 | # dependencies 8 | CONFIG_RT_USING_SEMAPHORE=y 9 | CONFIG_RT_USING_EVENT=y 10 | CONFIG_RT_USING_MESSAGEQUEUE=y 11 | CONFIG_RT_USING_SIGNALS=y 12 | CONFIG_RT_USING_MUTEX=y 13 | CONFIG_RT_USING_MAILBOX=y 14 | -------------------------------------------------------------------------------- /examples/utest/configs/kernel/irq.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_IRQ_TC=y 2 | # dependencies 3 | -------------------------------------------------------------------------------- /examples/utest/configs/kernel/mem.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_MEMHEAP_TC=y 2 | 3 | # dependencies 4 | CONFIG_RT_USING_MEMHEAP=y 5 | -------------------------------------------------------------------------------- /examples/utest/configs/kernel/thread.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_THREAD_TC=y 2 | # dependencies 3 | CONFIG_RT_USING_TIMER_SOFT=y 4 | CONFIG_RT_USING_THREAD=y 5 | -------------------------------------------------------------------------------- /examples/utest/configs/kernel/timer.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_TIMER_TC=y 2 | 3 | # dependencies 4 | CONFIG_RT_USING_TIMER_SOFT=y 5 | -------------------------------------------------------------------------------- /examples/utest/configs/utest_self/self.conf: -------------------------------------------------------------------------------- 1 | CONFIG_UTEST_SELF_PASS_TC=y 2 | -------------------------------------------------------------------------------- /examples/utest/testcases/Kconfig: -------------------------------------------------------------------------------- 1 | menu "RT-Thread Utestcases" 2 | 3 | config RT_USING_UTESTCASES 4 | bool "RT-Thread Utestcases" 5 | default n 6 | select RT_USING_UTEST 7 | 8 | if RT_USING_UTESTCASES 9 | 10 | source "$RTT_DIR/examples/utest/testcases/utest/Kconfig" 11 | source "$RTT_DIR/examples/utest/testcases/kernel/Kconfig" 12 | source "$RTT_DIR/examples/utest/testcases/drivers/serial_v2/Kconfig" 13 | 14 | endif 15 | 16 | endmenu 17 | -------------------------------------------------------------------------------- /examples/utest/testcases/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /examples/utest/testcases/drivers/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | cwd = GetCurrentDir() 7 | objs = [] 8 | list = os.listdir(cwd) 9 | 10 | for d in list: 11 | path = os.path.join(cwd, d) 12 | if os.path.isfile(os.path.join(path, 'SConscript')): 13 | objs = objs + SConscript(os.path.join(d, 'SConscript')) 14 | 15 | Return('objs') 16 | -------------------------------------------------------------------------------- /examples/utest/testcases/drivers/serial_v2/Kconfig: -------------------------------------------------------------------------------- 1 | menu "Utest Serial Testcase" 2 | 3 | config UTEST_SERIAL_TC 4 | bool "Serial testcase" 5 | default n 6 | 7 | endmenu 8 | -------------------------------------------------------------------------------- /examples/utest/testcases/drivers/serial_v2/SConscript: -------------------------------------------------------------------------------- 1 | Import('rtconfig') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(''' 6 | uart_rxb_txnb.c 7 | uart_rxb_txb.c 8 | uart_rxnb_txb.c 9 | uart_rxnb_txnb.c 10 | ''') 11 | 12 | CPPPATH = [cwd] 13 | 14 | group = DefineGroup('utestcases', src, depend = ['UTEST_SERIAL_TC'], CPPPATH = CPPPATH) 15 | 16 | Return('group') 17 | -------------------------------------------------------------------------------- /examples/utest/testcases/utest/Kconfig: -------------------------------------------------------------------------------- 1 | menu "Utest Self Testcase" 2 | 3 | config UTEST_SELF_PASS_TC 4 | bool "Pass test" 5 | default y 6 | 7 | endmenu 8 | -------------------------------------------------------------------------------- /examples/utest/testcases/utest/SConscript: -------------------------------------------------------------------------------- 1 | Import('rtconfig') 2 | from building import * 3 | 4 | cwd = GetCurrentDir() 5 | src = Split(''' 6 | pass_tc.c 7 | ''') 8 | 9 | CPPPATH = [cwd] 10 | 11 | group = DefineGroup('utestcases', src, depend = ['UTEST_SELF_PASS_TC'], CPPPATH = CPPPATH) 12 | 13 | Return('group') 14 | -------------------------------------------------------------------------------- /examples/ymodem/null.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | */ 9 | 10 | #include 11 | 12 | static enum rym_code _rym_dummy_write( 13 | struct rym_ctx *ctx, 14 | rt_uint8_t *buf, 15 | rt_size_t len) 16 | { 17 | return RYM_CODE_ACK; 18 | } 19 | 20 | #ifdef RT_USING_FINSH 21 | #include 22 | rt_err_t rym_null(char *devname) 23 | { 24 | struct rym_ctx rctx; 25 | rt_device_t dev = rt_device_find(devname); 26 | if (!dev) 27 | { 28 | rt_kprintf("could not find device %s\n", devname); 29 | return -1; 30 | } 31 | 32 | return rym_recv_on_device(&rctx, dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX, 33 | RT_NULL, _rym_dummy_write, RT_NULL, 1000); 34 | } 35 | FINSH_FUNCTION_EXPORT(rym_null, dump data to null); 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /libcpu/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | Import('rtconfig') 7 | 8 | cwd = GetCurrentDir() 9 | group = [] 10 | list = os.listdir(cwd) 11 | 12 | if rtconfig.ARCH in list: 13 | group = group + SConscript(os.path.join(rtconfig.ARCH, 'SConscript')) 14 | 15 | Return('group') 16 | -------------------------------------------------------------------------------- /libcpu/risc-v/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | Import('rtconfig') 7 | 8 | cwd = GetCurrentDir() 9 | group = [] 10 | list = os.listdir(cwd) 11 | 12 | # add common code files 13 | if rtconfig.CPU == "c906" : 14 | group = group 15 | else : 16 | group = group + SConscript(os.path.join(cwd, 'common', 'SConscript')) 17 | 18 | 19 | # cpu porting code files 20 | group = group + SConscript(os.path.join(cwd, rtconfig.CPU, 'SConscript')) 21 | 22 | Return('group') 23 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | Import('rtconfig') 6 | 7 | cwd = GetCurrentDir() 8 | src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S') 9 | CPPPATH = [cwd] 10 | ASFLAGS = '' 11 | 12 | group = DefineGroup('cpu', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS) 13 | 14 | Return('group') 15 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/asm/sbiasm.h: -------------------------------------------------------------------------------- 1 | #ifndef _SBI_ASM_H 2 | #define _SBI_ASM_H 3 | 4 | .macro SBI_CALL which 5 | li a7, \which 6 | ecall 7 | nop 8 | .endm 9 | 10 | #endif /* _SBI_ASM_H */ 11 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/asm/sbidef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019-2020, Xim 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | */ 7 | #ifndef _ASM_SBI_DEF_H 8 | #define _ASM_SBI_DEF_H 9 | 10 | #define SBI_SET_TIMER 0 11 | #define SBI_CONSOLE_PUTCHAR 1 12 | #define SBI_CONSOLE_GETCHAR 2 13 | #define SBI_CLEAR_IPI 3 14 | #define SBI_SEND_IPI 4 15 | #define SBI_REMOTE_FENCE_I 5 16 | #define SBI_REMOTE_SFENCE_VMA 6 17 | #define SBI_REMOTE_SFENCE_VMA_ASID 7 18 | #define SBI_SHUTDOWN 8 19 | 20 | #define SBI_CONSOLE_PUTSTR 9 21 | 22 | #define SBI_SD_WRITE 10 23 | #define SBI_SD_READ 11 24 | #define SBI_NET_WRITE 12 25 | #define SBI_NET_READ 13 26 | 27 | #endif /* _ASM_SBI_DEF_H */ 28 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-11-05 JasonHu The first version 9 | */ 10 | 11 | #ifndef CACHE_H__ 12 | #define CACHE_H__ 13 | 14 | void rt_hw_cpu_dcache_clean(void *addr,int size); 15 | void rt_hw_cpu_icache_invalidate(void *addr,int size); 16 | void rt_hw_cpu_dcache_invalidate(void *addr,int size); 17 | 18 | void rt_hw_cpu_dcache_clean_flush(void *addr,int size); 19 | void rt_hw_cpu_dcache_clean_all(void); 20 | void rt_hw_cpu_dcache_invalidate_all(void); 21 | void rt_hw_cpu_icache_invalidate_all(void); 22 | 23 | #endif /* CACHE_H__ */ 24 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/clint.h: -------------------------------------------------------------------------------- 1 | #ifndef CLINT_H__ 2 | #define CLINT_H__ 3 | 4 | #define D1_MSIP0 0x14000000 5 | #define D1_MTIMECMPL0 0x14004000 6 | #define D1_MTIMECMPH0 0x14004004 7 | #define D1_MTIME 0x1400BFF8 8 | 9 | #define D1_SSIP0 0x1400C000 10 | #define D1_STIMECMPL0 0x1400D000 11 | #define D1_STIMECMPH0 0x1400D004 12 | 13 | void clint_timer_cmp_set_val(int val); 14 | void clint_soft_irq_clear(void); 15 | void clint_soft_irq_init(void); 16 | 17 | #define CLINT (0x14000000L) 18 | #define CLINT_MTIMECMPL(hartid) (CLINT + 0x4000 + 4*(hartid)) 19 | #define CLINT_MTIMECMPH(hartid) (CLINT + 0x4004 + 4*(hartid)) 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/page.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2019-11-01 Jesven The first version 9 | */ 10 | 11 | #ifndef __PAGE_H__ 12 | #define __PAGE_H__ 13 | 14 | #ifdef RT_USING_USERSPACE 15 | 16 | typedef struct tag_region 17 | { 18 | size_t start; 19 | size_t end; 20 | } rt_region_t; 21 | 22 | void rt_page_init(rt_region_t reg); 23 | 24 | void *rt_pages_alloc(uint32_t size_bits); 25 | 26 | void rt_page_ref_inc(void *addr, uint32_t size_bits); 27 | 28 | int rt_page_ref_get(void *addr, uint32_t size_bits); 29 | 30 | int rt_pages_free(void *addr, uint32_t size_bits); 31 | 32 | void rt_pageinfo_dump(void); 33 | 34 | size_t rt_page_bits(size_t size); 35 | 36 | void rt_page_get_info(size_t *total_nr, size_t *free_nr); 37 | 38 | #endif 39 | 40 | #endif /*__PAGE_H__*/ 41 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/riscv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-01-30 lizhirui first version 9 | */ 10 | 11 | #ifndef __RISCV_H__ 12 | #define __RISCV_H__ 13 | 14 | #include 15 | 16 | #define __SIZE(bit) (1UL << (bit)) 17 | #define __MASK(bit) (__SIZE(bit) - 1UL) 18 | #define __UMASK(bit) (~(__MASK(bit))) 19 | #define __MASKVALUE(value,maskvalue) ((value) & (maskvalue)) 20 | #define __UMASKVALUE(value,maskvalue) ((value) & (~(maskvalue))) 21 | #define __CHECKUPBOUND(value,bit_count) (!(((rt_size_t)value) & (~__MASK(bit_count)))) 22 | #define __CHECKALIGN(value,start_bit) (!(((rt_size_t)value) & (__MASK(start_bit)))) 23 | 24 | #define __PARTBIT(value,start_bit,length) (((value) >> (start_bit)) & __MASK(length)) 25 | 26 | #define __ALIGNUP(value,bit) (((value) + __MASK(bit)) & __UMASK(bit)) 27 | #define __ALIGNDOWN(value,bit) ((value) & __UMASK(bit)) 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/riscv_mmu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2021-01-30 lizhirui first version 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "riscv_mmu.h" 20 | 21 | void mmu_set_pagetable(rt_ubase_t addr) 22 | { 23 | RT_ASSERT(__CHECKALIGN(addr,PAGE_OFFSET_BIT)); 24 | RT_ASSERT(__CHECKUPBOUND(addr,PHYSICAL_ADDRESS_WIDTH_BITS)); 25 | write_csr(satp,(((size_t)8) << 60) | (addr >> PAGE_OFFSET_BIT)); 26 | mmu_flush_tlb(); 27 | } 28 | 29 | void mmu_enable_user_page_access() 30 | { 31 | set_csr(sstatus,SSTATUS_PUM); 32 | } 33 | 34 | void mmu_disable_user_page_access() 35 | { 36 | clear_csr(sstatus,SSTATUS_PUM); 37 | } 38 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/tick.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018/10/28 Bernard The unify RISC-V porting code. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include "sbi.h" 16 | #include "tick.h" 17 | 18 | static volatile uint64_t time_elapsed = 0; 19 | static volatile unsigned long tick_cycles = 0; 20 | 21 | static unsigned long tick_delta = TIMER_CLK_FREQ / RT_TICK_PER_SECOND; 22 | 23 | static uint64_t get_ticks() 24 | { 25 | __asm__ __volatile__( 26 | "rdtime %0" 27 | : "=r"(time_elapsed)); 28 | return time_elapsed; 29 | } 30 | 31 | int tick_isr(void) 32 | { 33 | //clint_timer_init(); 34 | clint_timer_cmp_set_val(100); 35 | rt_tick_increase(); 36 | return 0; 37 | } 38 | 39 | /* Sets and enable the timer interrupt */ 40 | int rt_hw_tick_init(void) 41 | { 42 | clint_timer_init(); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /libcpu/risc-v/c906/tick.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018/10/28 Bernard The unify RISC-V porting code. 9 | */ 10 | 11 | #ifndef TICK_H__ 12 | #define TICK_H__ 13 | 14 | /* timer clock is 24 MHZ */ 15 | #define TIMER_CLK_FREQ (24000000) 16 | 17 | int tick_isr(void); 18 | int rt_hw_tick_init(void); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libcpu/risc-v/common/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for component 2 | 3 | from building import * 4 | 5 | cwd = GetCurrentDir() 6 | src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S') 7 | CPPPATH = [cwd] 8 | ASFLAGS = '' 9 | 10 | group = DefineGroup('cpu', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS) 11 | 12 | Return('group') 13 | -------------------------------------------------------------------------------- /libcpu/risc-v/common/cpuport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2018, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2018-10-03 Bernard The first version 9 | */ 10 | 11 | #ifndef CPUPORT_H__ 12 | #define CPUPORT_H__ 13 | 14 | #include 15 | 16 | /* bytes of register width */ 17 | #ifdef ARCH_CPU_64BIT 18 | #define STORE sd 19 | #define LOAD ld 20 | #define REGBYTES 8 21 | #else 22 | #define STORE sw 23 | #define LOAD lw 24 | #define REGBYTES 4 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/SConscript: -------------------------------------------------------------------------------- 1 | Import('RTT_ROOT') 2 | Import('rtconfig') 3 | from building import * 4 | 5 | src = Glob('*.c') 6 | 7 | CPPPATH = [RTT_ROOT + '/include'] 8 | 9 | if GetDepend('RT_USING_SMALL_MEM') == False: 10 | SrcRemove(src, ['mem.c']) 11 | 12 | if GetDepend('RT_USING_SLAB') == False: 13 | SrcRemove(src, ['slab.c']) 14 | 15 | if GetDepend('RT_USING_MEMPOOL') == False: 16 | SrcRemove(src, ['mempool.c']) 17 | 18 | if GetDepend('RT_USING_MEMHEAP') == False: 19 | SrcRemove(src, ['memheap.c']) 20 | 21 | if GetDepend('RT_USING_SIGNALS') == False: 22 | SrcRemove(src, ['signal.c']) 23 | 24 | if GetDepend('RT_USING_DEVICE') == False: 25 | SrcRemove(src, ['device.c']) 26 | 27 | if GetDepend('RT_USING_SMP') == False: 28 | SrcRemove(src, ['cpu.c']) 29 | 30 | CPPDEFINES = ['__RTTHREAD__'] 31 | 32 | group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) 33 | 34 | Return('group') 35 | -------------------------------------------------------------------------------- /tools/.ignore_format.yml: -------------------------------------------------------------------------------- 1 | # files format check exclude path, please follow the instructions below to modify; 2 | # If you need to exclude an entire folder, add the folder path in dir_path; 3 | # If you need to exclude a file, add the path to the file in file_path. 4 | 5 | dir_path: 6 | - kconfig-frontends 7 | -------------------------------------------------------------------------------- /tools/__pycache__/building.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/__pycache__/building.cpython-37.pyc -------------------------------------------------------------------------------- /tools/__pycache__/gcc.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/__pycache__/gcc.cpython-37.pyc -------------------------------------------------------------------------------- /tools/__pycache__/menuconfig.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/__pycache__/menuconfig.cpython-37.pyc -------------------------------------------------------------------------------- /tools/__pycache__/mkdist.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/__pycache__/mkdist.cpython-37.pyc -------------------------------------------------------------------------------- /tools/__pycache__/utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/__pycache__/utils.cpython-37.pyc -------------------------------------------------------------------------------- /tools/as.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | astyle --style=allman --indent=spaces=4 --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name --lineend=linux --convert-tabs --verbose $1 4 | -------------------------------------------------------------------------------- /tools/codelite_template.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tools/genconf.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def genconfig() : 4 | from SCons.Script import SCons 5 | 6 | PreProcessor = SCons.cpp.PreProcessor() 7 | 8 | try: 9 | f = open('rtconfig.h', 'r') 10 | contents = f.read() 11 | f.close() 12 | except : 13 | print("Open rtconfig.h file failed.") 14 | 15 | PreProcessor.process_contents(contents) 16 | options = PreProcessor.cpp_namespace 17 | 18 | try: 19 | f = open('.config', 'w') 20 | for (opt, value) in options.items(): 21 | if type(value) == type(1): 22 | f.write("CONFIG_%s=%d\n" % (opt, value)) 23 | 24 | if type(value) == type('') and value == '': 25 | f.write("CONFIG_%s=y\n" % opt) 26 | elif type(value) == type('str'): 27 | f.write("CONFIG_%s=%s\n" % (opt, value)) 28 | 29 | print("Generate .config done!") 30 | f.close() 31 | except: 32 | print("Generate .config file failed.") 33 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/.sconsign.dblite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/kconfig-frontends/.sconsign.dblite -------------------------------------------------------------------------------- /tools/kconfig-frontends/.version: -------------------------------------------------------------------------------- 1 | 4.11.0 a351e9b9fc24e982ec2f0e76379a49826036da12 Fearless Coyote 2 | 1 3 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors of kconfig-frontends. 2 | 3 | The developers of the Linux kernel are the original authors of the kconfig 4 | parser and frontends. The list is too long to reproduce here, but you can 5 | get a pretty complete list from the Linux kernel repository logs: 6 | git shortlog scripts/kconfig 7 | 8 | The packaging uses the GNU autotools build system, of which I 9 | will not try to list the many authors here. 10 | 11 | The initial packaging was done by: 12 | "Yann E. MORIN" 13 | 14 | For a complete list, see the commit-logs of the kconfig repository. 15 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/SConstruct: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | env = Environment() 4 | env['CPPPATH'] = ['libs/parser', 'libs'] 5 | env['CPPDEFINES'] = ['CURSES_LOC=\\"ncurses.h\\"', 'HAVE_CONFIG_H', 6 | 'ROOTMENU=\\"Configuration\\"', 7 | 'CONFIG_=\\"CONFIG_\\"', 8 | 'KBUILD_NO_NLS', 9 | 'GPERF_LEN_TYPE=unsigned int'] 10 | env['LIBS'] = ['ncurses'] 11 | 12 | src = Split(''' 13 | libs/lxdialog/checklist.c 14 | libs/lxdialog/inputbox.c 15 | libs/lxdialog/menubox.c 16 | libs/lxdialog/textbox.c 17 | libs/lxdialog/util.c 18 | libs/lxdialog/yesno.c 19 | 20 | libs/parser/yconf.c 21 | 22 | frontends/mconf/mconf.c 23 | ''') 24 | 25 | env.Program('kconfig-mconf', src) 26 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/frontends/kconfig.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | LIST="@KCFG_LIST@" 4 | 5 | main() { 6 | local kcfg="${1}"; shift 7 | local k 8 | 9 | case "${kcfg}" in 10 | "") error "what should I do (see -h)?\n";; 11 | -h|--help) help; exit 0;; 12 | -*) error "no such option '%s'\n" "${kcfg}";; 13 | esac 14 | 15 | for k in ${LIST}; do 16 | if [ "${kcfg}" = "${k}" ]; then 17 | exec kconfig-${kcfg} "${@}" 18 | error "cannot execute tool '%s'\n" "${kcfg}" 19 | fi 20 | done 21 | error "no such tool '%s'\n" "${kcfg}" 22 | } 23 | 24 | help() { 25 | cat <<-_EOF_ 26 | NAME 27 | kconfig - meta-frontend to kconfig tools 28 | 29 | SYNOPSIS 30 | kconfig -h|--help 31 | kconfig [option ...] 32 | 33 | DESCRIPTION 34 | kconfig is the meta-frontend to all other kconfig tools: 35 | ${LIST} 36 | 37 | The acceptable options depend on what tool is being called. 38 | _EOF_ 39 | } 40 | 41 | error() { 42 | local fmt="${1}"; shift 43 | 44 | printf "kconfig: ${fmt}" "${@}" >&2 45 | exit 1 46 | } 47 | 48 | main "${@}" 49 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/frontends/qconf/qconf.cc.patch: -------------------------------------------------------------------------------- 1 | diff --git a/frontends/qconf/qconf.cc b/frontends/qconf/qconf.cc 2 | --- a/frontends/qconf/qconf.cc 3 | +++ b/frontends/qconf/qconf.cc 4 | @@ -32,7 +32,7 @@ 5 | #include "qconf.h" 6 | 7 | #include "qconf.moc" 8 | -#include "images.c" 9 | +#include "images.h" 10 | 11 | #ifdef _ 12 | # undef _ 13 | @@ -318,7 +318,7 @@ 14 | showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), 15 | rootEntry(0), headerPopup(0) 16 | { 17 | - int i; 18 | + int i __attribute__((unused)); 19 | 20 | setObjectName(name); 21 | setSortingEnabled(false); 22 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/kconfig-mconf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigmagic123/d1-nezha-rtthread/a310aac5fb12b2fc7667014057843ebc16f5daf8/tools/kconfig-frontends/kconfig-mconf -------------------------------------------------------------------------------- /tools/kconfig-frontends/libs/parser/hconf.gperf.patch: -------------------------------------------------------------------------------- 1 | diff --git a/libs/parser/hconf.gperf b/libs/parser/hconf.gperf 2 | index ead02ed..e5f0af7 100644 3 | --- a/libs/parser/hconf.gperf 4 | +++ b/libs/parser/hconf.gperf 5 | @@ -9,7 +9,7 @@ 6 | 7 | struct kconf_id; 8 | 9 | -static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); 10 | +static const struct kconf_id *kconf_id_lookup(register const char *str, register GPERF_LEN_TYPE len); 11 | 12 | %% 13 | mainmenu, T_MAINMENU, TF_COMMAND 14 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/libs/parser/kconfig-parser.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=${prefix}/include 5 | 6 | Name: kconfig-parser 7 | Description: kconfig-parser library 8 | Requires: 9 | Version: @KCONFIGPARSER_LIB_VERSION@ 10 | Libs: -L${libdir} -lkconfig-parser 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/libs/parser/yconf.y.patch: -------------------------------------------------------------------------------- 1 | --- a/libs/parser/yconf.y 2012-01-12 22:37:17.582339777 +0100 2 | +++ b/libs/parser/yconf.y 2012-03-03 23:55:29.889737630 +0100 3 | @@ -102,7 +102,7 @@ 4 | 5 | %{ 6 | /* Include zconf.hash.c here so it can see the token constants. */ 7 | -#include "zconf.hash.c" 8 | +#include "hconf.c" 9 | %} 10 | 11 | %% 12 | @@ -509,7 +509,7 @@ 13 | 14 | sym_init(); 15 | _menu_init(); 16 | - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 17 | + rootmenu.prompt = menu_add_prompt(P_MENU, ROOTMENU, NULL); 18 | 19 | if (getenv("ZCONF_DEBUG")) 20 | zconfdebug = 1; 21 | @@ -746,7 +746,7 @@ 22 | } 23 | } 24 | 25 | -#include "zconf.lex.c" 26 | +#include "lconf.c" 27 | #include "util.c" 28 | #include "confdata.c" 29 | #include "expr.c" 30 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/scripts/.autostuff/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /tools/kconfig-frontends/utils/kconfig-tweak.in.patch: -------------------------------------------------------------------------------- 1 | diff --git a/utils/kconfig-tweak.in b/utils/kconfig-tweak.in 2 | --- a/utils/kconfig-tweak.in 3 | +++ b/utils/kconfig-tweak.in 4 | @@ -3,8 +3,8 @@ 5 | 6 | myname=${0##*/} 7 | 8 | -# If no prefix forced, use the default CONFIG_ 9 | -CONFIG_="${CONFIG_-CONFIG_}" 10 | +# If no prefix forced, use the default @CONFIG_@ 11 | +CONFIG_="${CONFIG_-@CONFIG_@}" 12 | 13 | usage() { 14 | cat >&2 <