├── README.md
├── WIZ550web_Firmware
├── WIZ550web_HW_Rev1.0
│ ├── WIZ550web_App
│ │ ├── .cproject
│ │ ├── .project
│ │ ├── .settings
│ │ │ └── language.settings.xml
│ │ ├── include
│ │ │ ├── stm32f10x_conf.h
│ │ │ └── stm32f10x_it.h
│ │ ├── ldscripts
│ │ │ ├── libs.ld
│ │ │ ├── mem.ld
│ │ │ └── sections.ld
│ │ ├── src
│ │ │ ├── ATcmd
│ │ │ │ ├── atcmd.c
│ │ │ │ ├── atcmd.h
│ │ │ │ ├── cmdrun.c
│ │ │ │ ├── cmdrun.h
│ │ │ │ ├── library
│ │ │ │ │ ├── at_common.h
│ │ │ │ │ ├── sockutil.c
│ │ │ │ │ ├── sockutil.h
│ │ │ │ │ ├── util.c
│ │ │ │ │ └── util.h
│ │ │ │ └── wiz_types.h
│ │ │ ├── Configuration
│ │ │ │ ├── ConfigData.c
│ │ │ │ ├── ConfigData.h
│ │ │ │ ├── ConfigMessage.c
│ │ │ │ └── ConfigMessage.h
│ │ │ ├── Ethernet
│ │ │ │ ├── W5500
│ │ │ │ │ ├── w5500.c
│ │ │ │ │ └── w5500.h
│ │ │ │ ├── socket.c
│ │ │ │ ├── socket.h
│ │ │ │ ├── wizchip_conf.c
│ │ │ │ └── wizchip_conf.h
│ │ │ ├── Internet
│ │ │ │ ├── DHCP
│ │ │ │ │ ├── dhcp.c
│ │ │ │ │ └── dhcp.h
│ │ │ │ ├── DNS
│ │ │ │ │ ├── dns.c
│ │ │ │ │ └── dns.h
│ │ │ │ ├── FTPServer
│ │ │ │ │ ├── ftpd.c
│ │ │ │ │ ├── ftpd.h
│ │ │ │ │ └── stdio_private.h
│ │ │ │ └── httpServer
│ │ │ │ │ ├── dataflash.c
│ │ │ │ │ ├── dataflash.h
│ │ │ │ │ ├── httpParser.c
│ │ │ │ │ ├── httpParser.h
│ │ │ │ │ ├── httpServer.c
│ │ │ │ │ ├── httpServer.h
│ │ │ │ │ ├── httpUtil.c
│ │ │ │ │ └── httpUtil.h
│ │ │ ├── PlatformHandler
│ │ │ │ ├── FatFs
│ │ │ │ │ ├── diskio.h
│ │ │ │ │ ├── ff.c
│ │ │ │ │ ├── ff.h
│ │ │ │ │ ├── ff_lfn_required.c
│ │ │ │ │ ├── ffconf.h
│ │ │ │ │ └── integer.h
│ │ │ │ ├── adcHandler.c
│ │ │ │ ├── adcHandler.h
│ │ │ │ ├── extiHandler.c
│ │ │ │ ├── extiHandler.h
│ │ │ │ ├── flashHandler.c
│ │ │ │ ├── flashHandler.h
│ │ │ │ ├── gpioHandler.c
│ │ │ │ ├── gpioHandler.h
│ │ │ │ ├── mmcHandler.c
│ │ │ │ ├── mmcHandler.h
│ │ │ │ ├── rccHandler.c
│ │ │ │ ├── rccHandler.h
│ │ │ │ ├── ring_buffer.c
│ │ │ │ ├── ring_buffer.h
│ │ │ │ ├── spiHandler.c
│ │ │ │ ├── spiHandler.h
│ │ │ │ ├── storageHandler.c
│ │ │ │ ├── storageHandler.h
│ │ │ │ ├── timerHandler.c
│ │ │ │ ├── timerHandler.h
│ │ │ │ ├── uartHandler.c
│ │ │ │ ├── uartHandler.h
│ │ │ │ ├── userHandler.c
│ │ │ │ └── userHandler.h
│ │ │ ├── callback
│ │ │ │ ├── dhcp_cb.c
│ │ │ │ └── dhcp_cb.h
│ │ │ ├── main.c
│ │ │ ├── netutil
│ │ │ │ ├── netutil.c
│ │ │ │ └── netutil.h
│ │ │ ├── stm32f10x_it.c
│ │ │ └── util
│ │ │ │ ├── boardutil.c
│ │ │ │ ├── boardutil.h
│ │ │ │ ├── common.h
│ │ │ │ ├── diskio.c
│ │ │ │ ├── mmc_sd.c
│ │ │ │ ├── mmc_sd.h
│ │ │ │ ├── spi.c
│ │ │ │ ├── spi.h
│ │ │ │ └── types.h
│ │ └── system
│ │ │ ├── include
│ │ │ ├── arm
│ │ │ │ └── semihosting.h
│ │ │ ├── cmsis
│ │ │ │ ├── README_CMSIS.txt
│ │ │ │ ├── README_DEVICE.txt
│ │ │ │ ├── arm_common_tables.h
│ │ │ │ ├── arm_const_structs.h
│ │ │ │ ├── arm_math.h
│ │ │ │ ├── cmsis_device.h
│ │ │ │ ├── core_cm0.h
│ │ │ │ ├── core_cm0plus.h
│ │ │ │ ├── core_cm3.h
│ │ │ │ ├── core_cm4.h
│ │ │ │ ├── core_cm4_simd.h
│ │ │ │ ├── core_cmFunc.h
│ │ │ │ ├── core_cmInstr.h
│ │ │ │ ├── core_sc000.h
│ │ │ │ ├── core_sc300.h
│ │ │ │ ├── stm32f10x.h
│ │ │ │ └── system_stm32f10x.h
│ │ │ ├── cortexm
│ │ │ │ └── ExceptionHandlers.h
│ │ │ ├── diag
│ │ │ │ └── Trace.h
│ │ │ └── stm32f1-stdperiph
│ │ │ │ ├── README_STDPERIPH.txt
│ │ │ │ ├── misc.h
│ │ │ │ ├── stm32f10x_adc.h
│ │ │ │ ├── stm32f10x_bkp.h
│ │ │ │ ├── stm32f10x_can.h
│ │ │ │ ├── stm32f10x_cec.h
│ │ │ │ ├── stm32f10x_crc.h
│ │ │ │ ├── stm32f10x_dac.h
│ │ │ │ ├── stm32f10x_dbgmcu.h
│ │ │ │ ├── stm32f10x_dma.h
│ │ │ │ ├── stm32f10x_exti.h
│ │ │ │ ├── stm32f10x_flash.h
│ │ │ │ ├── stm32f10x_fsmc.h
│ │ │ │ ├── stm32f10x_gpio.h
│ │ │ │ ├── stm32f10x_i2c.h
│ │ │ │ ├── stm32f10x_iwdg.h
│ │ │ │ ├── stm32f10x_pwr.h
│ │ │ │ ├── stm32f10x_rcc.h
│ │ │ │ ├── stm32f10x_rtc.h
│ │ │ │ ├── stm32f10x_sdio.h
│ │ │ │ ├── stm32f10x_spi.h
│ │ │ │ ├── stm32f10x_tim.h
│ │ │ │ ├── stm32f10x_usart.h
│ │ │ │ └── stm32f10x_wwdg.h
│ │ │ └── src
│ │ │ ├── cmsis
│ │ │ ├── README_DEVICE.txt
│ │ │ ├── system_stm32f10x.c
│ │ │ └── vectors_stm32f10x.c
│ │ │ ├── cortexm
│ │ │ ├── _initialize_hardware.c
│ │ │ ├── _reset_hardware.c
│ │ │ └── exception_handlers.c
│ │ │ ├── diag
│ │ │ ├── Trace.c
│ │ │ └── trace_impl.c
│ │ │ ├── newlib
│ │ │ ├── README.txt
│ │ │ ├── _cxx.cpp
│ │ │ ├── _exit.c
│ │ │ ├── _sbrk.c
│ │ │ ├── _startup.c
│ │ │ ├── _syscalls.c
│ │ │ ├── _write.c
│ │ │ └── assert.c
│ │ │ └── stm32f1-stdperiph
│ │ │ ├── README_STDPERIPH.txt
│ │ │ ├── misc.c
│ │ │ ├── stm32f10x_adc.c
│ │ │ ├── stm32f10x_bkp.c
│ │ │ ├── stm32f10x_can.c
│ │ │ ├── stm32f10x_cec.c
│ │ │ ├── stm32f10x_crc.c
│ │ │ ├── stm32f10x_dac.c
│ │ │ ├── stm32f10x_dbgmcu.c
│ │ │ ├── stm32f10x_dma.c
│ │ │ ├── stm32f10x_exti.c
│ │ │ ├── stm32f10x_flash.c
│ │ │ ├── stm32f10x_fsmc.c
│ │ │ ├── stm32f10x_gpio.c
│ │ │ ├── stm32f10x_i2c.c
│ │ │ ├── stm32f10x_iwdg.c
│ │ │ ├── stm32f10x_pwr.c
│ │ │ ├── stm32f10x_rcc.c
│ │ │ ├── stm32f10x_rtc.c
│ │ │ ├── stm32f10x_sdio.c
│ │ │ ├── stm32f10x_spi.c
│ │ │ ├── stm32f10x_tim.c
│ │ │ ├── stm32f10x_usart.c
│ │ │ └── stm32f10x_wwdg.c
│ └── WIZ550web_Boot
│ │ ├── .cproject
│ │ ├── .project
│ │ ├── .settings
│ │ └── language.settings.xml
│ │ ├── include
│ │ └── stm32f10x_conf.h
│ │ ├── ldscripts
│ │ ├── libs.ld
│ │ ├── mem.ld
│ │ └── sections.ld
│ │ ├── src
│ │ ├── Configuration
│ │ │ ├── ConfigData.c
│ │ │ ├── ConfigData.h
│ │ │ ├── ConfigMessage.c
│ │ │ └── ConfigMessage.h
│ │ ├── Ethernet
│ │ │ ├── W5500
│ │ │ │ ├── w5500.c
│ │ │ │ └── w5500.h
│ │ │ ├── socket.c
│ │ │ ├── socket.h
│ │ │ ├── wizchip_conf.c
│ │ │ └── wizchip_conf.h
│ │ ├── Internet
│ │ │ └── TFTP
│ │ │ │ ├── tftp.c
│ │ │ │ └── tftp.h
│ │ ├── PlatformHandler
│ │ │ ├── flashHandler.c
│ │ │ ├── flashHandler.h
│ │ │ ├── gpioHandler.c
│ │ │ ├── gpioHandler.h
│ │ │ ├── rccHandler.c
│ │ │ ├── rccHandler.h
│ │ │ ├── ring_buffer.c
│ │ │ ├── ring_buffer.h
│ │ │ ├── spiHandler.c
│ │ │ ├── spiHandler.h
│ │ │ ├── storageHandler.c
│ │ │ ├── storageHandler.h
│ │ │ ├── timerHandler.c
│ │ │ ├── timerHandler.h
│ │ │ ├── uartHandler.c
│ │ │ └── uartHandler.h
│ │ ├── common.h
│ │ ├── main.c
│ │ └── netutil
│ │ │ ├── netutil.c
│ │ │ └── netutil.h
│ │ └── system
│ │ ├── include
│ │ ├── arm
│ │ │ └── semihosting.h
│ │ ├── cmsis
│ │ │ ├── README_CMSIS.txt
│ │ │ ├── README_DEVICE.txt
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_const_structs.h
│ │ │ ├── arm_math.h
│ │ │ ├── cmsis_device.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm0plus.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ ├── core_cmInstr.h
│ │ │ ├── core_sc000.h
│ │ │ ├── core_sc300.h
│ │ │ ├── stm32f10x.h
│ │ │ └── system_stm32f10x.h
│ │ ├── cortexm
│ │ │ └── ExceptionHandlers.h
│ │ ├── diag
│ │ │ └── Trace.h
│ │ └── stm32f1-stdperiph
│ │ │ ├── README_STDPERIPH.txt
│ │ │ ├── misc.h
│ │ │ ├── stm32f10x_adc.h
│ │ │ ├── stm32f10x_bkp.h
│ │ │ ├── stm32f10x_can.h
│ │ │ ├── stm32f10x_cec.h
│ │ │ ├── stm32f10x_crc.h
│ │ │ ├── stm32f10x_dac.h
│ │ │ ├── stm32f10x_dbgmcu.h
│ │ │ ├── stm32f10x_dma.h
│ │ │ ├── stm32f10x_exti.h
│ │ │ ├── stm32f10x_flash.h
│ │ │ ├── stm32f10x_fsmc.h
│ │ │ ├── stm32f10x_gpio.h
│ │ │ ├── stm32f10x_i2c.h
│ │ │ ├── stm32f10x_iwdg.h
│ │ │ ├── stm32f10x_pwr.h
│ │ │ ├── stm32f10x_rcc.h
│ │ │ ├── stm32f10x_rtc.h
│ │ │ ├── stm32f10x_sdio.h
│ │ │ ├── stm32f10x_spi.h
│ │ │ ├── stm32f10x_tim.h
│ │ │ ├── stm32f10x_usart.h
│ │ │ └── stm32f10x_wwdg.h
│ │ └── src
│ │ ├── cmsis
│ │ ├── README_DEVICE.txt
│ │ ├── system_stm32f10x.c
│ │ └── vectors_stm32f10x.c
│ │ ├── cortexm
│ │ ├── _initialize_hardware.c
│ │ ├── _reset_hardware.c
│ │ └── exception_handlers.c
│ │ ├── diag
│ │ ├── Trace.c
│ │ └── trace_impl.c
│ │ ├── newlib
│ │ ├── README.txt
│ │ ├── _cxx.cpp
│ │ ├── _exit.c
│ │ ├── _sbrk.c
│ │ ├── _startup.c
│ │ ├── _syscalls.c
│ │ ├── _write.c
│ │ └── assert.c
│ │ └── stm32f1-stdperiph
│ │ ├── README_STDPERIPH.txt
│ │ ├── misc.c
│ │ ├── stm32f10x_adc.c
│ │ ├── stm32f10x_bkp.c
│ │ ├── stm32f10x_can.c
│ │ ├── stm32f10x_cec.c
│ │ ├── stm32f10x_crc.c
│ │ ├── stm32f10x_dac.c
│ │ ├── stm32f10x_dbgmcu.c
│ │ ├── stm32f10x_dma.c
│ │ ├── stm32f10x_exti.c
│ │ ├── stm32f10x_flash.c
│ │ ├── stm32f10x_fsmc.c
│ │ ├── stm32f10x_gpio.c
│ │ ├── stm32f10x_i2c.c
│ │ ├── stm32f10x_iwdg.c
│ │ ├── stm32f10x_pwr.c
│ │ ├── stm32f10x_rcc.c
│ │ ├── stm32f10x_rtc.c
│ │ ├── stm32f10x_sdio.c
│ │ ├── stm32f10x_spi.c
│ │ ├── stm32f10x_tim.c
│ │ ├── stm32f10x_usart.c
│ │ └── stm32f10x_wwdg.c
└── WIZ550web_HW_Rev1.1
│ ├── WIZ550web_App
│ ├── .cproject
│ ├── .project
│ ├── .settings
│ │ ├── language.settings.xml
│ │ └── org.eclipse.cdt.codan.core.prefs
│ ├── include
│ │ ├── stm32f10x_conf.h
│ │ └── stm32f10x_it.h
│ ├── ldscripts
│ │ ├── libs.ld
│ │ ├── mem.ld
│ │ ├── mem_128kb.ld
│ │ ├── mem_256kb.ld
│ │ └── sections.ld
│ ├── src
│ │ ├── ATcmd
│ │ │ ├── atcmd.c
│ │ │ ├── atcmd.h
│ │ │ ├── cmdrun.c
│ │ │ ├── cmdrun.h
│ │ │ ├── library
│ │ │ │ ├── at_common.h
│ │ │ │ ├── sockutil.c
│ │ │ │ ├── sockutil.h
│ │ │ │ ├── util.c
│ │ │ │ └── util.h
│ │ │ └── wiz_types.h
│ │ ├── Configuration
│ │ │ ├── ConfigData.c
│ │ │ ├── ConfigData.h
│ │ │ ├── ConfigMessage.c
│ │ │ └── ConfigMessage.h
│ │ ├── Ethernet
│ │ │ ├── W5500
│ │ │ │ ├── w5500.c
│ │ │ │ └── w5500.h
│ │ │ ├── socket.c
│ │ │ ├── socket.h
│ │ │ ├── wizchip_conf.c
│ │ │ └── wizchip_conf.h
│ │ ├── Internet
│ │ │ ├── DHCP
│ │ │ │ ├── dhcp.c
│ │ │ │ └── dhcp.h
│ │ │ ├── DNS
│ │ │ │ ├── dns.c
│ │ │ │ └── dns.h
│ │ │ ├── FTPServer
│ │ │ │ ├── ftpd.c
│ │ │ │ ├── ftpd.h
│ │ │ │ └── stdio_private.h
│ │ │ └── httpServer
│ │ │ │ ├── dataflash.c
│ │ │ │ ├── dataflash.h
│ │ │ │ ├── httpParser.c
│ │ │ │ ├── httpParser.h
│ │ │ │ ├── httpServer.c
│ │ │ │ ├── httpServer.h
│ │ │ │ ├── httpUtil.c
│ │ │ │ └── httpUtil.h
│ │ ├── PlatformHandler
│ │ │ ├── FatFs
│ │ │ │ ├── diskio.h
│ │ │ │ ├── ff.c
│ │ │ │ ├── ff.h
│ │ │ │ ├── ff_lfn_required.c
│ │ │ │ ├── ffconf.h
│ │ │ │ └── integer.h
│ │ │ ├── adcHandler.c
│ │ │ ├── adcHandler.h
│ │ │ ├── eepromHandler.c
│ │ │ ├── eepromHandler.h
│ │ │ ├── extiHandler.c
│ │ │ ├── extiHandler.h
│ │ │ ├── flashHandler.c
│ │ │ ├── flashHandler.h
│ │ │ ├── gpioHandler.c
│ │ │ ├── gpioHandler.h
│ │ │ ├── i2cHandler.c
│ │ │ ├── i2cHandler.h
│ │ │ ├── mmcHandler.c
│ │ │ ├── mmcHandler.h
│ │ │ ├── rccHandler.c
│ │ │ ├── rccHandler.h
│ │ │ ├── ring_buffer.c
│ │ │ ├── ring_buffer.h
│ │ │ ├── spiHandler.c
│ │ │ ├── spiHandler.h
│ │ │ ├── storageHandler.c
│ │ │ ├── storageHandler.h
│ │ │ ├── timerHandler.c
│ │ │ ├── timerHandler.h
│ │ │ ├── uartHandler.c
│ │ │ ├── uartHandler.h
│ │ │ ├── userHandler.c
│ │ │ └── userHandler.h
│ │ ├── callback
│ │ │ ├── dhcp_cb.c
│ │ │ └── dhcp_cb.h
│ │ ├── main.c
│ │ ├── netutil
│ │ │ ├── netutil.c
│ │ │ └── netutil.h
│ │ ├── stm32f10x_it.c
│ │ └── util
│ │ │ ├── boardutil.c
│ │ │ ├── boardutil.h
│ │ │ ├── common.h
│ │ │ ├── diskio.c
│ │ │ ├── mmc_sd.c
│ │ │ ├── mmc_sd.h
│ │ │ ├── spi.c
│ │ │ ├── spi.h
│ │ │ └── types.h
│ └── system
│ │ ├── include
│ │ ├── arm
│ │ │ └── semihosting.h
│ │ ├── cmsis
│ │ │ ├── README_CMSIS.txt
│ │ │ ├── README_DEVICE.txt
│ │ │ ├── arm_common_tables.h
│ │ │ ├── arm_const_structs.h
│ │ │ ├── arm_math.h
│ │ │ ├── cmsis_device.h
│ │ │ ├── core_cm0.h
│ │ │ ├── core_cm0plus.h
│ │ │ ├── core_cm3.h
│ │ │ ├── core_cm4.h
│ │ │ ├── core_cm4_simd.h
│ │ │ ├── core_cmFunc.h
│ │ │ ├── core_cmInstr.h
│ │ │ ├── core_sc000.h
│ │ │ ├── core_sc300.h
│ │ │ ├── stm32f10x.h
│ │ │ └── system_stm32f10x.h
│ │ ├── cortexm
│ │ │ └── ExceptionHandlers.h
│ │ ├── diag
│ │ │ └── Trace.h
│ │ └── stm32f1-stdperiph
│ │ │ ├── README_STDPERIPH.txt
│ │ │ ├── misc.h
│ │ │ ├── stm32f10x_adc.h
│ │ │ ├── stm32f10x_bkp.h
│ │ │ ├── stm32f10x_can.h
│ │ │ ├── stm32f10x_cec.h
│ │ │ ├── stm32f10x_crc.h
│ │ │ ├── stm32f10x_dac.h
│ │ │ ├── stm32f10x_dbgmcu.h
│ │ │ ├── stm32f10x_dma.h
│ │ │ ├── stm32f10x_exti.h
│ │ │ ├── stm32f10x_flash.h
│ │ │ ├── stm32f10x_fsmc.h
│ │ │ ├── stm32f10x_gpio.h
│ │ │ ├── stm32f10x_i2c.h
│ │ │ ├── stm32f10x_iwdg.h
│ │ │ ├── stm32f10x_pwr.h
│ │ │ ├── stm32f10x_rcc.h
│ │ │ ├── stm32f10x_rtc.h
│ │ │ ├── stm32f10x_sdio.h
│ │ │ ├── stm32f10x_spi.h
│ │ │ ├── stm32f10x_tim.h
│ │ │ ├── stm32f10x_usart.h
│ │ │ └── stm32f10x_wwdg.h
│ │ └── src
│ │ ├── cmsis
│ │ ├── README_DEVICE.txt
│ │ ├── system_stm32f10x.c
│ │ └── vectors_stm32f10x.c
│ │ ├── cortexm
│ │ ├── _initialize_hardware.c
│ │ ├── _reset_hardware.c
│ │ └── exception_handlers.c
│ │ ├── diag
│ │ ├── Trace.c
│ │ └── trace_impl.c
│ │ ├── newlib
│ │ ├── README.txt
│ │ ├── _cxx.cpp
│ │ ├── _exit.c
│ │ ├── _sbrk.c
│ │ ├── _startup.c
│ │ ├── _syscalls.c
│ │ ├── _write.c
│ │ └── assert.c
│ │ └── stm32f1-stdperiph
│ │ ├── README_STDPERIPH.txt
│ │ ├── misc.c
│ │ ├── stm32f10x_adc.c
│ │ ├── stm32f10x_bkp.c
│ │ ├── stm32f10x_can.c
│ │ ├── stm32f10x_cec.c
│ │ ├── stm32f10x_crc.c
│ │ ├── stm32f10x_dac.c
│ │ ├── stm32f10x_dbgmcu.c
│ │ ├── stm32f10x_dma.c
│ │ ├── stm32f10x_exti.c
│ │ ├── stm32f10x_flash.c
│ │ ├── stm32f10x_fsmc.c
│ │ ├── stm32f10x_gpio.c
│ │ ├── stm32f10x_i2c.c
│ │ ├── stm32f10x_iwdg.c
│ │ ├── stm32f10x_pwr.c
│ │ ├── stm32f10x_rcc.c
│ │ ├── stm32f10x_rtc.c
│ │ ├── stm32f10x_sdio.c
│ │ ├── stm32f10x_spi.c
│ │ ├── stm32f10x_tim.c
│ │ ├── stm32f10x_usart.c
│ │ └── stm32f10x_wwdg.c
│ └── WIZ550web_Boot
│ ├── .cproject
│ ├── .project
│ ├── .settings
│ └── language.settings.xml
│ ├── include
│ └── stm32f10x_conf.h
│ ├── ldscripts
│ ├── libs.ld
│ ├── mem.ld
│ └── sections.ld
│ ├── src
│ ├── Configuration
│ │ ├── ConfigData.c
│ │ ├── ConfigData.h
│ │ ├── ConfigMessage.c
│ │ └── ConfigMessage.h
│ ├── Ethernet
│ │ ├── W5500
│ │ │ ├── w5500.c
│ │ │ └── w5500.h
│ │ ├── socket.c
│ │ ├── socket.h
│ │ ├── wizchip_conf.c
│ │ └── wizchip_conf.h
│ ├── Internet
│ │ └── TFTP
│ │ │ ├── tftp.c
│ │ │ └── tftp.h
│ ├── PlatformHandler
│ │ ├── eepromHandler.c
│ │ ├── eepromHandler.h
│ │ ├── flashHandler.c
│ │ ├── flashHandler.h
│ │ ├── gpioHandler.c
│ │ ├── gpioHandler.h
│ │ ├── i2cHandler.c
│ │ ├── i2cHandler.h
│ │ ├── rccHandler.c
│ │ ├── rccHandler.h
│ │ ├── ring_buffer.c
│ │ ├── ring_buffer.h
│ │ ├── spiHandler.c
│ │ ├── spiHandler.h
│ │ ├── storageHandler.c
│ │ ├── storageHandler.h
│ │ ├── timerHandler.c
│ │ ├── timerHandler.h
│ │ ├── uartHandler.c
│ │ └── uartHandler.h
│ ├── common.h
│ ├── main.c
│ └── netutil
│ │ ├── netutil.c
│ │ └── netutil.h
│ └── system
│ ├── include
│ ├── arm
│ │ └── semihosting.h
│ ├── cmsis
│ │ ├── README_CMSIS.txt
│ │ ├── README_DEVICE.txt
│ │ ├── arm_common_tables.h
│ │ ├── arm_const_structs.h
│ │ ├── arm_math.h
│ │ ├── cmsis_device.h
│ │ ├── core_cm0.h
│ │ ├── core_cm0plus.h
│ │ ├── core_cm3.h
│ │ ├── core_cm4.h
│ │ ├── core_cm4_simd.h
│ │ ├── core_cmFunc.h
│ │ ├── core_cmInstr.h
│ │ ├── core_sc000.h
│ │ ├── core_sc300.h
│ │ ├── stm32f10x.h
│ │ └── system_stm32f10x.h
│ ├── cortexm
│ │ └── ExceptionHandlers.h
│ ├── diag
│ │ └── Trace.h
│ └── stm32f1-stdperiph
│ │ ├── README_STDPERIPH.txt
│ │ ├── misc.h
│ │ ├── stm32f10x_adc.h
│ │ ├── stm32f10x_bkp.h
│ │ ├── stm32f10x_can.h
│ │ ├── stm32f10x_cec.h
│ │ ├── stm32f10x_crc.h
│ │ ├── stm32f10x_dac.h
│ │ ├── stm32f10x_dbgmcu.h
│ │ ├── stm32f10x_dma.h
│ │ ├── stm32f10x_exti.h
│ │ ├── stm32f10x_flash.h
│ │ ├── stm32f10x_fsmc.h
│ │ ├── stm32f10x_gpio.h
│ │ ├── stm32f10x_i2c.h
│ │ ├── stm32f10x_iwdg.h
│ │ ├── stm32f10x_pwr.h
│ │ ├── stm32f10x_rcc.h
│ │ ├── stm32f10x_rtc.h
│ │ ├── stm32f10x_sdio.h
│ │ ├── stm32f10x_spi.h
│ │ ├── stm32f10x_tim.h
│ │ ├── stm32f10x_usart.h
│ │ └── stm32f10x_wwdg.h
│ └── src
│ ├── cmsis
│ ├── README_DEVICE.txt
│ ├── system_stm32f10x.c
│ └── vectors_stm32f10x.c
│ ├── cortexm
│ ├── _initialize_hardware.c
│ ├── _reset_hardware.c
│ └── exception_handlers.c
│ ├── diag
│ ├── Trace.c
│ └── trace_impl.c
│ ├── newlib
│ ├── README.txt
│ ├── _cxx.cpp
│ ├── _exit.c
│ ├── _sbrk.c
│ ├── _startup.c
│ ├── _syscalls.c
│ ├── _write.c
│ └── assert.c
│ └── stm32f1-stdperiph
│ ├── README_STDPERIPH.txt
│ ├── misc.c
│ ├── stm32f10x_adc.c
│ ├── stm32f10x_bkp.c
│ ├── stm32f10x_can.c
│ ├── stm32f10x_cec.c
│ ├── stm32f10x_crc.c
│ ├── stm32f10x_dac.c
│ ├── stm32f10x_dbgmcu.c
│ ├── stm32f10x_dma.c
│ ├── stm32f10x_exti.c
│ ├── stm32f10x_flash.c
│ ├── stm32f10x_fsmc.c
│ ├── stm32f10x_gpio.c
│ ├── stm32f10x_i2c.c
│ ├── stm32f10x_iwdg.c
│ ├── stm32f10x_pwr.c
│ ├── stm32f10x_rcc.c
│ ├── stm32f10x_rtc.c
│ ├── stm32f10x_sdio.c
│ ├── stm32f10x_spi.c
│ ├── stm32f10x_tim.c
│ ├── stm32f10x_usart.c
│ └── stm32f10x_wwdg.c
└── WIZ550web_Webpages
├── 0_Basic_Demopages
├── img
│ ├── WIZnet_logo_IoT.png
│ ├── WIZnet_logo_top.gif
│ ├── WIZnet_makerspace_logo_120.png
│ ├── di_off.png
│ ├── di_on.png
│ ├── dio_on.png
│ ├── favicon.ico
│ └── notused.png
└── index.html
└── 1_Get_Set_Functions_Testpage
├── func_test.html
└── img
└── favicon.ico
/README.md:
--------------------------------------------------------------------------------
1 | # Attention
2 | - Firmware updates will be performed only in Hardware Rev 1.1/1.2
3 |
4 | # WIZ550web
5 | - Embedded Web server module for Things based on W5500 hardwired TCP/IP chip (Non-OS)
6 | - Provides the firmware & web page examples for user’s customization
7 | - 16-Configurable Digital I/O, 4-Analog Input, 2-UART Port
8 | - SD card, Configuration tool, Serial AT command set support
9 |
10 |
11 |
12 | ## Images
13 | ### WIZ550web Module
14 | - 74.4mm(W) x 30mm(L) x 24mm(H) (±0.5)
15 |
16 |
17 | 
18 |
19 | ### WIZ550web Baseboard (Separate purchases)
20 | - [More detail](http://wizwiki.net/wiki/doku.php?id=products:wiz550web:wiz550webds_en#wiz550web_baseboard)
21 |
22 |
23 |
24 | ## Features
25 | - WIZnet W5500 Hardwired TCP/IP chip
26 | - Hardwired TCP/IP embedded Ethernet controller
27 | - SPI (Serial Peripheral Interface) Microcontroller Interface
28 | - Hardwired TCP/IP stack supports TCP, UDP, IPv4, ICMP, ARP, IGMP, and PPPoE protocols
29 | - Easy to implement the other network protocols
30 | - ST Microelectronics STM32F103RBT6
31 | - ARM 32-bit Cortex™-M3 microcontroller running at up to 72MHz
32 | - 128kB on-chip flash / 20kB on-chip SRAM / Various peripherals
33 | - Adesto Technologies AT45DB081D-SU
34 | - 8-Megabit Serial Flash Memory
35 | - SD Card Slot
36 | - 2.54mm Pin Header x 2
37 |
38 |
39 |
40 | ## Software
41 | These are Firmware projects (source code) based on Eclipse IDE for C/C++ Developers (ARM GCC 4.8.3).
42 | - Firmware source code
43 | - Application
44 | - Boot
45 | - Web page examples
46 | - [Basic Demo Web Pages](http://wizwiki.net/wiki/doku.php?id=products:wiz550web:wiz550webgsg_en#basic_demo_web_pages)
47 | - Configuration tool (Java)
48 | - [Download Page Link](http://wizwiki.net/wiki/doku.php?id=products:wiz550web:wiz550web_download)
49 |
50 |
51 |
52 | ## F/W Revision
53 | |-|H/W rev 1.1/1.2|H/W rev 1.0|
54 | |:--:|:--:|:--:|
55 | |The latest|v2.0.1|1.1.2|
56 |
57 | - [F/W Revision History](https://github.com/Wiznet/WIZ550web/wiki/S-W-revision)
58 | - [H/W revision history](https://github.com/Wiznet/WIZ550web/wiki/H-W-revision)
59 |
60 |
61 |
62 | ## More Detail
63 | - [Develop Environment](https://github.com/Wiznet/WIZ550web/wiki/Develop-Env.)
64 | - [H/W Materials & Characteristics](http://wizwiki.net/wiki/doku.php?id=products:wiz550web:wiz550webds_en#ac_dc_characteristics)
65 | - [Etc. All Info](http://wizwiki.net/wiki/doku.php?id=products:wiz550web:start)
66 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | WIZ550web_App
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | org.eclipse.cdt.core.cnature
23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
25 | org.eclipse.cdt.core.ccnature
26 |
27 |
28 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/include/stm32f10x_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file Demo/inc/stm32f10x_it.h
4 | * @author MCD Team
5 | * @version V1.0.0
6 | * @date 09/13/2010
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @copy
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | *
© COPYRIGHT 2010 STMicroelectronics
19 | */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __STM32F10x_IT_H
23 | #define __STM32F10x_IT_H
24 |
25 | /* Includes ------------------------------------------------------------------*/
26 | #include "stm32f10x.h"
27 |
28 | /* Exported types ------------------------------------------------------------*/
29 | extern vu32 TickValue;
30 | /* Exported constants --------------------------------------------------------*/
31 | /* Exported macro ------------------------------------------------------------*/
32 | /* Exported functions ------------------------------------------------------- */
33 |
34 | void NMI_Handler(void);
35 | void HardFault_Handler(void);
36 | void MemManage_Handler(void);
37 | void BusFault_Handler(void);
38 | void UsageFault_Handler(void);
39 | void SVC_Handler(void);
40 | void DebugMon_Handler(void);
41 | void PendSV_Handler(void);
42 | void SysTick_Handler(void);
43 |
44 | #endif /* __STM32F10x_IT_H */
45 |
46 | /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
47 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/ldscripts/libs.ld:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Placeholder to list other libraries required by the application.
4 |
5 | GROUP(
6 | )
7 |
8 | */
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/ldscripts/mem.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08006000, LENGTH = 104K
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/ATcmd/atcmd.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file atcmd.h
3 | * @brief AT Command Module - Interface Part Header File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _ATCMD_H
13 | #define _ATCMD_H
14 |
15 | #define WORK_BUF_SIZE 1024
16 | #include "library/at_common.h"
17 |
18 | struct at_command
19 | {
20 | const char *cmd;
21 | void (*process)(void);
22 | char *description;
23 | char *usage;
24 | };
25 |
26 | void atc_init();
27 | void atc_run(void);
28 |
29 | #endif //_ATCMD_H
30 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/ATcmd/library/sockutil.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file sockutil.h
3 | * @brief Socket Utility Header File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author modified by Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _SOCKUTIL_H
13 | #define _SOCKUTIL_H
14 |
15 | #include "at_common.h"
16 |
17 | /**
18 | * @addtogroup sockwatch_module
19 | * @{
20 | * @def WATCH_SOCK_UDP_SEND
21 | * Indicate that 'UDP SEND' completion of this socket has to be watched.
22 | * @def WATCH_SOCK_TCP_SEND
23 | * Indicate that 'TCP SEND' completion of this socket has to be watched.
24 | * @def WATCH_SOCK_CONN_TRY
25 | * Indicate that 'CONNECT' completion of this socket has to be watched.
26 | * @def WATCH_SOCK_CONN_EVT
27 | * Indicate that 'CONNECT' event of this socket has to be watched.
28 | * @def WATCH_SOCK_CLS_TRY
29 | * Indicate that 'CLOSE' completion of this socket has to be watched.
30 | * @def WATCH_SOCK_CLS_EVT
31 | * Indicate that 'CLOSE' event of this socket has to be watched.
32 | * @def WATCH_SOCK_RECV
33 | * Indicate that 'RECEIVE' event of this socket has to be watched.
34 | * @def WATCH_SOCK_MASK_LOW
35 | * Mask all Completions of the socket.
36 | * @def WATCH_SOCK_MASK_HIGH
37 | * Mask all Events of the socket.
38 | * @def WATCH_SOCK_ALL_MASK
39 | * Mask all Completions and Events.
40 | * @typedef watch_cbfunc
41 | * Watch call back function form.
42 | * @}
43 | */
44 | #define WATCH_SOCK_UDP_SEND 0x01
45 | #define WATCH_SOCK_TCP_SEND 0x02
46 | #define WATCH_SOCK_CONN_TRY 0x04
47 | #define WATCH_SOCK_CLS_TRY 0x08
48 | #define WATCH_SOCK_CONN_EVT 0x10
49 | #define WATCH_SOCK_CLS_EVT 0x20
50 | #define WATCH_SOCK_RECV 0x40
51 | #define WATCH_SOCK_MASK_LOW 0x0F
52 | #define WATCH_SOCK_MASK_HIGH 0x70
53 | #define WATCH_SOCK_ALL_MASK 0x7F
54 |
55 | typedef void (*watch_cbfunc)(uint8_t id, uint8_t item, int32_t ret);
56 |
57 | int8_t sockwatch_open(uint8_t sock, watch_cbfunc cb);
58 | int8_t sockwatch_close(uint8_t sock);
59 | int8_t sockwatch_set(uint8_t sock, uint8_t item);
60 | int8_t sockwatch_clr(uint8_t sock, uint8_t item);
61 | int8_t sockwatch_chk(uint8_t sock, uint8_t item);
62 | void sockwatch_run(void);
63 |
64 | int8_t ip_check(int8_t *str, uint8_t *ip);
65 | int8_t port_check(int8_t *str, uint16_t *port);
66 | int8_t mac_check(int8_t *str, uint8_t *mac);
67 |
68 | #endif //_SOCKUTIL_H
69 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/ATcmd/library/util.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file util.h
3 | * @brief Common Utility Function Set Source File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _UTIL_H
13 | #define _UTIL_H
14 |
15 | #include "at_common.h"
16 |
17 | /**
18 | * @defgroup macro_util Macro Util
19 | * Simple Macro Utilities.
20 | * @ingroup common_util
21 | * @{
22 | * @def MEM_FREE
23 | * If pointer is not NULL, free it and set to NULL.
24 | * @def BITSET
25 | * Set bit in variable.
26 | * @def BITCLR
27 | * Clear bit in variable.
28 | * @typedef long2char
29 | * General purpose type change union (32bit <-> 8bit).
30 | * @typedef short2char
31 | * General purpose type change union (16bit <-> 8bit).
32 | * @}
33 | * @typedef void_func
34 | * General purpose void function form.
35 | * @typedef alarm_cbfunc
36 | * Alarm call back function form.
37 | * @}
38 | */
39 | #define MEM_FREE(mem_p) do{ if(mem_p) { free(mem_p); mem_p = NULL; } }while(0)
40 | #define BITSET(var_v, bit_v) (var_v |= bit_v)
41 | #define BITCLR(var_v, bit_v) (var_v &= ~(bit_v))
42 |
43 |
44 | int8_t digit_length(int32_t dgt, int8_t base);
45 | int32_t str_check(int (*method)(int), int8_t *str);
46 | int8_t* strsep_ex(register int8_t **stringp, register const int8_t *delim);
47 | uint16_t checksum(uint8_t * src, uint32_t len);
48 |
49 | #endif //_UTIL_H
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/ATcmd/wiz_types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file wiz_types.h
3 | * @brief Common Type Definition Header File.
4 | * This file influence on all library area through @ref common.h
5 | * @version 1.1
6 | * @date 2013/02/22
7 | * @par Revision
8 | * 2013/02/22 - 1.0 Release
9 | * 2013/07/09 - 1.1 Added 'bool' type
10 | * 2014/04/25 - 1.2 remove type definitions
11 | * @author Mike Jeong
12 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
13 | */
14 |
15 | #ifndef _WIZ_TYPES_H
16 | #define _WIZ_TYPES_H
17 |
18 |
19 | /**
20 | * @def RET_FAIL
21 | * Fail return value
22 | * @def RET_OK
23 | * Success return value
24 | * @def RET_NOK
25 | * Error return value
26 | *
27 | * @def VAL_HIGH
28 | * Indicate the value is 'high'
29 | * @def VAL_LOW
30 | * Indicate the value is 'low'
31 | *
32 | * @def VAL_TOG
33 | * Indicate the value is 'toggle'
34 | * @def VAL_ON
35 | * Indicate the value is 'on'
36 | * @def VAL_OFF
37 | * Indicate the value is 'off'
38 | *
39 | * @def VAL_SET
40 | * Indicate the value is 'set'
41 | * @def VAL_CLEAR
42 | * Indicate the value is 'clear'
43 | *
44 | * @def VAL_TRUE
45 | * Indicate the value is 'true'
46 | * @def VAL_FALSE
47 | * Indicate the value is 'false'
48 | *
49 | * @def VAL_ENABLE
50 | * Indicate the value is 'enable'
51 | * @def VAL_DISABLE
52 | * Indicate the value is 'disable'
53 | *
54 | * @def VAL_NONE
55 | * Indicate the value is 'none'
56 | * @def VAL_INVALID
57 | * Indicate the value is 'invalid'
58 | *
59 | * @def CRLF
60 | * Replace New Line
61 | */
62 | #define RET_FAIL 1
63 | #define RET_OK 0
64 | #define RET_NOK -1
65 |
66 | #define VAL_HIGH 1
67 | #define VAL_LOW 0
68 |
69 | #define VAL_TOG 2
70 | #define VAL_ON 1
71 | #define VAL_OFF 0
72 |
73 | #define VAL_SET 1
74 | #define VAL_CLEAR 0
75 |
76 | #define VAL_TRUE 1
77 | #define VAL_FALSE 0
78 |
79 | #define VAL_ENABLE 1
80 | #define VAL_DISABLE 0
81 |
82 | #define VAL_NONE -1
83 | #define VAL_INVALID -2
84 |
85 | #define CRLF "\r\n"
86 |
87 | #endif //_WIZ_TYPES_H
88 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/Internet/httpServer/httpServer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/Internet/httpServer/httpServer.h
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/Internet/httpServer/httpUtil.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file httpUtil.h
3 | * @brief Header File for HTTP Server Utilities
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __HTTPUTIL_H__
13 | #define __HTTPUTIL_H__
14 |
15 | #include "httpServer.h"
16 | #include "httpParser.h"
17 | #include "types.h"
18 |
19 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len);
20 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/FatFs/integer.h:
--------------------------------------------------------------------------------
1 | /*-------------------------------------------*/
2 | /* Integer type definitions for FatFs module */
3 | /*-------------------------------------------*/
4 |
5 | #ifndef _FF_INTEGER
6 | #define _FF_INTEGER
7 |
8 | #ifdef _WIN32 /* FatFs development platform */
9 |
10 | #include
11 | #include
12 |
13 | #else /* Embedded platform */
14 |
15 | /* This type MUST be 8 bit */
16 | typedef unsigned char BYTE;
17 |
18 | /* These types MUST be 16 bit */
19 | typedef short SHORT;
20 | typedef unsigned short WORD;
21 | typedef unsigned short WCHAR;
22 |
23 | /* These types MUST be 16 bit or 32 bit */
24 | typedef int INT;
25 | typedef unsigned int UINT;
26 |
27 | /* These types MUST be 32 bit */
28 | typedef long LONG;
29 | typedef unsigned long DWORD;
30 |
31 | #endif
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/adcHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file adcHandler.h
3 | * @brief Header File for ADC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __ADCHANDLER_H
13 | #define __ADCHANDLER_H
14 |
15 | #include
16 | #include "stm32f10x.h"
17 |
18 | #define ADC12_IN4_PORT GPIOA
19 | #define ADC12_IN4_PIN GPIO_Pin_4
20 |
21 | #define ADC12_IN5_PORT GPIOA
22 | #define ADC12_IN5_PIN GPIO_Pin_5
23 |
24 | #define ADC12_IN6_PORT GPIOA
25 | #define ADC12_IN6_PIN GPIO_Pin_6
26 |
27 | #define ADC12_IN7_PORT GPIOA
28 | #define ADC12_IN7_PIN GPIO_Pin_7
29 |
30 | #define ADC12_IN13_PORT GPIOC
31 | #define ADC12_IN13_PIN GPIO_Pin_3
32 |
33 | void adc_gpio_init(uint8_t ADC_Channel);
34 | void adc_init(uint8_t ADC_Type);
35 | void adc_dma_init(void);
36 | void adc_dmamulti_init(void);
37 |
38 | extern __IO uint16_t ADC1ConvertedValue;
39 | extern vu16 ADC_DualConvertedValueTab[4];
40 |
41 | #endif
42 |
43 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/extiHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file extiHandler.h
3 | * @brief Header File for EXTI Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __EXTIHANDLER_H
13 | #define __EXTIHANDLER_H
14 |
15 | void EXTI_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/flashHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __FLASHHANDLER_H__
3 | #define __FLASHHANDLER_H__
4 |
5 | #define MULTIFLASH_ENABLE
6 |
7 | #define FLASH_PAGE0_BASE 0x08000000
8 | #define FLASH_CONFIG_PAGE 3
9 | #if !defined(MULTIFLASH_ENABLE)
10 | #define FLASH_PAGE_SIZE 0x400
11 | #define FLASH_PAGE 128
12 | #define FLASH_BOOT_PAGE 24 // 1 page 1K
13 | #define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*126)) // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
14 | #define IO_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*125)) // Page125
15 | //#define FLASH_PAGE_SIZE 0x800
16 | //#define FLASH_PAGE 64
17 | //#define FLASH_BOOT_PAGE 12 // 1 page 2K
18 | //#define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*62)) // Page62,63 (STM32103RCT6, the last page of 256kB on-chip flash, 4kB size)
19 | //#define IO_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*61)) // Page61
20 | #define FLASH_APP_PAGE (FLASH_PAGE - FLASH_BOOT_PAGE - FLASH_CONFIG_PAGE)
21 | #endif
22 |
23 | #if defined(MULTIFLASH_ENABLE)
24 | typedef struct __Probe_Flash {
25 | uint32_t flash_page0_base;
26 | uint32_t flash_app_base;
27 | uint16_t flash_page_size;
28 | uint16_t flash_page;
29 | uint8_t flash_boot_page;
30 | uint8_t flash_config_page;
31 | uint16_t flash_app_page ;
32 | uint32_t config_page_addr ;
33 | uint32_t io_page_addr ;
34 | } __attribute__((packed)) Probe_Flash;
35 |
36 | extern Probe_Flash flash;
37 |
38 | void probe_flash(void);
39 | #endif
40 |
41 | int addr_to_page(uint32_t addr);
42 | int erase_flash_page(uint32_t page_addr);
43 | int write_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
44 | int read_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/gpioHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file gpioHandler.h
3 | * @brief Header File for GPIO Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __GPIOHANDLER_H
13 | #define __GPIOHANDLER_H
14 |
15 | #include "boardutil.h"
16 |
17 | void GPIO_Configuration(void);
18 |
19 | void IO_Init(IO_Type io);
20 | void IO_On(IO_Type io);
21 | void IO_Off(IO_Type io);
22 | void IO_Toggle(IO_Type io);
23 | uint8 get_IO_Status(IO_Type io);
24 |
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/mmcHandler.h:
--------------------------------------------------------------------------------
1 | #include "ff.h"
2 | #include "diskio.h"
3 | #include "stm32f10x.h"
4 |
5 | /*-------------------------------------------------------------------------------*/
6 | /* Option: Transmit/Receive Block using DMA (Platform dependent. STM32 here) */
7 | /*-------------------------------------------------------------------------------*/
8 | //#define STM32_SD_USE_DMA
9 |
10 | /*
11 | #define RCC_APB2Periph_GPIO_CS RCC_APB2Periph_GPIOB
12 | #define GPIO_SPI_SD GPIOB
13 | #define GPIO_Pin_SPI_SD_SCK GPIO_Pin_13
14 | #define GPIO_Pin_SPI_SD_MISO GPIO_Pin_14
15 | #define GPIO_Pin_SPI_SD_MOSI GPIO_Pin_15
16 | #define RCC_APBPeriphClockCmd_SPI_SD RCC_APB1PeriphClockCmd
17 | #define RCC_APBPeriph_SPI_SD RCC_APB1Periph_SPI2
18 | */
19 |
20 | #define SPI_SD SPI2
21 | #define GPIO_CS GPIOB /* GPIOB */
22 | #define GPIO_Pin_CS GPIO_Pin_10 /* PB.11 */
23 | #define SPI_BaudRatePrescaler_SPI_SD SPI_BaudRatePrescaler_2 /* 72MHz / 2 */
24 |
25 | // SD Card Selection; CS control
26 | #define SD_CS_SELECT() GPIO_ResetBits(GPIO_CS, GPIO_Pin_CS) // MMC CS = L
27 | #define SD_CS_DESELECT() GPIO_SetBits(GPIO_CS, GPIO_Pin_CS) // MMC CS = H
28 |
29 | #ifdef STM32_SD_USE_DMA
30 | #define DMA_Channel_SPI_SD_RX DMA1_Channel4
31 | #define DMA_Channel_SPI_SD_TX DMA1_Channel5
32 | #define DMA_FLAG_SPI_SD_TC_RX DMA1_FLAG_TC4
33 | #define DMA_FLAG_SPI_SD_TC_TX DMA1_FLAG_TC5
34 | //#define GPIO_SPI_SD GPIOB
35 | //#define GPIO_Pin_SPI_SD_SCK GPIO_Pin_13
36 | //#define GPIO_Pin_SPI_SD_MISO GPIO_Pin_14
37 | //#define GPIO_Pin_SPI_SD_MOSI GPIO_Pin_15
38 | //#define RCC_APBPeriphClockCmd_SPI_SD RCC_APB1PeriphClockCmd
39 | //#define RCC_APBPeriph_SPI_SD RCC_APB1Periph_SPI2
40 | #endif
41 |
42 |
43 | #define GO_IDLE_STATE 0
44 | #define SEND_OP_COND 1
45 | #define SEND_IF_COND 8
46 | #define SET_BLOCKLEN 16
47 | #define READ_BLOCK 17
48 | #define WRITE_BLOCK 24
49 | #define APP_CMD 55
50 | #define READ_OCR 58
51 | #define SD_SEND_OP_COND (0x40|41)
52 |
53 |
54 | typedef enum card_type_id {
55 | NO_CARD,
56 | CARD_MMC,
57 | CARD_SD,
58 | CARD_SD2,
59 | CARD_SDHC,
60 | SPI_FLASHM
61 | } card_type_id_t;
62 |
63 |
64 |
65 | uint8_t mmc_mount();
66 | uint8_t flash_mount();
67 | FRESULT getMountedMemorySize(uint8_t mount_ret, uint32_t * totalSize, uint32_t * availableSize);
68 | void Delay_ms(uint32_t ms);
69 | uint8_t mmc_select();
70 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/rccHandler.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.c
3 | * @brief RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #include "rccHandler.h"
13 | #include "stm32f10x.h"
14 | #include "boardutil.h"
15 |
16 | /**
17 | * @brief Sets System clock frequency to 72MHz and configure HCLK, PCLK2
18 | * and PCLK1 prescalers.
19 | * @param None
20 | * @return None
21 | */
22 | void RCC_Configuration(void)
23 | {
24 | ErrorStatus HSEStartUpStatus;
25 |
26 | /* RCC system reset(for debug purpose) */
27 | RCC_DeInit();
28 |
29 | /* Enable HSE */
30 | RCC_HSEConfig(RCC_HSE_ON);
31 |
32 | /* Wait till HSE is ready */
33 | HSEStartUpStatus = RCC_WaitForHSEStartUp();
34 |
35 | if(HSEStartUpStatus == SUCCESS)
36 | {
37 | /* Enable Prefetch Buffer */
38 | FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
39 |
40 | /* Flash 2 wait state */
41 | FLASH_SetLatency(FLASH_Latency_2);
42 |
43 | /* HCLK = SYSCLK */
44 | RCC_HCLKConfig(RCC_SYSCLK_Div1);
45 |
46 | /* PCLK2 = HCLK */
47 | //RCC_PCLK2Config(RCC_HCLK_Div1);
48 | RCC_PCLK2Config(RCC_HCLK_Div2); // for Baudrate 600 support
49 |
50 | /* PCLK1 = HCLK/2 */
51 | RCC_PCLK1Config(RCC_HCLK_Div2);
52 |
53 | /* PLLCLK = 8MHz * 9 = 72 MHz */
54 | RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);
55 | // RCC_PLLConfig(RCC_PLLSource_PREDIV1, RCC_PLLMul_9);
56 |
57 | /* Enable PLL */
58 | RCC_PLLCmd(ENABLE);
59 |
60 | /* Wait till PLL is ready */
61 | while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
62 | {
63 | }
64 |
65 | /* Select PLL as system clock source */
66 | RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
67 |
68 | /* Wait till PLL is used as system clock source */
69 | while(RCC_GetSYSCLKSource() != 0x08)
70 | {
71 | }
72 |
73 |
74 |
75 | /* TIM2 clock enable */
76 | // RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2|RCC_APB1Periph_TIM3|RCC_APB1Periph_USART2, ENABLE);
77 |
78 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2 | RCC_APB1Periph_USART2, ENABLE);
79 |
80 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD
81 | |RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
82 |
83 | }
84 | }
85 |
86 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/rccHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.h
3 | * @brief Header File for RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __RCCHANDLER_H
13 | #define __RCCHANDLER_H
14 |
15 | void RCC_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/spiHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __SPIHANDLER_H
13 | #define __SPIHANDLER_H
14 |
15 | #define STM32_WIZCHIP_USE_DMA
16 | #ifdef STM32_WIZCHIP_USE_DMA
17 | #define DMA_Channel_SPI_WIZCHIP_RX DMA1_Channel4
18 | #define DMA_Channel_SPI_WIZCHIP_TX DMA1_Channel5
19 | #define DMA_FLAG_SPI_WIZCHIP_TC_RX DMA1_FLAG_TC4
20 | #define DMA_FLAG_SPI_WIZCHIP_TC_TX DMA1_FLAG_TC5
21 | #endif
22 |
23 |
24 | void wizchip_write(uint8_t wb);
25 | uint8_t wizchip_read(void);
26 | void W5500_Init(void);
27 | void W5500_SPI_LowLevel_Init(void);
28 |
29 | #endif
30 |
31 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/storageHandler.c:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.c
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 |
9 | #include
10 | #include "stm32f10x.h"
11 | #include "storageHandler.h"
12 | #include "flashHandler.h"
13 |
14 | #if !defined(MULTIFLASH_ENABLE)
15 | #define BLOCK_SIZE FLASH_PAGE_SIZE
16 | //#define CONFIG_PAGE_ADDR 0x801F800 // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
17 | #endif
18 |
19 | int read_storage(uint8_t isConfig, void *data, uint16_t size)
20 | {
21 | uint32_t address;
22 |
23 | if(isConfig == 1) {
24 | #if !defined(MULTIFLASH_ENABLE)
25 | address = BLOCK_SIZE + CONFIG_PAGE_ADDR;
26 | #else
27 | address = flash.flash_page_size + flash.config_page_addr;
28 | #endif
29 | }
30 | else {
31 | #if !defined(MULTIFLASH_ENABLE)
32 | address = 0x00000000 + CONFIG_PAGE_ADDR;
33 | #else
34 | address = 0x00000000 + flash.config_page_addr;
35 | #endif
36 | }
37 |
38 | return read_flash(address, data, size);
39 | }
40 |
41 | int write_storage(uint8_t isConfig, void *data, uint16_t size)
42 | {
43 | uint32_t address;
44 |
45 | if(isConfig == 1) {
46 | #if !defined(MULTIFLASH_ENABLE)
47 | address = BLOCK_SIZE + CONFIG_PAGE_ADDR;
48 | #else
49 | address = flash.flash_page_size + flash.config_page_addr;
50 | #endif
51 | }
52 | else {
53 | #if !defined(MULTIFLASH_ENABLE)
54 | address = 0x00000000 + CONFIG_PAGE_ADDR;
55 | #else
56 | address = 0x00000000 + flash.config_page_addr;
57 | #endif
58 | }
59 |
60 | erase_flash_page(address);
61 | return write_flash(address, data, size);
62 | }
63 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/storageHandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.h
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 | #ifndef STORAGEHANDLER_H_
9 | #define STORAGEHANDLER_H_
10 |
11 | #include
12 |
13 | int read_storage(uint8_t isConfig, void *data, uint16_t size);
14 | int write_storage(uint8_t isConfig, void *data, uint16_t size);
15 |
16 | #endif /* STORAGEHANDLER_H_ */
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/timerHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file timerHandler.h
3 | * @brief Header File for TIMER Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __TIMERHANDLER_H
13 | #define __TIMERHANDLER_H
14 |
15 | void Timer_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/PlatformHandler/uartHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __UARTHANDLER_H
13 | #define __UARTHANDLER_H
14 |
15 | #include
16 | #include "stm32f10x.h"
17 | #include "ConfigData.h"
18 |
19 | #define UART_SRB_SIZE 1024 /* Send */
20 | #define UART_RRB_SIZE 1024 /* Receive */
21 |
22 | void serial_info_init(USART_TypeDef *pUART, struct __serial_info *serial);
23 |
24 | void USART1_Configuration(void);
25 | void USART2_Configuration(void);
26 |
27 | int UART_read(void *data, int bytes);
28 | uint32_t UART_write(void *data, int bytes);
29 | int UART_RxRB_GetCount();
30 | int UART_TxRB_GetCount();
31 | void UART2_flush(void);
32 |
33 | uint8_t * getUSART1buf(void);
34 | void USART1_flush(void);
35 |
36 | uint8_t Usart_putc(uint8_t ch);
37 | uint8_t Usart_getc(void);
38 |
39 | #endif
40 |
41 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/callback/dhcp_cb.c:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "dhcp.h"
4 | #include "ConfigData.h"
5 |
6 | void w5500_dhcp_assign()
7 | {
8 | S2E_Packet *value = get_S2E_Packet_pointer();
9 | wiz_NetInfo gWIZNETINFO;
10 |
11 | getIPfromDHCP(gWIZNETINFO.ip);
12 | getGWfromDHCP(gWIZNETINFO.gw);
13 | getSNfromDHCP(gWIZNETINFO.sn);
14 | getDNSfromDHCP(gWIZNETINFO.dns);
15 |
16 | get_S2E_Packet_value(gWIZNETINFO.mac, value->network_info_common.mac, sizeof(gWIZNETINFO.mac[0]) * 6);
17 | set_S2E_Packet_value(value->network_info_common.local_ip, gWIZNETINFO.ip, sizeof(value->network_info_common.local_ip));
18 | set_S2E_Packet_value(value->network_info_common.gateway, gWIZNETINFO.gw, sizeof(value->network_info_common.gateway));
19 | set_S2E_Packet_value(value->network_info_common.subnet, gWIZNETINFO.sn, sizeof(value->network_info_common.subnet));
20 | set_S2E_Packet_value(value->options.dns_server_ip, gWIZNETINFO.dns, sizeof(value->options.dns_server_ip));
21 | if(value->options.dhcp_use)
22 | gWIZNETINFO.dhcp = NETINFO_DHCP;
23 | else
24 | gWIZNETINFO.dhcp = NETINFO_STATIC;
25 |
26 | ctlnetwork(CN_SET_NETINFO, (void*) &gWIZNETINFO);
27 |
28 | // display_Net_Info();
29 | // printf("DHCP LEASED TIME : %d sec. \r\n", getDHCPLeasetime());
30 | }
31 |
32 | void w5500_dhcp_conflict()
33 | {
34 | // TODO
35 | ;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/callback/dhcp_cb.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __DHCP_CB_H__
3 | #define __DHCP_CB_H__
4 |
5 | void w5500_dhcp_assign();
6 | void w5500_dhcp_conflict();
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/netutil/netutil.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __NETUTIL_H__
3 | #define __NETUTIL_H__
4 |
5 | #include
6 |
7 | #define SYSTEM_LITTLE_ENDIAN
8 |
9 | int8_t* inet_ntoa(uint32_t addr);
10 | int8_t* inet_ntoa_pad(uint32_t addr);
11 | uint32_t inet_addr(uint8_t* addr);
12 | uint16_t swaps(uint16_t i);
13 | uint32_t swapl(uint32_t l);
14 | uint16_t htons(uint16_t hostshort);
15 | uint32_t htonl(uint32_t hostlong);
16 | uint32_t ntohs(uint16_t netshort);
17 | uint32_t ntohl(uint32_t netlong);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/util/spi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/util/spi.c
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/src/util/spi.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef SPI_PRESENT
4 | #define SPI_PRESENT
5 |
6 |
7 |
8 | /* ------------------------------------------------------------------------------------------------- */
9 | /* BSP SPI */
10 | /* ------------------------------------------------------------------------------------------------- */
11 |
12 | #define SPI_SPEED_2 0
13 | #define SPI_SPEED_4 1
14 | #define SPI_SPEED_8 2
15 | #define SPI_SPEED_16 3
16 | #define SPI_SPEED_256 4
17 |
18 | // for vs1003b
19 | #define SPI_SPEED_LOW 0
20 | #define SPI_SPEED_HIGH 1
21 |
22 |
23 | /* ------------------------------------------------------------------------------------------------- */
24 | /* function SPI */
25 | /* ------------------------------------------------------------------------------------------------- */
26 |
27 |
28 |
29 |
30 | /* ------------------------------------------------------------------------------------------------- */
31 | /* extern SPI */
32 | /* ------------------------------------------------------------------------------------------------- */
33 |
34 | extern void bsp_set_spi1_speed (u8 speed);
35 | extern u8 bsp_readwritebyte_spi1 (u8 tx_data);
36 |
37 | extern void bsp_set_spi2_speed (u8 speed);
38 | extern void bsp_set_spi2_speed_mp3(u8 SpeedSet);
39 | extern u8 bsp_readwritebyte_spi2 (u8 tx_data);
40 |
41 | #endif
42 |
43 | /* End of module include. */
44 |
45 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/cmsis/README_CMSIS.txt:
--------------------------------------------------------------------------------
1 | * -------------------------------------------------------------------
2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved.
3 | *
4 | * Date: 17 February 2014
5 | * Revision: V4.00
6 | *
7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS)
8 | * Title: Release Note for CMSIS
9 | *
10 | * -------------------------------------------------------------------
11 |
12 | These files are the CMSIS Core Support and CMSIS DSP Include Files.
13 |
14 | To save space, from the complete ARM package (CMSIS-SP-00300-r4p0-00rel0.zip)
15 | only the CMSIS/Include folder was used here.
16 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip,
2 | the folder:
3 |
4 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
5 |
6 | The cmsis_device.h is added for convenience.
7 |
8 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/cmsis/cmsis_device.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef STM32F1_CMSIS_DEVICE_H_
7 | #define STM32F1_CMSIS_DEVICE_H_
8 |
9 | #include "stm32f10x.h"
10 |
11 | #endif // STM32F1_CMSIS_DEVICE_H_
12 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/cmsis/system_stm32f10x.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f10x.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f10x_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F10X_H
34 | #define __SYSTEM_STM32F10X_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F10x_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F10x_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @addtogroup STM32F10x_System_Exported_Constants
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @addtogroup STM32F10x_System_Exported_Macros
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @addtogroup STM32F10x_System_Exported_Functions
76 | * @{
77 | */
78 |
79 | extern void SystemInit(void);
80 | extern void SystemCoreClockUpdate(void);
81 | /**
82 | * @}
83 | */
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif /*__SYSTEM_STM32F10X_H */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/cortexm/ExceptionHandlers.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef CORTEXM_EXCEPTION_HANDLERS_H_
7 | #define CORTEXM_EXCEPTION_HANDLERS_H_
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #if defined(__cplusplus)
12 | extern "C"
13 | {
14 | #endif
15 |
16 | // External references to cortexm_handlers.c
17 |
18 | extern void
19 | Reset_Handler(void);
20 | extern void
21 | NMI_Handler(void);
22 | extern void
23 | HardFault_Handler(void);
24 |
25 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
26 | extern void
27 | MemManage_Handler(void);
28 | extern void
29 | BusFault_Handler(void);
30 | extern void
31 | UsageFault_Handler(void);
32 | #endif
33 |
34 | extern void
35 | SVC_Handler(void);
36 |
37 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
38 | extern void
39 | DebugMon_Handler(void);
40 | #endif
41 |
42 | extern void
43 | PendSV_Handler(void);
44 | extern void
45 | SysTick_Handler(void);
46 |
47 | #if defined(__cplusplus)
48 | }
49 | #endif
50 |
51 | // ----------------------------------------------------------------------------
52 |
53 | #endif // CORTEXM_EXCEPTION_HANDLERS_H_
54 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/include/stm32f1-stdperiph/stm32f10x_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_CRC_H
25 | #define __STM32F10x_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /** @defgroup CRC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Exported_Macros
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Exported_Functions
67 | * @{
68 | */
69 |
70 | void CRC_ResetDR(void);
71 | uint32_t CRC_CalcCRC(uint32_t Data);
72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
73 | uint32_t CRC_GetCRC(void);
74 | void CRC_SetIDRegister(uint8_t IDValue);
75 | uint8_t CRC_GetIDRegister(void);
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __STM32F10x_CRC_H */
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
95 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The system_stm32f10x.c file is from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
4 |
5 | The vectors_stm32f10x.c was created to conform to the startup_stm32f10x_xx*.s.
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/cortexm/_initialize_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | // Forward declarations.
13 |
14 | void
15 | __initialize_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // This is the default hardware initialisation routine, it can be
20 | // redefined in the application for more complex applications that
21 | // require early inits (before constructors), otherwise these can
22 | // be done in main().
23 | //
24 | // Called early from _start(), right after data & bss init, before
25 | // constructors.
26 | //
27 | // After Reset the Cortex-M processor is in Thread mode,
28 | // priority is Privileged, and the Stack is set to Main.
29 |
30 | void
31 | __attribute__((weak))
32 | __initialize_hardware(void)
33 | {
34 | // Call the CSMSIS system initialisation routine.
35 | SystemInit();
36 |
37 | #if defined (__VFP_FP__) && !defined (__SOFTFP__)
38 |
39 | // Enable the Cortex-M4 FPU only when -mfloat-abi=hard.
40 | // Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C)
41 |
42 | // Set bits 20-23 to enable CP10 and CP11 coprocessor
43 | SCB->CPACR |= (0xF << 20);
44 |
45 | #endif // (__VFP_FP__) && !(__SOFTFP__)
46 | }
47 |
48 | // ----------------------------------------------------------------------------
49 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/cortexm/_reset_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | NVIC_SystemReset(void);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // Forward declarations
19 |
20 | void
21 | __reset_hardware(void);
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | // This is the default hardware reset routine; it can be
26 | // redefined in the application for more complex applications.
27 | //
28 | // Called from _exit().
29 |
30 | void
31 | __attribute__((weak,noreturn))
32 | __reset_hardware()
33 | {
34 | NVIC_SystemReset();
35 | }
36 |
37 | // ----------------------------------------------------------------------------
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/cortexm/exception_handlers.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cortexm/ExceptionHandlers.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | _start(void);
15 |
16 | // ----------------------------------------------------------------------------
17 | // Default exception handlers. Override the ones here by defining your own
18 | // handler routines in your application code.
19 | // ----------------------------------------------------------------------------
20 |
21 | #if defined(DEBUG)
22 |
23 | // The DEBUG version is not naked, to allow breakpoints at Reset_Handler
24 | void __attribute__ ((section(".after_vectors"),noreturn))
25 | Reset_Handler (void)
26 | {
27 | _start ();
28 | }
29 |
30 | #else
31 |
32 | // The Release version is optimised to a quick branch to _start.
33 | void __attribute__ ((section(".after_vectors"),naked))
34 | Reset_Handler(void)
35 | {
36 | asm volatile
37 | (
38 | " b _start \n"
39 | :
40 | :
41 | :
42 | );
43 | }
44 |
45 | #endif
46 |
47 | void __attribute__ ((section(".after_vectors"),weak))
48 | NMI_Handler(void)
49 | {
50 | while (1)
51 | {
52 | }
53 | }
54 |
55 | void __attribute__ ((section(".after_vectors"),weak))
56 | HardFault_Handler(void)
57 | {
58 | while (1)
59 | {
60 | }
61 | }
62 |
63 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
64 |
65 | void __attribute__ ((section(".after_vectors"),weak))
66 | MemManage_Handler(void)
67 | {
68 | while (1)
69 | {
70 | }
71 | }
72 |
73 | void __attribute__ ((section(".after_vectors"),weak))
74 | BusFault_Handler(void)
75 | {
76 | while (1)
77 | {
78 | }
79 | }
80 |
81 | void __attribute__ ((section(".after_vectors"),weak))
82 | UsageFault_Handler(void)
83 | {
84 | while (1)
85 | {
86 | }
87 | }
88 |
89 | #endif
90 |
91 | void __attribute__ ((section(".after_vectors"),weak))
92 | SVC_Handler(void)
93 | {
94 | while (1)
95 | {
96 | }
97 | }
98 |
99 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
100 |
101 | void __attribute__ ((section(".after_vectors"),weak))
102 | DebugMon_Handler(void)
103 | {
104 | while (1)
105 | {
106 | }
107 | }
108 |
109 | #endif
110 |
111 | void __attribute__ ((section(".after_vectors"),weak))
112 | PendSV_Handler(void)
113 | {
114 | while (1)
115 | {
116 | }
117 | }
118 |
119 | void __attribute__ ((section(".after_vectors"),weak))
120 | SysTick_Handler(void)
121 | {
122 | while (1)
123 | {
124 | }
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/diag/Trace.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #if defined(TRACE)
9 |
10 | #include
11 | #include
12 | #include "diag/Trace.h"
13 | #include "string.h"
14 |
15 | #ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
16 | #define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (128)
17 | #endif
18 |
19 | // ----------------------------------------------------------------------------
20 |
21 | int
22 | trace_printf(const char* format, ...)
23 | {
24 | int ret;
25 | va_list ap;
26 |
27 | va_start (ap, format);
28 |
29 | // TODO: rewrite it to no longer use newlib, it is way too heavy
30 |
31 | static char buf[OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE];
32 |
33 | // Print to the local buffer
34 | ret = vsnprintf (buf, sizeof(buf), format, ap);
35 | if (ret > 0)
36 | {
37 | // Transfer the buffer to the device
38 | ret = trace_write (buf, (size_t)ret);
39 | }
40 |
41 | va_end (ap);
42 | return ret;
43 | }
44 |
45 | int
46 | trace_puts(const char *s)
47 | {
48 | trace_write(s, strlen(s));
49 | return trace_write("\n", 1);
50 | }
51 |
52 | int
53 | trace_putchar(int c)
54 | {
55 | trace_write((const char*)&c, 1);
56 | return c;
57 | }
58 |
59 | void
60 | trace_dump_args(int argc, char* argv[])
61 | {
62 | trace_printf("main(argc=%d, argv=[", argc);
63 | for (int i = 0; i < argc; ++i)
64 | {
65 | if (i != 0)
66 | {
67 | trace_printf(", ");
68 | }
69 | trace_printf("\"%s\"", argv[i]);
70 | }
71 | trace_printf("]);\n");
72 | }
73 |
74 | // ----------------------------------------------------------------------------
75 |
76 | #endif // TRACE
77 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/README.txt:
--------------------------------------------------------------------------------
1 |
2 | The following files extend or replace some of the the newlib functionality:
3 |
4 | _startup.c: a customised startup sequence, written in C
5 |
6 | _exit.c: a customised exit() implementation
7 |
8 | _syscalls.c: local versions of the libnosys/librdimon code
9 |
10 | _sbrk.c: a custom _sbrk() to match the actual linker scripts
11 |
12 | assert.c: implementation for the asserion macros
13 |
14 | _cxx.cpp: local versions of some C++ support, to avoid references to
15 | large functions.
16 |
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/_cxx.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | // These functions are redefined locally, to avoid references to some
9 | // heavy implementations in the standard C++ library.
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | #include
14 | #include
15 | #include "diag/Trace.h"
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | namespace __gnu_cxx
20 | {
21 | void
22 | __attribute__((noreturn))
23 | __verbose_terminate_handler();
24 |
25 | void
26 | __verbose_terminate_handler()
27 | {
28 | trace_puts(__func__);
29 | abort();
30 | }
31 | }
32 |
33 | // ----------------------------------------------------------------------------
34 |
35 | extern "C"
36 | {
37 | void
38 | __attribute__((noreturn))
39 | __cxa_pure_virtual();
40 |
41 | void
42 | __cxa_pure_virtual()
43 | {
44 | trace_puts(__func__);
45 | abort();
46 | }
47 | }
48 |
49 | // ----------------------------------------------------------------------------
50 |
51 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/_exit.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include "diag/Trace.h"
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | extern void
14 | __attribute__((noreturn))
15 | __reset_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // Forward declaration
20 |
21 | void
22 | _exit(int code);
23 |
24 | // ----------------------------------------------------------------------------
25 |
26 | // On Release, call the hardware reset procedure.
27 | // On Debug we just enter an infinite loop, to be used as landmark when halting
28 | // the debugger.
29 | //
30 | // It can be redefined in the application, if more functionality
31 | // is required.
32 |
33 | void
34 | __attribute__((weak))
35 | _exit(int code __attribute__((unused)))
36 | {
37 | #if !defined(DEBUG)
38 | __reset_hardware();
39 | #endif
40 |
41 | // TODO: write on trace
42 | while (1)
43 | ;
44 | }
45 |
46 | // ----------------------------------------------------------------------------
47 |
48 | void
49 | __attribute__((weak,noreturn))
50 | abort(void)
51 | {
52 | trace_puts("abort(), exiting...");
53 |
54 | _exit(1);
55 | }
56 |
57 | // ----------------------------------------------------------------------------
58 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/_sbrk.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | caddr_t
14 | _sbrk(int incr);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // The definitions used here should be kept in sync with the
19 | // stack definitions in the linker script.
20 |
21 | caddr_t
22 | _sbrk(int incr)
23 | {
24 | extern char _Heap_Begin; // Defined by the linker.
25 | extern char _Heap_Limit; // Defined by the linker.
26 |
27 | static char* current_heap_end;
28 | char* current_block_address;
29 |
30 | if (current_heap_end == 0)
31 | current_heap_end = &_Heap_Begin;
32 |
33 | current_block_address = current_heap_end;
34 |
35 | // Need to align heap to word boundary, else will get
36 | // hard faults on Cortex-M0. So we assume that heap starts on
37 | // word boundary, hence make sure we always add a multiple of
38 | // 4 to it.
39 | incr = (incr + 3) & (~3); // align value to 4
40 | if (current_heap_end + incr > &_Heap_Limit)
41 | {
42 | // Some of the libstdc++-v3 tests rely upon detecting
43 | // out of memory errors, so do not abort here.
44 | #if 0
45 | extern void abort (void);
46 |
47 | _write (1, "_sbrk: Heap and stack collision\n", 32);
48 |
49 | abort ();
50 | #else
51 | // Heap has overflowed
52 | errno = ENOMEM;
53 | return (caddr_t) -1;
54 | #endif
55 | }
56 |
57 | current_heap_end += incr;
58 |
59 | return (caddr_t) current_block_address;
60 | }
61 |
62 | // ----------------------------------------------------------------------------
63 |
64 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/_write.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // Do not include on semihosting and when freestanding
7 | #if !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #include
12 | #include "diag/Trace.h"
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | // When using retargetted configurations, the standard write() system call,
17 | // after a long way inside newlib, finally calls this implementation function.
18 |
19 | // Based on the file descriptor, it can send arrays of characters to
20 | // different physical devices.
21 |
22 | // Currently only the output and error file descriptors are tested,
23 | // and the characters are forwarded to the trace device, mainly
24 | // for demonstration purposes.
25 | /*
26 | ssize_t
27 | _write (int fd, const char* buf, size_t nbyte);
28 |
29 | ssize_t
30 | _write (int fd __attribute__((unused)), const char* buf __attribute__((unused)),
31 | size_t nbyte __attribute__((unused)))
32 | {
33 | #if defined(TRACE)
34 | // STDOUT and STDERR are routed to the trace device
35 | if (fd == 1 || fd == 2)
36 | {
37 | return trace_write (buf, nbyte);
38 | }
39 | #endif // TRACE
40 |
41 | errno = ENOSYS;
42 | return -1;
43 | }
44 | */
45 | // ----------------------------------------------------------------------------
46 |
47 | #endif // !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
48 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/newlib/assert.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #include "diag/Trace.h"
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | void
15 | __attribute__((noreturn))
16 | __assert_func (const char *file, int line, const char *func,
17 | const char *failedexpr)
18 | {
19 | trace_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
20 | failedexpr, file, line, func ? ", function: " : "",
21 | func ? func : "");
22 | abort ();
23 | /* NOTREACHED */
24 | }
25 |
26 | // ----------------------------------------------------------------------------
27 |
28 | // This is STM32 specific, but can be used on other platforms too.
29 | // If you need it, add the following to your application header:
30 |
31 | //#ifdef USE_FULL_ASSERT
32 | //#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
33 | //void assert_failed(uint8_t* file, uint32_t line);
34 | //#else
35 | //#define assert_param(expr) ((void)0)
36 | //#endif // USE_FULL_ASSERT
37 |
38 | #if defined(USE_FULL_ASSERT)
39 |
40 | void
41 | assert_failed (uint8_t* file, uint32_t line);
42 |
43 | // Called from the assert_param() macro, usually defined in the stm32f*_conf.h
44 | void
45 | __attribute__((noreturn))
46 | assert_failed (uint8_t* file, uint32_t line)
47 | {
48 | trace_printf ("assert_param() failed: file \"%s\", line %d\n", file, line);
49 | abort ();
50 | /* NOTREACHED */
51 | }
52 |
53 | #endif // defined(USE_FULL_ASSERT)
54 |
55 | // ----------------------------------------------------------------------------
56 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_App/system/src/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | WIZ550web_Boot
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | org.eclipse.cdt.core.cnature
23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
25 | org.eclipse.cdt.core.ccnature
26 |
27 |
28 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/ldscripts/libs.ld:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Placeholder to list other libraries required by the application.
4 |
5 | GROUP(
6 | )
7 |
8 | */
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/ldscripts/mem.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 24K
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/Internet/TFTP/tftp.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file tftp.h
3 | * @brief TFTP Header File.
4 | * @version 0.1.0
5 | * @author Sang-sik Kim
6 | */
7 | #ifndef __TFTP_H__
8 | #define __TFTP_H__
9 |
10 | #include
11 |
12 | /* tftp message */
13 | #define TFTP_RRQ 1
14 | #define TFTP_WRQ 2
15 | #define TFTP_DATA 3
16 | #define TFTP_ACK 4
17 | #define TFTP_ERROR 5
18 | #define TFTP_OACK 6
19 |
20 | /* tftp state */
21 | #define STATE_NONE 0
22 | #define STATE_RRQ 1
23 | #define STATE_WRQ 2
24 | #define STATE_DATA 3
25 | #define STATE_ACK 4
26 | #define STATE_OACK 5
27 |
28 | /* tftp transfer mode */
29 | #define TRANS_ASCII "netascii"
30 | #define TRANS_BINARY "octet"
31 |
32 | /* tftp progress state */
33 | #define TFTP_PROGRESS 0
34 | #define TFTP_FAIL 1
35 | #define TFTP_SUCCESS 2
36 |
37 | /* define */
38 | #define TFTP_SERVER_PORT 69
39 | #define TFTP_TEMP_PORT 51000
40 | #define TFTP_BLK_SIZE 512
41 | #define MAX_MTU_SIZE 1514
42 | #define FILE_NAME_SIZE 20
43 |
44 | //#define __TFTP_DEBUG__
45 |
46 | /* typedef */
47 | typedef struct tftp_data {
48 | uint16_t opcode;
49 | uint16_t block_num;
50 | uint8_t data[0];
51 | } TFTP_DATA_T;
52 |
53 | typedef struct tftp_error {
54 | uint16_t opcode;
55 | uint16_t error_code;
56 | uint8_t error_msg[0];
57 | } TFTP_ERROR_T;
58 |
59 | typedef struct tftp_option {
60 | uint8_t *code;
61 | uint8_t *value;
62 | } TFTP_OPTION;
63 |
64 | /* Functions */
65 | void TFTP_init(uint8_t socket, uint8_t *buf);
66 | void TFTP_exit(void);
67 | int TFTP_run(void);
68 | void TFTP_read_request(uint32_t server_ip, uint8_t *filename);
69 | void tftp_timeout_handler(void);
70 |
71 | #endif /*__TFTP_H__ */
72 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/flashHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __FLASHHANDLER_H__
3 | #define __FLASHHANDLER_H__
4 |
5 | #define MULTIFLASH_ENABLE
6 |
7 | #define FLASH_PAGE0_BASE 0x08000000
8 | #define FLASH_CONFIG_PAGE 3
9 | #if !defined(MULTIFLASH_ENABLE)
10 | #define FLASH_PAGE_SIZE 0x400
11 | #define FLASH_PAGE 128
12 | #define FLASH_BOOT_PAGE 24 // 1 page 1K
13 | #define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*126)) // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
14 | //#define FLASH_PAGE_SIZE 0x800
15 | //#define FLASH_PAGE 64
16 | //#define FLASH_BOOT_PAGE 12 // 1 page 2K
17 | //#define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*62)) // Page62,63 (STM32103RCT6, the last page of 256kB on-chip flash, 4kB size)
18 | #define FLASH_APP_PAGE (FLASH_PAGE - FLASH_BOOT_PAGE - FLASH_CONFIG_PAGE)
19 | #endif
20 |
21 | #if defined(MULTIFLASH_ENABLE)
22 | typedef struct __Probe_Flash {
23 | uint32_t flash_page0_base;
24 | uint32_t flash_app_base;
25 | uint16_t flash_page_size;
26 | uint16_t flash_page;
27 | uint8_t flash_boot_page;
28 | uint8_t flash_config_page;
29 | uint16_t flash_app_page ;
30 | uint32_t config_page_addr ;
31 | } __attribute__((packed)) Probe_Flash;
32 |
33 | extern Probe_Flash flash;
34 |
35 | void probe_flash(void);
36 | #endif
37 |
38 | int addr_to_page(uint32_t addr);
39 | void erase_flash_page(uint32_t page_addr);
40 | int write_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
41 | int read_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
42 | void save_data(uint8_t *data, uint32_t data_len, uint16_t block_number);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/gpioHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __GPIOHANDLER_H__
3 | #define __GPIOHANDLER_H__
4 |
5 | #include
6 |
7 | #define LEDn 4
8 |
9 | #define LED1_PIN GPIO_Pin_4
10 | #define LED1_GPIO_PORT GPIOC
11 | #define LED1_GPIO_CLK RCC_APB2Periph_GPIOC
12 |
13 | #define LED2_PIN GPIO_Pin_5
14 | #define LED2_GPIO_PORT GPIOC
15 | #define LED2_GPIO_CLK RCC_APB2Periph_GPIOC
16 |
17 | #define BOOT_PIN GPIO_Pin_12
18 | #define BOOT_GPIO_PORT GPIOC
19 | #define BOOT_GPIO_CLK RCC_APB2Periph_GPIOC
20 |
21 | typedef enum
22 | {
23 | LED1 = 0,
24 | LED2 = 1,
25 | LED3 = 2,
26 | LED4 = 3
27 | } Led_TypeDef;
28 |
29 | void LED_Init(Led_TypeDef Led);
30 | void LED_On(Led_TypeDef Led);
31 | void LED_Off(Led_TypeDef Led);
32 | void LED_Toggle(Led_TypeDef Led);
33 | uint8_t get_LED_Status(Led_TypeDef Led);
34 | void BOOT_Pin_Init();
35 | uint8_t get_bootpin_Status();
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/rccHandler.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.c
3 | * @brief RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #include "stm32f10x.h"
13 | #include "rccHandler.h"
14 |
15 | /**
16 | * @brief Sets System clock frequency to 72MHz and configure HCLK, PCLK2
17 | * and PCLK1 prescalers.
18 | * @param None
19 | * @return None
20 | */
21 | #if 1
22 | void RCC_Configuration(void)
23 | {
24 | ErrorStatus HSEStartUpStatus;
25 |
26 | /* RCC system reset(for debug purpose) */
27 | RCC_DeInit();
28 |
29 | /* Enable HSE */
30 | RCC_HSEConfig(RCC_HSE_ON);
31 |
32 | /* Wait till HSE is ready */
33 | HSEStartUpStatus = RCC_WaitForHSEStartUp();
34 |
35 | if(HSEStartUpStatus == SUCCESS)
36 | {
37 | /* Enable Prefetch Buffer */
38 | FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
39 |
40 | /* Flash 2 wait state */
41 | FLASH_SetLatency(FLASH_Latency_2);
42 |
43 | /* HCLK = SYSCLK */
44 | RCC_HCLKConfig(RCC_SYSCLK_Div1);
45 |
46 | /* PCLK2 = HCLK */
47 | RCC_PCLK2Config(RCC_HCLK_Div1);
48 |
49 | /* PCLK1 = HCLK/2 */
50 | RCC_PCLK1Config(RCC_HCLK_Div2);
51 |
52 | /* PLLCLK = 8MHz * 9 = 72 MHz */
53 | RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);
54 | // RCC_PLLConfig(RCC_PLLSource_PREDIV1, RCC_PLLMul_9);
55 |
56 | /* Enable PLL */
57 | RCC_PLLCmd(ENABLE);
58 |
59 | /* Wait till PLL is ready */
60 | while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
61 | {
62 | }
63 |
64 | /* Select PLL as system clock source */
65 | RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
66 |
67 | /* Wait till PLL is used as system clock source */
68 | while(RCC_GetSYSCLKSource() != 0x08)
69 | {
70 | }
71 |
72 | /* TIM2 clock enable */
73 | // RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2|RCC_APB1Periph_TIM3|RCC_APB1Periph_USART2, ENABLE);
74 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
75 |
76 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
77 |
78 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
79 | | RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
80 | }
81 | }
82 | #else
83 | void RCC_Configuration(void)
84 | {
85 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
86 | | RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
87 | }
88 | #endif
89 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/rccHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.h
3 | * @brief Header File for RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __RCCHANDLER_H__
13 | #define __RCCHANDLER_H__
14 |
15 | void RCC_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/spiHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __SPIHANDLER_H__
3 | #define __SPIHANDLER_H__
4 |
5 | #define W5500_SPI SPI2
6 | #define W5500_SPI_CLK RCC_APB1Periph_SPI2
7 |
8 | #define W5500_SPI_SCK_PIN GPIO_Pin_13 /* PB.13 */
9 | #define W5500_SPI_SCK_GPIO_PORT GPIOB /* GPIOB */
10 | #define W5500_SPI_SCK_GPIO_CLK RCC_APB2Periph_GPIOB
11 |
12 | #define W5500_SPI_MISO_PIN GPIO_Pin_14 /* PB.14 */
13 | #define W5500_SPI_MISO_GPIO_PORT GPIOB /* GPIOB */
14 | #define W5500_SPI_MISO_GPIO_CLK RCC_APB2Periph_GPIOB
15 |
16 | #define W5500_SPI_MOSI_PIN GPIO_Pin_15 /* PB.15 */
17 | #define W5500_SPI_MOSI_GPIO_PORT GPIOB /* GPIOB */
18 | #define W5500_SPI_MOSI_GPIO_CLK RCC_APB2Periph_GPIOB
19 |
20 | #define W5500_CS_PIN GPIO_Pin_12 /* PB.12 */
21 | #define W5500_CS_GPIO_PORT GPIOB /* GPIOB */
22 | #define W5500_CS_GPIO_CLK RCC_APB2Periph_GPIOB
23 |
24 | #define W5500_DUMMY_BYTE 0xFF
25 | #define W5500_RESET_PIN GPIO_Pin_9
26 |
27 | void W5500_SPI_Init(void);
28 | void W5500_Init(void);
29 | //void Net_Conf();
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/storageHandler.c:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.c
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 |
9 | #include
10 | #include "stm32f10x.h"
11 | #include "storageHandler.h"
12 | #include "flashHandler.h"
13 |
14 | #if !defined(MULTIFLASH_ENABLE)
15 | #define BLOCK_SIZE FLASH_PAGE_SIZE
16 | //#define CONFIG_PAGE_ADDR 0x801F800 // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
17 | #endif
18 |
19 | int read_storage(uint8_t isConfig, void *data, uint16_t size)
20 | {
21 | uint32_t address;
22 |
23 | if(isConfig == 1) {
24 | #if !defined(MULTIFLASH_ENABLE)
25 | address = BLOCK_SIZE + CONFIG_PAGE_ADDR;
26 | #else
27 | address = flash.flash_page_size + flash.config_page_addr;
28 | #endif
29 | }
30 | else {
31 | #if !defined(MULTIFLASH_ENABLE)
32 | address = 0x00000000 + CONFIG_PAGE_ADDR;
33 | #else
34 | address = 0x00000000 + flash.config_page_addr;
35 | #endif
36 | }
37 |
38 | return read_flash(address, data, size);
39 | }
40 |
41 | int write_storage(uint8_t isConfig, void *data, uint16_t size)
42 | {
43 | uint32_t address;
44 |
45 | if(isConfig == 1) {
46 | #if !defined(MULTIFLASH_ENABLE)
47 | address = BLOCK_SIZE + CONFIG_PAGE_ADDR;
48 | #else
49 | address = flash.flash_page_size + flash.config_page_addr;
50 | #endif
51 | }
52 | else {
53 | #if !defined(MULTIFLASH_ENABLE)
54 | address = 0x00000000 + CONFIG_PAGE_ADDR;
55 | #else
56 | address = 0x00000000 + flash.config_page_addr;
57 | #endif
58 | }
59 |
60 | erase_flash_page(address);
61 | return write_flash(address, data, size);
62 | }
63 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/storageHandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.h
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 | #ifndef STORAGEHANDLER_H_
9 | #define STORAGEHANDLER_H_
10 |
11 | #include
12 |
13 | int read_storage(uint8_t isConfig, void *data, uint16_t size);
14 | int write_storage(uint8_t isConfig, void *data, uint16_t size);
15 |
16 | #endif /* STORAGEHANDLER_H_ */
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/timerHandler.c:
--------------------------------------------------------------------------------
1 |
2 | #include "stm32f10x.h"
3 | #include "gpioHandler.h"
4 | #include "uartHandler.h"
5 | #include "timerHandler.h"
6 | #include "tftp.h"
7 |
8 | static uint32_t mill_sec = 0;
9 |
10 | void TIM2_IRQHandler(void)
11 | {
12 | if(TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET)
13 | {
14 | TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
15 |
16 | mill_sec++;
17 |
18 | if((mill_sec % 100) == 0) {
19 | LED_Toggle(LED1);
20 | LED_Toggle(LED2);
21 | }
22 |
23 | if((mill_sec % 1000) == 0) {
24 | mill_sec = 0;
25 | tftp_timeout_handler();
26 | }
27 | }
28 | }
29 |
30 | /**
31 | * @brief Configures the Timer
32 | * @param None
33 | * @return None
34 | */
35 | void Timer_Configuration(void)
36 | {
37 | TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
38 | NVIC_InitTypeDef NVIC_InitStructure;
39 |
40 | /* Enable the TIM2 global Interrupt */
41 | NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
42 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
43 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
44 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
45 |
46 | NVIC_Init(&NVIC_InitStructure);
47 |
48 | /* Time base configuration */
49 | TIM_TimeBaseStructure.TIM_Period = 1000;
50 | TIM_TimeBaseStructure.TIM_Prescaler = 0;
51 | TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1;
52 | TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
53 |
54 | TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
55 |
56 | /* Prescaler configuration */
57 | TIM_PrescalerConfig(TIM2, 71, TIM_PSCReloadMode_Immediate);
58 |
59 | /* TIM enable counter */
60 | TIM_Cmd(TIM2, ENABLE);
61 |
62 | /* TIM IT enable */
63 | TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
64 | }
65 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/timerHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __TIMERHANDLER_H__
3 | #define __TIMERHANDLER_H__
4 |
5 | void Timer_Configuration(void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/PlatformHandler/uartHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __UARTHANDLER_H__
13 | #define __UARTHANDLER_H__
14 |
15 | #include "ring_buffer.h"
16 |
17 | #define USART1_TX GPIO_Pin_9 // out
18 | #define USART1_RX GPIO_Pin_10 // in
19 | #define USART1_CTS GPIO_Pin_11 // in
20 | #define USART1_RTS GPIO_Pin_12 // out
21 |
22 | #define UART_SRB_SIZE 1024 /* Send */
23 | #define UART_RRB_SIZE 1024 /* Receive */
24 |
25 | extern RINGBUFF_T txring1, rxring1;
26 | extern uint32_t baud_table[11];
27 |
28 | void USART1_Configuration(void);
29 |
30 | int UART_read(void *data, int bytes);
31 | uint32_t UART_write(void *data, int bytes);
32 | int UART_read_blk(void *data, int bytes);
33 | void myprintf(char *fmt, ...);
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/common.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __COMMON_H__
3 | #define __COMMON_H__
4 |
5 | #define MAJOR_VER 101
6 | #define MINOR_VER 0
7 | #define MAINTENANCE_VER 0
8 |
9 | #define APP_BASE 0x08006000 // Boot Size 24K
10 |
11 | #define SOCK_CONFIG 0
12 | #define SOCK_TFTP 1
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/src/netutil/netutil.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __NETUTIL_H__
3 | #define __NETUTIL_H__
4 |
5 | #include
6 |
7 | #define SYSTEM_LITTLE_ENDIAN
8 |
9 | int8_t* inet_ntoa(uint32_t addr);
10 | int8_t* inet_ntoa_pad(uint32_t addr);
11 | uint32_t inet_addr(uint8_t* addr);
12 | uint16_t swaps(uint16_t i);
13 | uint32_t swapl(uint32_t l);
14 | uint16_t htons(uint16_t hostshort);
15 | uint32_t htonl(uint32_t hostlong);
16 | uint32_t ntohs(uint16_t netshort);
17 | uint32_t ntohl(uint32_t netlong);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/cmsis/README_CMSIS.txt:
--------------------------------------------------------------------------------
1 | * -------------------------------------------------------------------
2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved.
3 | *
4 | * Date: 17 February 2014
5 | * Revision: V4.00
6 | *
7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS)
8 | * Title: Release Note for CMSIS
9 | *
10 | * -------------------------------------------------------------------
11 |
12 | These files are the CMSIS Core Support and CMSIS DSP Include Files.
13 |
14 | To save space, from the complete ARM package (CMSIS-SP-00300-r4p0-00rel0.zip)
15 | only the CMSIS/Include folder was used here.
16 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip,
2 | the folder:
3 |
4 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
5 |
6 | The cmsis_device.h is added for convenience.
7 |
8 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/cmsis/cmsis_device.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef STM32F1_CMSIS_DEVICE_H_
7 | #define STM32F1_CMSIS_DEVICE_H_
8 |
9 | #include "stm32f10x.h"
10 |
11 | #endif // STM32F1_CMSIS_DEVICE_H_
12 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/cmsis/system_stm32f10x.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f10x.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f10x_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F10X_H
34 | #define __SYSTEM_STM32F10X_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F10x_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F10x_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @addtogroup STM32F10x_System_Exported_Constants
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @addtogroup STM32F10x_System_Exported_Macros
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @addtogroup STM32F10x_System_Exported_Functions
76 | * @{
77 | */
78 |
79 | extern void SystemInit(void);
80 | extern void SystemCoreClockUpdate(void);
81 | /**
82 | * @}
83 | */
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif /*__SYSTEM_STM32F10X_H */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/cortexm/ExceptionHandlers.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef CORTEXM_EXCEPTION_HANDLERS_H_
7 | #define CORTEXM_EXCEPTION_HANDLERS_H_
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #if defined(__cplusplus)
12 | extern "C"
13 | {
14 | #endif
15 |
16 | // External references to cortexm_handlers.c
17 |
18 | extern void
19 | Reset_Handler(void);
20 | extern void
21 | NMI_Handler(void);
22 | extern void
23 | HardFault_Handler(void);
24 |
25 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
26 | extern void
27 | MemManage_Handler(void);
28 | extern void
29 | BusFault_Handler(void);
30 | extern void
31 | UsageFault_Handler(void);
32 | #endif
33 |
34 | extern void
35 | SVC_Handler(void);
36 |
37 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
38 | extern void
39 | DebugMon_Handler(void);
40 | #endif
41 |
42 | extern void
43 | PendSV_Handler(void);
44 | extern void
45 | SysTick_Handler(void);
46 |
47 | #if defined(__cplusplus)
48 | }
49 | #endif
50 |
51 | // ----------------------------------------------------------------------------
52 |
53 | #endif // CORTEXM_EXCEPTION_HANDLERS_H_
54 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/include/stm32f1-stdperiph/stm32f10x_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_CRC_H
25 | #define __STM32F10x_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /** @defgroup CRC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Exported_Macros
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Exported_Functions
67 | * @{
68 | */
69 |
70 | void CRC_ResetDR(void);
71 | uint32_t CRC_CalcCRC(uint32_t Data);
72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
73 | uint32_t CRC_GetCRC(void);
74 | void CRC_SetIDRegister(uint8_t IDValue);
75 | uint8_t CRC_GetIDRegister(void);
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __STM32F10x_CRC_H */
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
95 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The system_stm32f10x.c file is from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
4 |
5 | The vectors_stm32f10x.c was created to conform to the startup_stm32f10x_xx*.s.
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/cortexm/_initialize_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | // Forward declarations.
13 |
14 | void
15 | __initialize_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // This is the default hardware initialisation routine, it can be
20 | // redefined in the application for more complex applications that
21 | // require early inits (before constructors), otherwise these can
22 | // be done in main().
23 | //
24 | // Called early from _start(), right after data & bss init, before
25 | // constructors.
26 | //
27 | // After Reset the Cortex-M processor is in Thread mode,
28 | // priority is Privileged, and the Stack is set to Main.
29 |
30 | void
31 | __attribute__((weak))
32 | __initialize_hardware(void)
33 | {
34 | // Call the CSMSIS system initialisation routine.
35 | SystemInit();
36 |
37 | #if defined (__VFP_FP__) && !defined (__SOFTFP__)
38 |
39 | // Enable the Cortex-M4 FPU only when -mfloat-abi=hard.
40 | // Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C)
41 |
42 | // Set bits 20-23 to enable CP10 and CP11 coprocessor
43 | SCB->CPACR |= (0xF << 20);
44 |
45 | #endif // (__VFP_FP__) && !(__SOFTFP__)
46 | }
47 |
48 | // ----------------------------------------------------------------------------
49 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/cortexm/_reset_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | NVIC_SystemReset(void);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // Forward declarations
19 |
20 | void
21 | __reset_hardware(void);
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | // This is the default hardware reset routine; it can be
26 | // redefined in the application for more complex applications.
27 | //
28 | // Called from _exit().
29 |
30 | void
31 | __attribute__((weak,noreturn))
32 | __reset_hardware()
33 | {
34 | NVIC_SystemReset();
35 | }
36 |
37 | // ----------------------------------------------------------------------------
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/cortexm/exception_handlers.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cortexm/ExceptionHandlers.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | _start(void);
15 |
16 | // ----------------------------------------------------------------------------
17 | // Default exception handlers. Override the ones here by defining your own
18 | // handler routines in your application code.
19 | // ----------------------------------------------------------------------------
20 |
21 | #if defined(DEBUG)
22 |
23 | // The DEBUG version is not naked, to allow breakpoints at Reset_Handler
24 | void __attribute__ ((section(".after_vectors"),noreturn))
25 | Reset_Handler (void)
26 | {
27 | _start ();
28 | }
29 |
30 | #else
31 |
32 | // The Release version is optimised to a quick branch to _start.
33 | void __attribute__ ((section(".after_vectors"),naked))
34 | Reset_Handler(void)
35 | {
36 | asm volatile
37 | (
38 | " b _start \n"
39 | :
40 | :
41 | :
42 | );
43 | }
44 |
45 | #endif
46 |
47 | void __attribute__ ((section(".after_vectors"),weak))
48 | NMI_Handler(void)
49 | {
50 | while (1)
51 | {
52 | }
53 | }
54 |
55 | void __attribute__ ((section(".after_vectors"),weak))
56 | HardFault_Handler(void)
57 | {
58 | while (1)
59 | {
60 | }
61 | }
62 |
63 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
64 |
65 | void __attribute__ ((section(".after_vectors"),weak))
66 | MemManage_Handler(void)
67 | {
68 | while (1)
69 | {
70 | }
71 | }
72 |
73 | void __attribute__ ((section(".after_vectors"),weak))
74 | BusFault_Handler(void)
75 | {
76 | while (1)
77 | {
78 | }
79 | }
80 |
81 | void __attribute__ ((section(".after_vectors"),weak))
82 | UsageFault_Handler(void)
83 | {
84 | while (1)
85 | {
86 | }
87 | }
88 |
89 | #endif
90 |
91 | void __attribute__ ((section(".after_vectors"),weak))
92 | SVC_Handler(void)
93 | {
94 | while (1)
95 | {
96 | }
97 | }
98 |
99 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
100 |
101 | void __attribute__ ((section(".after_vectors"),weak))
102 | DebugMon_Handler(void)
103 | {
104 | while (1)
105 | {
106 | }
107 | }
108 |
109 | #endif
110 |
111 | void __attribute__ ((section(".after_vectors"),weak))
112 | PendSV_Handler(void)
113 | {
114 | while (1)
115 | {
116 | }
117 | }
118 |
119 | void __attribute__ ((section(".after_vectors"),weak))
120 | SysTick_Handler(void)
121 | {
122 | while (1)
123 | {
124 | }
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/diag/Trace.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #if defined(TRACE)
9 |
10 | #include
11 | #include
12 | #include "diag/Trace.h"
13 | #include "string.h"
14 |
15 | #ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
16 | #define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (128)
17 | #endif
18 |
19 | // ----------------------------------------------------------------------------
20 |
21 | int
22 | trace_printf(const char* format, ...)
23 | {
24 | int ret;
25 | va_list ap;
26 |
27 | va_start (ap, format);
28 |
29 | // TODO: rewrite it to no longer use newlib, it is way too heavy
30 |
31 | static char buf[OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE];
32 |
33 | // Print to the local buffer
34 | ret = vsnprintf (buf, sizeof(buf), format, ap);
35 | if (ret > 0)
36 | {
37 | // Transfer the buffer to the device
38 | ret = trace_write (buf, (size_t)ret);
39 | }
40 |
41 | va_end (ap);
42 | return ret;
43 | }
44 |
45 | int
46 | trace_puts(const char *s)
47 | {
48 | trace_write(s, strlen(s));
49 | return trace_write("\n", 1);
50 | }
51 |
52 | int
53 | trace_putchar(int c)
54 | {
55 | trace_write((const char*)&c, 1);
56 | return c;
57 | }
58 |
59 | void
60 | trace_dump_args(int argc, char* argv[])
61 | {
62 | trace_printf("main(argc=%d, argv=[", argc);
63 | for (int i = 0; i < argc; ++i)
64 | {
65 | if (i != 0)
66 | {
67 | trace_printf(", ");
68 | }
69 | trace_printf("\"%s\"", argv[i]);
70 | }
71 | trace_printf("]);\n");
72 | }
73 |
74 | // ----------------------------------------------------------------------------
75 |
76 | #endif // TRACE
77 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/README.txt:
--------------------------------------------------------------------------------
1 |
2 | The following files extend or replace some of the the newlib functionality:
3 |
4 | _startup.c: a customised startup sequence, written in C
5 |
6 | _exit.c: a customised exit() implementation
7 |
8 | _syscalls.c: local versions of the libnosys/librdimon code
9 |
10 | _sbrk.c: a custom _sbrk() to match the actual linker scripts
11 |
12 | assert.c: implementation for the asserion macros
13 |
14 | _cxx.cpp: local versions of some C++ support, to avoid references to
15 | large functions.
16 |
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/_cxx.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | // These functions are redefined locally, to avoid references to some
9 | // heavy implementations in the standard C++ library.
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | #include
14 | #include
15 | #include "diag/Trace.h"
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | namespace __gnu_cxx
20 | {
21 | void
22 | __attribute__((noreturn))
23 | __verbose_terminate_handler();
24 |
25 | void
26 | __verbose_terminate_handler()
27 | {
28 | trace_puts(__func__);
29 | abort();
30 | }
31 | }
32 |
33 | // ----------------------------------------------------------------------------
34 |
35 | extern "C"
36 | {
37 | void
38 | __attribute__((noreturn))
39 | __cxa_pure_virtual();
40 |
41 | void
42 | __cxa_pure_virtual()
43 | {
44 | trace_puts(__func__);
45 | abort();
46 | }
47 | }
48 |
49 | // ----------------------------------------------------------------------------
50 |
51 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/_exit.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include "diag/Trace.h"
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | extern void
14 | __attribute__((noreturn))
15 | __reset_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // Forward declaration
20 |
21 | void
22 | _exit(int code);
23 |
24 | // ----------------------------------------------------------------------------
25 |
26 | // On Release, call the hardware reset procedure.
27 | // On Debug we just enter an infinite loop, to be used as landmark when halting
28 | // the debugger.
29 | //
30 | // It can be redefined in the application, if more functionality
31 | // is required.
32 |
33 | void
34 | __attribute__((weak))
35 | _exit(int code __attribute__((unused)))
36 | {
37 | #if !defined(DEBUG)
38 | __reset_hardware();
39 | #endif
40 |
41 | // TODO: write on trace
42 | while (1)
43 | ;
44 | }
45 |
46 | // ----------------------------------------------------------------------------
47 |
48 | void
49 | __attribute__((weak,noreturn))
50 | abort(void)
51 | {
52 | trace_puts("abort(), exiting...");
53 |
54 | _exit(1);
55 | }
56 |
57 | // ----------------------------------------------------------------------------
58 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/_sbrk.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | caddr_t
14 | _sbrk(int incr);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // The definitions used here should be kept in sync with the
19 | // stack definitions in the linker script.
20 |
21 | caddr_t
22 | _sbrk(int incr)
23 | {
24 | extern char _Heap_Begin; // Defined by the linker.
25 | extern char _Heap_Limit; // Defined by the linker.
26 |
27 | static char* current_heap_end;
28 | char* current_block_address;
29 |
30 | if (current_heap_end == 0)
31 | current_heap_end = &_Heap_Begin;
32 |
33 | current_block_address = current_heap_end;
34 |
35 | // Need to align heap to word boundary, else will get
36 | // hard faults on Cortex-M0. So we assume that heap starts on
37 | // word boundary, hence make sure we always add a multiple of
38 | // 4 to it.
39 | incr = (incr + 3) & (~3); // align value to 4
40 | if (current_heap_end + incr > &_Heap_Limit)
41 | {
42 | // Some of the libstdc++-v3 tests rely upon detecting
43 | // out of memory errors, so do not abort here.
44 | #if 0
45 | extern void abort (void);
46 |
47 | _write (1, "_sbrk: Heap and stack collision\n", 32);
48 |
49 | abort ();
50 | #else
51 | // Heap has overflowed
52 | errno = ENOMEM;
53 | return (caddr_t) -1;
54 | #endif
55 | }
56 |
57 | current_heap_end += incr;
58 |
59 | return (caddr_t) current_block_address;
60 | }
61 |
62 | // ----------------------------------------------------------------------------
63 |
64 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/_write.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // Do not include on semihosting and when freestanding
7 | #if !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #include
12 | #include "diag/Trace.h"
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | // When using retargetted configurations, the standard write() system call,
17 | // after a long way inside newlib, finally calls this implementation function.
18 |
19 | // Based on the file descriptor, it can send arrays of characters to
20 | // different physical devices.
21 |
22 | // Currently only the output and error file descriptors are tested,
23 | // and the characters are forwarded to the trace device, mainly
24 | // for demonstration purposes.
25 |
26 | ssize_t
27 | _write (int fd, const char* buf, size_t nbyte);
28 |
29 | ssize_t
30 | _write (int fd __attribute__((unused)), const char* buf __attribute__((unused)),
31 | size_t nbyte __attribute__((unused)))
32 | {
33 | #if defined(TRACE)
34 | // STDOUT and STDERR are routed to the trace device
35 | if (fd == 1 || fd == 2)
36 | {
37 | return trace_write (buf, nbyte);
38 | }
39 | #endif // TRACE
40 |
41 | errno = ENOSYS;
42 | return -1;
43 | }
44 |
45 | // ----------------------------------------------------------------------------
46 |
47 | #endif // !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
48 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/newlib/assert.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #include "diag/Trace.h"
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | void
15 | __attribute__((noreturn))
16 | __assert_func (const char *file, int line, const char *func,
17 | const char *failedexpr)
18 | {
19 | trace_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
20 | failedexpr, file, line, func ? ", function: " : "",
21 | func ? func : "");
22 | abort ();
23 | /* NOTREACHED */
24 | }
25 |
26 | // ----------------------------------------------------------------------------
27 |
28 | // This is STM32 specific, but can be used on other platforms too.
29 | // If you need it, add the following to your application header:
30 |
31 | //#ifdef USE_FULL_ASSERT
32 | //#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
33 | //void assert_failed(uint8_t* file, uint32_t line);
34 | //#else
35 | //#define assert_param(expr) ((void)0)
36 | //#endif // USE_FULL_ASSERT
37 |
38 | #if defined(USE_FULL_ASSERT)
39 |
40 | void
41 | assert_failed (uint8_t* file, uint32_t line);
42 |
43 | // Called from the assert_param() macro, usually defined in the stm32f*_conf.h
44 | void
45 | __attribute__((noreturn))
46 | assert_failed (uint8_t* file, uint32_t line)
47 | {
48 | trace_printf ("assert_param() failed: file \"%s\", line %d\n", file, line);
49 | abort ();
50 | /* NOTREACHED */
51 | }
52 |
53 | #endif // defined(USE_FULL_ASSERT)
54 |
55 | // ----------------------------------------------------------------------------
56 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.0/WIZ550web_Boot/system/src/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | WIZ550web_App
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | org.eclipse.cdt.core.cnature
23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
25 | org.eclipse.cdt.core.ccnature
26 |
27 |
28 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/include/stm32f10x_it.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file Demo/inc/stm32f10x_it.h
4 | * @author MCD Team
5 | * @version V1.0.0
6 | * @date 09/13/2010
7 | * @brief This file contains the headers of the interrupt handlers.
8 | ******************************************************************************
9 | * @copy
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2010 STMicroelectronics
19 | */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __STM32F10x_IT_H
23 | #define __STM32F10x_IT_H
24 |
25 | /* Includes ------------------------------------------------------------------*/
26 | #include "stm32f10x.h"
27 |
28 | /* Exported types ------------------------------------------------------------*/
29 | extern vu32 TickValue;
30 | /* Exported constants --------------------------------------------------------*/
31 | /* Exported macro ------------------------------------------------------------*/
32 | /* Exported functions ------------------------------------------------------- */
33 |
34 | void NMI_Handler(void);
35 | void HardFault_Handler(void);
36 | void MemManage_Handler(void);
37 | void BusFault_Handler(void);
38 | void UsageFault_Handler(void);
39 | void SVC_Handler(void);
40 | void DebugMon_Handler(void);
41 | void PendSV_Handler(void);
42 | void SysTick_Handler(void);
43 |
44 | #endif /* __STM32F10x_IT_H */
45 |
46 | /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
47 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/ldscripts/libs.ld:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Placeholder to list other libraries required by the application.
4 |
5 | GROUP(
6 | )
7 |
8 | */
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/ldscripts/mem.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08006000, LENGTH = 104K /*before 104K*/
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/ldscripts/mem_128kb.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08007000, LENGTH = 97K /* 97kB = 100kB - 3kB (configuration data)*/
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/ldscripts/mem_256kb.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08007000, LENGTH = 222K /* 222kB = 228kB - 6kB (configuration data)*/
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/ATcmd/atcmd.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file atcmd.h
3 | * @brief AT Command Module - Interface Part Header File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _ATCMD_H
13 | #define _ATCMD_H
14 |
15 | #define WORK_BUF_SIZE 1024
16 | #include "library/at_common.h"
17 |
18 | struct at_command
19 | {
20 | const char *cmd;
21 | void (*process)(void);
22 | char *description;
23 | char *usage;
24 | };
25 |
26 | void atc_init();
27 | void atc_run(void);
28 |
29 | #endif //_ATCMD_H
30 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/ATcmd/library/sockutil.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file sockutil.h
3 | * @brief Socket Utility Header File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author modified by Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _SOCKUTIL_H
13 | #define _SOCKUTIL_H
14 |
15 | #include "at_common.h"
16 |
17 | /**
18 | * @addtogroup sockwatch_module
19 | * @{
20 | * @def WATCH_SOCK_UDP_SEND
21 | * Indicate that 'UDP SEND' completion of this socket has to be watched.
22 | * @def WATCH_SOCK_TCP_SEND
23 | * Indicate that 'TCP SEND' completion of this socket has to be watched.
24 | * @def WATCH_SOCK_CONN_TRY
25 | * Indicate that 'CONNECT' completion of this socket has to be watched.
26 | * @def WATCH_SOCK_CONN_EVT
27 | * Indicate that 'CONNECT' event of this socket has to be watched.
28 | * @def WATCH_SOCK_CLS_TRY
29 | * Indicate that 'CLOSE' completion of this socket has to be watched.
30 | * @def WATCH_SOCK_CLS_EVT
31 | * Indicate that 'CLOSE' event of this socket has to be watched.
32 | * @def WATCH_SOCK_RECV
33 | * Indicate that 'RECEIVE' event of this socket has to be watched.
34 | * @def WATCH_SOCK_MASK_LOW
35 | * Mask all Completions of the socket.
36 | * @def WATCH_SOCK_MASK_HIGH
37 | * Mask all Events of the socket.
38 | * @def WATCH_SOCK_ALL_MASK
39 | * Mask all Completions and Events.
40 | * @typedef watch_cbfunc
41 | * Watch call back function form.
42 | * @}
43 | */
44 | #define WATCH_SOCK_UDP_SEND 0x01
45 | #define WATCH_SOCK_TCP_SEND 0x02
46 | #define WATCH_SOCK_CONN_TRY 0x04
47 | #define WATCH_SOCK_CLS_TRY 0x08
48 | #define WATCH_SOCK_CONN_EVT 0x10
49 | #define WATCH_SOCK_CLS_EVT 0x20
50 | #define WATCH_SOCK_RECV 0x40
51 | #define WATCH_SOCK_MASK_LOW 0x0F
52 | #define WATCH_SOCK_MASK_HIGH 0x70
53 | #define WATCH_SOCK_ALL_MASK 0x7F
54 |
55 | typedef void (*watch_cbfunc)(uint8_t id, uint8_t item, int32_t ret);
56 |
57 | int8_t sockwatch_open(uint8_t sock, watch_cbfunc cb);
58 | int8_t sockwatch_close(uint8_t sock);
59 | int8_t sockwatch_set(uint8_t sock, uint8_t item);
60 | int8_t sockwatch_clr(uint8_t sock, uint8_t item);
61 | int8_t sockwatch_chk(uint8_t sock, uint8_t item);
62 | void sockwatch_run(void);
63 |
64 | int8_t ip_check(int8_t *str, uint8_t *ip);
65 | int8_t port_check(int8_t *str, uint16_t *port);
66 | int8_t mac_check(int8_t *str, uint8_t *mac);
67 |
68 | #endif //_SOCKUTIL_H
69 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/ATcmd/library/util.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file util.h
3 | * @brief Common Utility Function Set Source File
4 | * @version 1.0
5 | * @date 2013/02/22
6 | * @par Revision
7 | * 2013/02/22 - 1.0 Release
8 | * @author Mike Jeong
9 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef _UTIL_H
13 | #define _UTIL_H
14 |
15 | #include "at_common.h"
16 |
17 | /**
18 | * @defgroup macro_util Macro Util
19 | * Simple Macro Utilities.
20 | * @ingroup common_util
21 | * @{
22 | * @def MEM_FREE
23 | * If pointer is not NULL, free it and set to NULL.
24 | * @def BITSET
25 | * Set bit in variable.
26 | * @def BITCLR
27 | * Clear bit in variable.
28 | * @typedef long2char
29 | * General purpose type change union (32bit <-> 8bit).
30 | * @typedef short2char
31 | * General purpose type change union (16bit <-> 8bit).
32 | * @}
33 | * @typedef void_func
34 | * General purpose void function form.
35 | * @typedef alarm_cbfunc
36 | * Alarm call back function form.
37 | * @}
38 | */
39 | #define MEM_FREE(mem_p) do{ if(mem_p) { free(mem_p); mem_p = NULL; } }while(0)
40 | #define BITSET(var_v, bit_v) (var_v |= bit_v)
41 | #define BITCLR(var_v, bit_v) (var_v &= ~(bit_v))
42 |
43 |
44 | int8_t digit_length(int32_t dgt, int8_t base);
45 | int32_t str_check(int (*method)(int), int8_t *str);
46 | int8_t* strsep_ex(register int8_t **stringp, register const int8_t *delim);
47 | uint16_t checksum(uint8_t * src, uint32_t len);
48 |
49 | #endif //_UTIL_H
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/ATcmd/wiz_types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file wiz_types.h
3 | * @brief Common Type Definition Header File.
4 | * This file influence on all library area through @ref common.h
5 | * @version 1.1
6 | * @date 2013/02/22
7 | * @par Revision
8 | * 2013/02/22 - 1.0 Release
9 | * 2013/07/09 - 1.1 Added 'bool' type
10 | * 2014/04/25 - 1.2 remove type definitions
11 | * @author Mike Jeong
12 | * \n\n @par Copyright (C) 2013 WIZnet. All rights reserved.
13 | */
14 |
15 | #ifndef _WIZ_TYPES_H
16 | #define _WIZ_TYPES_H
17 |
18 |
19 | /**
20 | * @def RET_FAIL
21 | * Fail return value
22 | * @def RET_OK
23 | * Success return value
24 | * @def RET_NOK
25 | * Error return value
26 | *
27 | * @def VAL_HIGH
28 | * Indicate the value is 'high'
29 | * @def VAL_LOW
30 | * Indicate the value is 'low'
31 | *
32 | * @def VAL_TOG
33 | * Indicate the value is 'toggle'
34 | * @def VAL_ON
35 | * Indicate the value is 'on'
36 | * @def VAL_OFF
37 | * Indicate the value is 'off'
38 | *
39 | * @def VAL_SET
40 | * Indicate the value is 'set'
41 | * @def VAL_CLEAR
42 | * Indicate the value is 'clear'
43 | *
44 | * @def VAL_TRUE
45 | * Indicate the value is 'true'
46 | * @def VAL_FALSE
47 | * Indicate the value is 'false'
48 | *
49 | * @def VAL_ENABLE
50 | * Indicate the value is 'enable'
51 | * @def VAL_DISABLE
52 | * Indicate the value is 'disable'
53 | *
54 | * @def VAL_NONE
55 | * Indicate the value is 'none'
56 | * @def VAL_INVALID
57 | * Indicate the value is 'invalid'
58 | *
59 | * @def CRLF
60 | * Replace New Line
61 | */
62 | #define RET_FAIL 1
63 | #define RET_OK 0
64 | #define RET_NOK -1
65 |
66 | #define VAL_HIGH 1
67 | #define VAL_LOW 0
68 |
69 | #define VAL_TOG 2
70 | #define VAL_ON 1
71 | #define VAL_OFF 0
72 |
73 | #define VAL_SET 1
74 | #define VAL_CLEAR 0
75 |
76 | #define VAL_TRUE 1
77 | #define VAL_FALSE 0
78 |
79 | #define VAL_ENABLE 1
80 | #define VAL_DISABLE 0
81 |
82 | #define VAL_NONE -1
83 | #define VAL_INVALID -2
84 |
85 | #define CRLF "\r\n"
86 |
87 | #endif //_WIZ_TYPES_H
88 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/Internet/httpServer/httpServer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/Internet/httpServer/httpServer.h
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/Internet/httpServer/httpUtil.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file httpUtil.h
3 | * @brief Header File for HTTP Server Utilities
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __HTTPUTIL_H__
13 | #define __HTTPUTIL_H__
14 |
15 | #include "httpServer.h"
16 | #include "httpParser.h"
17 | #include "types.h"
18 |
19 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len);
20 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/FatFs/integer.h:
--------------------------------------------------------------------------------
1 | /*-------------------------------------------*/
2 | /* Integer type definitions for FatFs module */
3 | /*-------------------------------------------*/
4 |
5 | #ifndef _FF_INTEGER
6 | #define _FF_INTEGER
7 |
8 | #ifdef _WIN32 /* FatFs development platform */
9 |
10 | #include
11 | #include
12 |
13 | #else /* Embedded platform */
14 |
15 | /* This type MUST be 8 bit */
16 | typedef unsigned char BYTE;
17 |
18 | /* These types MUST be 16 bit */
19 | typedef short SHORT;
20 | typedef unsigned short WORD;
21 | typedef unsigned short WCHAR;
22 |
23 | /* These types MUST be 16 bit or 32 bit */
24 | typedef int INT;
25 | typedef unsigned int UINT;
26 |
27 | /* These types MUST be 32 bit */
28 | typedef long LONG;
29 | typedef unsigned long DWORD;
30 |
31 | #endif
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/adcHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file adcHandler.h
3 | * @brief Header File for ADC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __ADCHANDLER_H
13 | #define __ADCHANDLER_H
14 |
15 | #include
16 | #include "stm32f10x.h"
17 |
18 | #define ADC12_IN4_PORT GPIOA
19 | #define ADC12_IN4_PIN GPIO_Pin_4
20 |
21 | #define ADC12_IN5_PORT GPIOA
22 | #define ADC12_IN5_PIN GPIO_Pin_5
23 |
24 | #define ADC12_IN6_PORT GPIOA
25 | #define ADC12_IN6_PIN GPIO_Pin_6
26 |
27 | #define ADC12_IN7_PORT GPIOA
28 | #define ADC12_IN7_PIN GPIO_Pin_7
29 |
30 | #define ADC12_IN13_PORT GPIOC
31 | #define ADC12_IN13_PIN GPIO_Pin_3
32 |
33 | void adc_gpio_init(uint8_t ADC_Channel);
34 | void adc_init(uint8_t ADC_Type);
35 | void adc_dma_init(void);
36 | void adc_dmamulti_init(void);
37 |
38 | extern __IO uint16_t ADC1ConvertedValue;
39 | extern vu16 ADC_DualConvertedValueTab[4];
40 |
41 | #endif
42 |
43 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/eepromHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __EEPROMHANDLER_H__
3 | #define __EEPROMHANDLER_H__
4 |
5 | #define EEPROM_ENABLE
6 | #if defined(EEPROM_ENABLE)
7 | #define EEPROM_ENABLE_BYI2CPERI
8 | #if !defined(EEPROM_ENABLE_BYI2CPERI)
9 | #define EEPROM_ENABLE_BYGPIO
10 | #endif
11 | #endif
12 |
13 | #define EE24AA01 128
14 | #define EE24AA02 256
15 | #define EE24AA04 512
16 | #define EE24AA08 1024
17 | #define EE24AA16 2048
18 | #define EE24AA32 4096
19 | #define EE24AA64 8192
20 | #define EE24AA128 16384
21 | #define EE24AA256 32768
22 |
23 | #define EE_TYPE EE24AA64
24 |
25 | #if (EE_TYPE > EE24AA16)
26 | #define EEPROM_BLOCK_SIZE 512
27 | #define EEPROM_PAGE_SIZE 32
28 | #else
29 | #define EEPROM_BLOCK_SIZE 256
30 | #define EEPROM_PAGE_SIZE 16
31 | #define EEPROM_BLOCK_COUNT 2 // 2(24AA04), 4(24AA08), 8(24AA16)
32 | #endif
33 |
34 | void bsp_24aaxx_gpio_init(void);
35 |
36 | u8 EE24AAXX_ReadOneByte(u16 ReadAdder);
37 | void EE24AAXX_WriteOneByte(u16 WriteAddr,u8 DataToWrite);
38 | void EE24AAXX_WriteLenByte(u16 WriteAddr,u32 DataToWrite,u8 Len);
39 | u32 EE24AAXX_ReadLenByte(u16 ReadAddr,u8 Len);
40 | void EE24AAXX_Read(u16 ReadAddr,u8 *pBuffer,u16 NumToRead);
41 | void EE24AAXX_Write(u16 WriteAddr,u8 *pBuffer,u16 NumToWrite);
42 | void EE24AAXX_Init(void);
43 | void EE24AAXX_WritePage(u16 WriteAddr,u8 *pBuffer,u8 len);
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/extiHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file extiHandler.h
3 | * @brief Header File for EXTI Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __EXTIHANDLER_H
13 | #define __EXTIHANDLER_H
14 |
15 | void EXTI_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/flashHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __FLASHHANDLER_H__
3 | #define __FLASHHANDLER_H__
4 |
5 | #define MULTIFLASH_ENABLE
6 |
7 | #define FLASH_PAGE0_BASE 0x08000000
8 | #define FLASH_CONFIG_PAGE 3
9 | #if !defined(MULTIFLASH_ENABLE)
10 | #define FLASH_PAGE_SIZE 0x400
11 | #define FLASH_PAGE 128
12 | #define FLASH_BOOT_PAGE 24 // 1 page 1K
13 | #define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*126)) // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
14 | #define IO_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*125)) // Page125
15 | //#define FLASH_PAGE_SIZE 0x800
16 | //#define FLASH_PAGE 64
17 | //#define FLASH_BOOT_PAGE 12 // 1 page 2K
18 | //#define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*62)) // Page62,63 (STM32103RCT6, the last page of 256kB on-chip flash, 4kB size)
19 | //#define IO_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*61)) // Page61
20 | #define FLASH_APP_PAGE (FLASH_PAGE - FLASH_BOOT_PAGE - FLASH_CONFIG_PAGE)
21 | #endif
22 |
23 | #if defined(MULTIFLASH_ENABLE)
24 | typedef struct __Probe_Flash {
25 | uint32_t flash_page0_base;
26 | uint32_t flash_app_base;
27 | uint16_t flash_page_size;
28 | uint16_t flash_page;
29 | uint8_t flash_boot_page;
30 | uint8_t flash_config_page;
31 | uint16_t flash_app_page ;
32 | uint32_t config_page_addr ;
33 | uint32_t io_page_addr ;
34 | } __attribute__((packed)) Probe_Flash;
35 |
36 | extern Probe_Flash flash;
37 |
38 | void probe_flash(void);
39 | #endif
40 |
41 | int addr_to_page(uint32_t addr);
42 | int erase_flash_page(uint32_t page_addr);
43 | int write_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
44 | int read_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/gpioHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file gpioHandler.h
3 | * @brief Header File for GPIO Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __GPIOHANDLER_H
13 | #define __GPIOHANDLER_H
14 |
15 | #include "boardutil.h"
16 |
17 | void GPIO_Configuration(void);
18 |
19 | void IO_Init(IO_Type io);
20 | void IO_On(IO_Type io);
21 | void IO_Off(IO_Type io);
22 | void IO_Toggle(IO_Type io);
23 | uint8 get_IO_Status(IO_Type io);
24 |
25 | #endif
26 |
27 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/i2cHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __I2CHANDLER_H__
3 | #define __I2CHANDLER_H__
4 |
5 | /* Includes ------------------------------------------------------------------*/
6 | #include "stm32f10x.h"
7 |
8 | // I2C EERPOM Peripheral function Section
9 | #define EPP_I2C I2C1
10 | #define EEP_Address 0xA0
11 | #define EEP_MacAddresss 0xFA
12 | #define EEP_I2C_RCC RCC_APB1Periph_I2C1
13 | #define EEP_GPIO_RCC RCC_APB2Periph_GPIOB
14 | #define EEP_PORT GPIOB
15 | #define EEP_SCL_Pin GPIO_Pin_6
16 | #define EEP_SDA_Pin GPIO_Pin_7
17 |
18 | extern u8 EEPROM_ADDRESS;
19 | void I2C1Initialize(void);
20 | void EEP_Read(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t NumByteToRead);
21 | void EEP_Write(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
22 | void I2C_EE_WaitEepromStandbyState(void);
23 |
24 |
25 | // I2C EERPOM GPIO function Section
26 | #define IIC1_SCL_PORT GPIOB
27 | #define IIC1_SCL_PIN GPIO_Pin_6
28 |
29 | #define IIC1_SDA_PORT GPIOB
30 |
31 | #define IIC1_SDA_PIN GPIO_Pin_7
32 |
33 | #define IIC1_SCL_HIGH() GPIO_WriteBit(IIC1_SCL_PORT,IIC1_SCL_PIN,Bit_SET)
34 | #define IIC1_SCL_LOW() GPIO_WriteBit(IIC1_SCL_PORT,IIC1_SCL_PIN,Bit_RESET)
35 |
36 | #define IIC1_SDA_HIGH() GPIO_WriteBit(IIC1_SDA_PORT,IIC1_SDA_PIN,Bit_SET)
37 | #define IIC1_SDA_LOW() GPIO_WriteBit(IIC1_SDA_PORT,IIC1_SDA_PIN,Bit_RESET)
38 |
39 | #define IIC1_READ_DATA GPIO_ReadInputDataBit(IIC1_SDA_PORT,IIC1_SDA_PIN)
40 |
41 | void IIC1_Init(void);
42 | void IIC1_Start(void);
43 | void IIC1_Stop(void);
44 | u8 IIC1_Wait_Ack(void);
45 | void IIC1_Ack(void);
46 | void IIC1_NAck(void);
47 | void IIC1_Send_Byte(u8 txd);
48 | u8 IIC1_Read_Byte(unsigned char ack);
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/mmcHandler.h:
--------------------------------------------------------------------------------
1 | #include "ff.h"
2 | #include "diskio.h"
3 | #include "stm32f10x.h"
4 |
5 | /*-------------------------------------------------------------------------------*/
6 | /* Option: Transmit/Receive Block using DMA (Platform dependent. STM32 here) */
7 | /*-------------------------------------------------------------------------------*/
8 | //#define STM32_SD_USE_DMA
9 |
10 | /*
11 | #define RCC_APB2Periph_GPIO_CS RCC_APB2Periph_GPIOB
12 | #define GPIO_SPI_SD GPIOB
13 | #define GPIO_Pin_SPI_SD_SCK GPIO_Pin_13
14 | #define GPIO_Pin_SPI_SD_MISO GPIO_Pin_14
15 | #define GPIO_Pin_SPI_SD_MOSI GPIO_Pin_15
16 | #define RCC_APBPeriphClockCmd_SPI_SD RCC_APB1PeriphClockCmd
17 | #define RCC_APBPeriph_SPI_SD RCC_APB1Periph_SPI2
18 | */
19 |
20 | #define SPI_SD SPI2
21 | #define GPIO_CS GPIOB /* GPIOB */
22 | #define GPIO_Pin_CS GPIO_Pin_10 /* PB.11 */
23 | #define SPI_BaudRatePrescaler_SPI_SD SPI_BaudRatePrescaler_2 /* 72MHz / 2 */
24 |
25 | // SD Card Selection; CS control
26 | #define SD_CS_SELECT() GPIO_ResetBits(GPIO_CS, GPIO_Pin_CS) // MMC CS = L
27 | #define SD_CS_DESELECT() GPIO_SetBits(GPIO_CS, GPIO_Pin_CS) // MMC CS = H
28 |
29 | #ifdef STM32_SD_USE_DMA
30 | #define DMA_Channel_SPI_SD_RX DMA1_Channel4
31 | #define DMA_Channel_SPI_SD_TX DMA1_Channel5
32 | #define DMA_FLAG_SPI_SD_TC_RX DMA1_FLAG_TC4
33 | #define DMA_FLAG_SPI_SD_TC_TX DMA1_FLAG_TC5
34 | //#define GPIO_SPI_SD GPIOB
35 | //#define GPIO_Pin_SPI_SD_SCK GPIO_Pin_13
36 | //#define GPIO_Pin_SPI_SD_MISO GPIO_Pin_14
37 | //#define GPIO_Pin_SPI_SD_MOSI GPIO_Pin_15
38 | //#define RCC_APBPeriphClockCmd_SPI_SD RCC_APB1PeriphClockCmd
39 | //#define RCC_APBPeriph_SPI_SD RCC_APB1Periph_SPI2
40 | #endif
41 |
42 |
43 | #define GO_IDLE_STATE 0
44 | #define SEND_OP_COND 1
45 | #define SEND_IF_COND 8
46 | #define SET_BLOCKLEN 16
47 | #define READ_BLOCK 17
48 | #define WRITE_BLOCK 24
49 | #define APP_CMD 55
50 | #define READ_OCR 58
51 | #define SD_SEND_OP_COND (0x40|41)
52 |
53 |
54 | typedef enum card_type_id {
55 | NO_CARD,
56 | CARD_MMC,
57 | CARD_SD,
58 | CARD_SD2,
59 | CARD_SDHC,
60 | SPI_FLASHM
61 | } card_type_id_t;
62 |
63 |
64 |
65 | uint8_t mmc_mount();
66 | uint8_t flash_mount();
67 | FRESULT getMountedMemorySize(uint8_t mount_ret, uint32_t * totalSize, uint32_t * availableSize);
68 | void Delay_ms(uint32_t ms);
69 | uint8_t mmc_select();
70 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/rccHandler.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.c
3 | * @brief RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #include "rccHandler.h"
13 | #include "stm32f10x.h"
14 | #include "boardutil.h"
15 |
16 | /**
17 | * @brief Sets System clock frequency to 72MHz and configure HCLK, PCLK2
18 | * and PCLK1 prescalers.
19 | * @param None
20 | * @return None
21 | */
22 | void RCC_Configuration(void)
23 | {
24 | ErrorStatus HSEStartUpStatus;
25 |
26 | /* RCC system reset(for debug purpose) */
27 | RCC_DeInit();
28 |
29 | /* Enable HSE */
30 | RCC_HSEConfig(RCC_HSE_ON);
31 |
32 | /* Wait till HSE is ready */
33 | HSEStartUpStatus = RCC_WaitForHSEStartUp();
34 |
35 | if(HSEStartUpStatus == SUCCESS)
36 | {
37 | /* Enable Prefetch Buffer */
38 | FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
39 |
40 | /* Flash 2 wait state */
41 | FLASH_SetLatency(FLASH_Latency_2);
42 |
43 | /* HCLK = SYSCLK */
44 | RCC_HCLKConfig(RCC_SYSCLK_Div1);
45 |
46 | /* PCLK2 = HCLK */
47 | //RCC_PCLK2Config(RCC_HCLK_Div1);
48 | RCC_PCLK2Config(RCC_HCLK_Div2); // for Baudrate 600 support
49 |
50 | /* PCLK1 = HCLK/2 */
51 | RCC_PCLK1Config(RCC_HCLK_Div2);
52 |
53 | /* PLLCLK = 8MHz * 9 = 72 MHz */
54 | RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);
55 | // RCC_PLLConfig(RCC_PLLSource_PREDIV1, RCC_PLLMul_9);
56 |
57 | /* Enable PLL */
58 | RCC_PLLCmd(ENABLE);
59 |
60 | /* Wait till PLL is ready */
61 | while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
62 | {
63 | }
64 |
65 | /* Select PLL as system clock source */
66 | RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
67 |
68 | /* Wait till PLL is used as system clock source */
69 | while(RCC_GetSYSCLKSource() != 0x08)
70 | {
71 | }
72 |
73 |
74 |
75 | /* TIM2 clock enable */
76 | // RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2|RCC_APB1Periph_TIM3|RCC_APB1Periph_USART2, ENABLE);
77 |
78 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2 | RCC_APB1Periph_USART2, ENABLE);
79 |
80 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD
81 | |RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
82 |
83 | }
84 | }
85 |
86 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/rccHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.h
3 | * @brief Header File for RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __RCCHANDLER_H
13 | #define __RCCHANDLER_H
14 |
15 | void RCC_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/spiHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __SPIHANDLER_H
13 | #define __SPIHANDLER_H
14 |
15 | #define STM32_WIZCHIP_USE_DMA
16 | #ifdef STM32_WIZCHIP_USE_DMA
17 | #define DMA_Channel_SPI_WIZCHIP_RX DMA1_Channel4
18 | #define DMA_Channel_SPI_WIZCHIP_TX DMA1_Channel5
19 | #define DMA_FLAG_SPI_WIZCHIP_TC_RX DMA1_FLAG_TC4
20 | #define DMA_FLAG_SPI_WIZCHIP_TC_TX DMA1_FLAG_TC5
21 | #endif
22 |
23 |
24 | void wizchip_write(uint8_t wb);
25 | uint8_t wizchip_read(void);
26 | void W5500_Init(void);
27 | void W5500_SPI_LowLevel_Init(void);
28 |
29 | #endif
30 |
31 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/storageHandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.h
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 | #ifndef STORAGEHANDLER_H_
9 | #define STORAGEHANDLER_H_
10 |
11 | #include
12 |
13 | int read_storage(uint8_t isConfig, void *data, uint16_t size);
14 | int write_storage(uint8_t isConfig, void *data, uint16_t size);
15 |
16 | #endif /* STORAGEHANDLER_H_ */
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/timerHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file timerHandler.h
3 | * @brief Header File for TIMER Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __TIMERHANDLER_H
13 | #define __TIMERHANDLER_H
14 |
15 | void Timer_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/PlatformHandler/uartHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __UARTHANDLER_H
13 | #define __UARTHANDLER_H
14 |
15 | #include
16 | #include "stm32f10x.h"
17 | #include "ConfigData.h"
18 |
19 | #define UART_SRB_SIZE 1024 /* Send */
20 | #define UART_RRB_SIZE 1024 /* Receive */
21 |
22 | void serial_info_init(USART_TypeDef *pUART, struct __serial_info *serial);
23 |
24 | void USART1_Configuration(void);
25 | void USART2_Configuration(void);
26 |
27 | int UART_read(void *data, int bytes);
28 | uint32_t UART_write(void *data, int bytes);
29 | int UART_RxRB_GetCount();
30 | int UART_TxRB_GetCount();
31 | void UART2_flush(void);
32 |
33 | uint8_t * getUSART1buf(void);
34 | void USART1_flush(void);
35 |
36 | uint8_t Usart_putc(uint8_t ch);
37 | uint8_t Usart_getc(void);
38 |
39 | #endif
40 |
41 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/callback/dhcp_cb.c:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "dhcp.h"
4 | #include "ConfigData.h"
5 |
6 | void w5500_dhcp_assign()
7 | {
8 | S2E_Packet *value = get_S2E_Packet_pointer();
9 | wiz_NetInfo gWIZNETINFO;
10 |
11 | getIPfromDHCP(gWIZNETINFO.ip);
12 | getGWfromDHCP(gWIZNETINFO.gw);
13 | getSNfromDHCP(gWIZNETINFO.sn);
14 | getDNSfromDHCP(gWIZNETINFO.dns);
15 |
16 | get_S2E_Packet_value(gWIZNETINFO.mac, value->network_info_common.mac, sizeof(gWIZNETINFO.mac[0]) * 6);
17 | set_S2E_Packet_value(value->network_info_common.local_ip, gWIZNETINFO.ip, sizeof(value->network_info_common.local_ip));
18 | set_S2E_Packet_value(value->network_info_common.gateway, gWIZNETINFO.gw, sizeof(value->network_info_common.gateway));
19 | set_S2E_Packet_value(value->network_info_common.subnet, gWIZNETINFO.sn, sizeof(value->network_info_common.subnet));
20 | set_S2E_Packet_value(value->options.dns_server_ip, gWIZNETINFO.dns, sizeof(value->options.dns_server_ip));
21 | if(value->options.dhcp_use)
22 | gWIZNETINFO.dhcp = NETINFO_DHCP;
23 | else
24 | gWIZNETINFO.dhcp = NETINFO_STATIC;
25 |
26 | ctlnetwork(CN_SET_NETINFO, (void*) &gWIZNETINFO);
27 |
28 | // display_Net_Info();
29 | // printf("DHCP LEASED TIME : %d sec. \r\n", getDHCPLeasetime());
30 | }
31 |
32 | void w5500_dhcp_conflict()
33 | {
34 | // TODO
35 | ;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/callback/dhcp_cb.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __DHCP_CB_H__
3 | #define __DHCP_CB_H__
4 |
5 | void w5500_dhcp_assign();
6 | void w5500_dhcp_conflict();
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/netutil/netutil.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __NETUTIL_H__
3 | #define __NETUTIL_H__
4 |
5 | #include
6 |
7 | #define SYSTEM_LITTLE_ENDIAN
8 |
9 | int8_t* inet_ntoa(uint32_t addr);
10 | int8_t* inet_ntoa_pad(uint32_t addr);
11 | uint32_t inet_addr(uint8_t* addr);
12 | uint16_t swaps(uint16_t i);
13 | uint32_t swapl(uint32_t l);
14 | uint16_t htons(uint16_t hostshort);
15 | uint32_t htonl(uint32_t hostlong);
16 | uint32_t ntohs(uint16_t netshort);
17 | uint32_t ntohl(uint32_t netlong);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/util/spi.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/util/spi.c
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/src/util/spi.h:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ifndef SPI_PRESENT
4 | #define SPI_PRESENT
5 |
6 |
7 |
8 | /* ------------------------------------------------------------------------------------------------- */
9 | /* BSP SPI */
10 | /* ------------------------------------------------------------------------------------------------- */
11 |
12 | #define SPI_SPEED_2 0
13 | #define SPI_SPEED_4 1
14 | #define SPI_SPEED_8 2
15 | #define SPI_SPEED_16 3
16 | #define SPI_SPEED_256 4
17 |
18 | // for vs1003b
19 | #define SPI_SPEED_LOW 0
20 | #define SPI_SPEED_HIGH 1
21 |
22 |
23 | /* ------------------------------------------------------------------------------------------------- */
24 | /* function SPI */
25 | /* ------------------------------------------------------------------------------------------------- */
26 |
27 |
28 |
29 |
30 | /* ------------------------------------------------------------------------------------------------- */
31 | /* extern SPI */
32 | /* ------------------------------------------------------------------------------------------------- */
33 |
34 | extern void bsp_set_spi1_speed (u8 speed);
35 | extern u8 bsp_readwritebyte_spi1 (u8 tx_data);
36 |
37 | extern void bsp_set_spi2_speed (u8 speed);
38 | extern void bsp_set_spi2_speed_mp3(u8 SpeedSet);
39 | extern u8 bsp_readwritebyte_spi2 (u8 tx_data);
40 |
41 | #endif
42 |
43 | /* End of module include. */
44 |
45 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/cmsis/README_CMSIS.txt:
--------------------------------------------------------------------------------
1 | * -------------------------------------------------------------------
2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved.
3 | *
4 | * Date: 17 February 2014
5 | * Revision: V4.00
6 | *
7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS)
8 | * Title: Release Note for CMSIS
9 | *
10 | * -------------------------------------------------------------------
11 |
12 | These files are the CMSIS Core Support and CMSIS DSP Include Files.
13 |
14 | To save space, from the complete ARM package (CMSIS-SP-00300-r4p0-00rel0.zip)
15 | only the CMSIS/Include folder was used here.
16 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip,
2 | the folder:
3 |
4 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
5 |
6 | The cmsis_device.h is added for convenience.
7 |
8 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/cmsis/cmsis_device.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef STM32F1_CMSIS_DEVICE_H_
7 | #define STM32F1_CMSIS_DEVICE_H_
8 |
9 | #include "stm32f10x.h"
10 |
11 | #endif // STM32F1_CMSIS_DEVICE_H_
12 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/cmsis/system_stm32f10x.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f10x.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f10x_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F10X_H
34 | #define __SYSTEM_STM32F10X_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F10x_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F10x_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @addtogroup STM32F10x_System_Exported_Constants
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @addtogroup STM32F10x_System_Exported_Macros
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @addtogroup STM32F10x_System_Exported_Functions
76 | * @{
77 | */
78 |
79 | extern void SystemInit(void);
80 | extern void SystemCoreClockUpdate(void);
81 | /**
82 | * @}
83 | */
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif /*__SYSTEM_STM32F10X_H */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/cortexm/ExceptionHandlers.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef CORTEXM_EXCEPTION_HANDLERS_H_
7 | #define CORTEXM_EXCEPTION_HANDLERS_H_
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #if defined(__cplusplus)
12 | extern "C"
13 | {
14 | #endif
15 |
16 | // External references to cortexm_handlers.c
17 |
18 | extern void
19 | Reset_Handler(void);
20 | extern void
21 | NMI_Handler(void);
22 | extern void
23 | HardFault_Handler(void);
24 |
25 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
26 | extern void
27 | MemManage_Handler(void);
28 | extern void
29 | BusFault_Handler(void);
30 | extern void
31 | UsageFault_Handler(void);
32 | #endif
33 |
34 | extern void
35 | SVC_Handler(void);
36 |
37 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
38 | extern void
39 | DebugMon_Handler(void);
40 | #endif
41 |
42 | extern void
43 | PendSV_Handler(void);
44 | extern void
45 | SysTick_Handler(void);
46 |
47 | #if defined(__cplusplus)
48 | }
49 | #endif
50 |
51 | // ----------------------------------------------------------------------------
52 |
53 | #endif // CORTEXM_EXCEPTION_HANDLERS_H_
54 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/include/stm32f1-stdperiph/stm32f10x_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_CRC_H
25 | #define __STM32F10x_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /** @defgroup CRC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Exported_Macros
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Exported_Functions
67 | * @{
68 | */
69 |
70 | void CRC_ResetDR(void);
71 | uint32_t CRC_CalcCRC(uint32_t Data);
72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
73 | uint32_t CRC_GetCRC(void);
74 | void CRC_SetIDRegister(uint8_t IDValue);
75 | uint8_t CRC_GetIDRegister(void);
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __STM32F10x_CRC_H */
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
95 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The system_stm32f10x.c file is from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
4 |
5 | The vectors_stm32f10x.c was created to conform to the startup_stm32f10x_xx*.s.
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/cortexm/_initialize_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | // Forward declarations.
13 |
14 | void
15 | __initialize_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // This is the default hardware initialisation routine, it can be
20 | // redefined in the application for more complex applications that
21 | // require early inits (before constructors), otherwise these can
22 | // be done in main().
23 | //
24 | // Called early from _start(), right after data & bss init, before
25 | // constructors.
26 | //
27 | // After Reset the Cortex-M processor is in Thread mode,
28 | // priority is Privileged, and the Stack is set to Main.
29 |
30 | void
31 | __attribute__((weak))
32 | __initialize_hardware(void)
33 | {
34 | // Call the CSMSIS system initialisation routine.
35 | SystemInit();
36 |
37 | #if defined (__VFP_FP__) && !defined (__SOFTFP__)
38 |
39 | // Enable the Cortex-M4 FPU only when -mfloat-abi=hard.
40 | // Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C)
41 |
42 | // Set bits 20-23 to enable CP10 and CP11 coprocessor
43 | SCB->CPACR |= (0xF << 20);
44 |
45 | #endif // (__VFP_FP__) && !(__SOFTFP__)
46 | }
47 |
48 | // ----------------------------------------------------------------------------
49 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/cortexm/_reset_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | NVIC_SystemReset(void);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // Forward declarations
19 |
20 | void
21 | __reset_hardware(void);
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | // This is the default hardware reset routine; it can be
26 | // redefined in the application for more complex applications.
27 | //
28 | // Called from _exit().
29 |
30 | void
31 | __attribute__((weak,noreturn))
32 | __reset_hardware()
33 | {
34 | NVIC_SystemReset();
35 | }
36 |
37 | // ----------------------------------------------------------------------------
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/cortexm/exception_handlers.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cortexm/ExceptionHandlers.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | _start(void);
15 |
16 | // ----------------------------------------------------------------------------
17 | // Default exception handlers. Override the ones here by defining your own
18 | // handler routines in your application code.
19 | // ----------------------------------------------------------------------------
20 |
21 | #if defined(DEBUG)
22 |
23 | // The DEBUG version is not naked, to allow breakpoints at Reset_Handler
24 | void __attribute__ ((section(".after_vectors"),noreturn))
25 | Reset_Handler (void)
26 | {
27 | _start ();
28 | }
29 |
30 | #else
31 |
32 | // The Release version is optimised to a quick branch to _start.
33 | void __attribute__ ((section(".after_vectors"),naked))
34 | Reset_Handler(void)
35 | {
36 | asm volatile
37 | (
38 | " b _start \n"
39 | :
40 | :
41 | :
42 | );
43 | }
44 |
45 | #endif
46 |
47 | void __attribute__ ((section(".after_vectors"),weak))
48 | NMI_Handler(void)
49 | {
50 | while (1)
51 | {
52 | }
53 | }
54 |
55 | void __attribute__ ((section(".after_vectors"),weak))
56 | HardFault_Handler(void)
57 | {
58 | while (1)
59 | {
60 | }
61 | }
62 |
63 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
64 |
65 | void __attribute__ ((section(".after_vectors"),weak))
66 | MemManage_Handler(void)
67 | {
68 | while (1)
69 | {
70 | }
71 | }
72 |
73 | void __attribute__ ((section(".after_vectors"),weak))
74 | BusFault_Handler(void)
75 | {
76 | while (1)
77 | {
78 | }
79 | }
80 |
81 | void __attribute__ ((section(".after_vectors"),weak))
82 | UsageFault_Handler(void)
83 | {
84 | while (1)
85 | {
86 | }
87 | }
88 |
89 | #endif
90 |
91 | void __attribute__ ((section(".after_vectors"),weak))
92 | SVC_Handler(void)
93 | {
94 | while (1)
95 | {
96 | }
97 | }
98 |
99 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
100 |
101 | void __attribute__ ((section(".after_vectors"),weak))
102 | DebugMon_Handler(void)
103 | {
104 | while (1)
105 | {
106 | }
107 | }
108 |
109 | #endif
110 |
111 | void __attribute__ ((section(".after_vectors"),weak))
112 | PendSV_Handler(void)
113 | {
114 | while (1)
115 | {
116 | }
117 | }
118 |
119 | void __attribute__ ((section(".after_vectors"),weak))
120 | SysTick_Handler(void)
121 | {
122 | while (1)
123 | {
124 | }
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/diag/Trace.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #if defined(TRACE)
9 |
10 | #include
11 | #include
12 | #include "diag/Trace.h"
13 | #include "string.h"
14 |
15 | #ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
16 | #define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (128)
17 | #endif
18 |
19 | // ----------------------------------------------------------------------------
20 |
21 | int
22 | trace_printf(const char* format, ...)
23 | {
24 | int ret;
25 | va_list ap;
26 |
27 | va_start (ap, format);
28 |
29 | // TODO: rewrite it to no longer use newlib, it is way too heavy
30 |
31 | static char buf[OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE];
32 |
33 | // Print to the local buffer
34 | ret = vsnprintf (buf, sizeof(buf), format, ap);
35 | if (ret > 0)
36 | {
37 | // Transfer the buffer to the device
38 | ret = trace_write (buf, (size_t)ret);
39 | }
40 |
41 | va_end (ap);
42 | return ret;
43 | }
44 |
45 | int
46 | trace_puts(const char *s)
47 | {
48 | trace_write(s, strlen(s));
49 | return trace_write("\n", 1);
50 | }
51 |
52 | int
53 | trace_putchar(int c)
54 | {
55 | trace_write((const char*)&c, 1);
56 | return c;
57 | }
58 |
59 | void
60 | trace_dump_args(int argc, char* argv[])
61 | {
62 | trace_printf("main(argc=%d, argv=[", argc);
63 | for (int i = 0; i < argc; ++i)
64 | {
65 | if (i != 0)
66 | {
67 | trace_printf(", ");
68 | }
69 | trace_printf("\"%s\"", argv[i]);
70 | }
71 | trace_printf("]);\n");
72 | }
73 |
74 | // ----------------------------------------------------------------------------
75 |
76 | #endif // TRACE
77 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/README.txt:
--------------------------------------------------------------------------------
1 |
2 | The following files extend or replace some of the the newlib functionality:
3 |
4 | _startup.c: a customised startup sequence, written in C
5 |
6 | _exit.c: a customised exit() implementation
7 |
8 | _syscalls.c: local versions of the libnosys/librdimon code
9 |
10 | _sbrk.c: a custom _sbrk() to match the actual linker scripts
11 |
12 | assert.c: implementation for the asserion macros
13 |
14 | _cxx.cpp: local versions of some C++ support, to avoid references to
15 | large functions.
16 |
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/_cxx.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | // These functions are redefined locally, to avoid references to some
9 | // heavy implementations in the standard C++ library.
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | #include
14 | #include
15 | #include "diag/Trace.h"
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | namespace __gnu_cxx
20 | {
21 | void
22 | __attribute__((noreturn))
23 | __verbose_terminate_handler();
24 |
25 | void
26 | __verbose_terminate_handler()
27 | {
28 | trace_puts(__func__);
29 | abort();
30 | }
31 | }
32 |
33 | // ----------------------------------------------------------------------------
34 |
35 | extern "C"
36 | {
37 | void
38 | __attribute__((noreturn))
39 | __cxa_pure_virtual();
40 |
41 | void
42 | __cxa_pure_virtual()
43 | {
44 | trace_puts(__func__);
45 | abort();
46 | }
47 | }
48 |
49 | // ----------------------------------------------------------------------------
50 |
51 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/_exit.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include "diag/Trace.h"
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | extern void
14 | __attribute__((noreturn))
15 | __reset_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // Forward declaration
20 |
21 | void
22 | _exit(int code);
23 |
24 | // ----------------------------------------------------------------------------
25 |
26 | // On Release, call the hardware reset procedure.
27 | // On Debug we just enter an infinite loop, to be used as landmark when halting
28 | // the debugger.
29 | //
30 | // It can be redefined in the application, if more functionality
31 | // is required.
32 |
33 | void
34 | __attribute__((weak))
35 | _exit(int code __attribute__((unused)))
36 | {
37 | #if !defined(DEBUG)
38 | __reset_hardware();
39 | #endif
40 |
41 | // TODO: write on trace
42 | while (1)
43 | ;
44 | }
45 |
46 | // ----------------------------------------------------------------------------
47 |
48 | void
49 | __attribute__((weak,noreturn))
50 | abort(void)
51 | {
52 | trace_puts("abort(), exiting...");
53 |
54 | _exit(1);
55 | }
56 |
57 | // ----------------------------------------------------------------------------
58 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/_sbrk.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | caddr_t
14 | _sbrk(int incr);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // The definitions used here should be kept in sync with the
19 | // stack definitions in the linker script.
20 |
21 | caddr_t
22 | _sbrk(int incr)
23 | {
24 | extern char _Heap_Begin; // Defined by the linker.
25 | extern char _Heap_Limit; // Defined by the linker.
26 |
27 | static char* current_heap_end;
28 | char* current_block_address;
29 |
30 | if (current_heap_end == 0)
31 | current_heap_end = &_Heap_Begin;
32 |
33 | current_block_address = current_heap_end;
34 |
35 | // Need to align heap to word boundary, else will get
36 | // hard faults on Cortex-M0. So we assume that heap starts on
37 | // word boundary, hence make sure we always add a multiple of
38 | // 4 to it.
39 | incr = (incr + 3) & (~3); // align value to 4
40 | if (current_heap_end + incr > &_Heap_Limit)
41 | {
42 | // Some of the libstdc++-v3 tests rely upon detecting
43 | // out of memory errors, so do not abort here.
44 | #if 0
45 | extern void abort (void);
46 |
47 | _write (1, "_sbrk: Heap and stack collision\n", 32);
48 |
49 | abort ();
50 | #else
51 | // Heap has overflowed
52 | errno = ENOMEM;
53 | return (caddr_t) -1;
54 | #endif
55 | }
56 |
57 | current_heap_end += incr;
58 |
59 | return (caddr_t) current_block_address;
60 | }
61 |
62 | // ----------------------------------------------------------------------------
63 |
64 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/_write.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // Do not include on semihosting and when freestanding
7 | #if !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #include
12 | #include "diag/Trace.h"
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | // When using retargetted configurations, the standard write() system call,
17 | // after a long way inside newlib, finally calls this implementation function.
18 |
19 | // Based on the file descriptor, it can send arrays of characters to
20 | // different physical devices.
21 |
22 | // Currently only the output and error file descriptors are tested,
23 | // and the characters are forwarded to the trace device, mainly
24 | // for demonstration purposes.
25 | /*
26 | ssize_t
27 | _write (int fd, const char* buf, size_t nbyte);
28 |
29 | ssize_t
30 | _write (int fd __attribute__((unused)), const char* buf __attribute__((unused)),
31 | size_t nbyte __attribute__((unused)))
32 | {
33 | #if defined(TRACE)
34 | // STDOUT and STDERR are routed to the trace device
35 | if (fd == 1 || fd == 2)
36 | {
37 | return trace_write (buf, nbyte);
38 | }
39 | #endif // TRACE
40 |
41 | errno = ENOSYS;
42 | return -1;
43 | }
44 | */
45 | // ----------------------------------------------------------------------------
46 |
47 | #endif // !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
48 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/newlib/assert.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #include "diag/Trace.h"
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | void
15 | __attribute__((noreturn))
16 | __assert_func (const char *file, int line, const char *func,
17 | const char *failedexpr)
18 | {
19 | trace_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
20 | failedexpr, file, line, func ? ", function: " : "",
21 | func ? func : "");
22 | abort ();
23 | /* NOTREACHED */
24 | }
25 |
26 | // ----------------------------------------------------------------------------
27 |
28 | // This is STM32 specific, but can be used on other platforms too.
29 | // If you need it, add the following to your application header:
30 |
31 | //#ifdef USE_FULL_ASSERT
32 | //#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
33 | //void assert_failed(uint8_t* file, uint32_t line);
34 | //#else
35 | //#define assert_param(expr) ((void)0)
36 | //#endif // USE_FULL_ASSERT
37 |
38 | #if defined(USE_FULL_ASSERT)
39 |
40 | void
41 | assert_failed (uint8_t* file, uint32_t line);
42 |
43 | // Called from the assert_param() macro, usually defined in the stm32f*_conf.h
44 | void
45 | __attribute__((noreturn))
46 | assert_failed (uint8_t* file, uint32_t line)
47 | {
48 | trace_printf ("assert_param() failed: file \"%s\", line %d\n", file, line);
49 | abort ();
50 | /* NOTREACHED */
51 | }
52 |
53 | #endif // defined(USE_FULL_ASSERT)
54 |
55 | // ----------------------------------------------------------------------------
56 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_App/system/src/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | WIZ550web_Boot
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | org.eclipse.cdt.core.cnature
23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
25 | org.eclipse.cdt.core.ccnature
26 |
27 |
28 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/ldscripts/libs.ld:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Placeholder to list other libraries required by the application.
4 |
5 | GROUP(
6 | )
7 |
8 | */
9 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/ldscripts/mem.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Memory Spaces Definitions.
3 | *
4 | * Need modifying for a specific board.
5 | * FLASH.ORIGIN: starting address of flash
6 | * FLASH.LENGTH: length of flash
7 | * RAM.ORIGIN: starting address of RAM bank 0
8 | * RAM.LENGTH: length of RAM bank 0
9 | *
10 | * The values below can be addressed in further linker scripts
11 | * using functions like 'ORIGIN(RAM)' or 'LENGTH(RAM)'.
12 | */
13 |
14 | MEMORY
15 | {
16 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K /* before 20K */
17 | CCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 0
18 | FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 28K /*before 24K*/
19 | FLASHB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
20 | EXTMEMB0 (rx) : ORIGIN = 0x00000000, LENGTH = 0
21 | EXTMEMB1 (rx) : ORIGIN = 0x00000000, LENGTH = 0
22 | EXTMEMB2 (rx) : ORIGIN = 0x00000000, LENGTH = 0
23 | EXTMEMB3 (rx) : ORIGIN = 0x00000000, LENGTH = 0
24 | MEMORY_ARRAY (xrw) : ORIGIN = 0x00000000, LENGTH = 0
25 | }
26 |
27 | /*
28 | * For external ram use something like:
29 |
30 | RAM (xrw) : ORIGIN = 0x68000000, LENGTH = 20K
31 |
32 | */
33 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/Internet/TFTP/tftp.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file tftp.h
3 | * @brief TFTP Header File.
4 | * @version 0.1.0
5 | * @author Sang-sik Kim
6 | */
7 | #ifndef __TFTP_H__
8 | #define __TFTP_H__
9 |
10 | #include
11 |
12 | /* tftp message */
13 | #define TFTP_RRQ 1
14 | #define TFTP_WRQ 2
15 | #define TFTP_DATA 3
16 | #define TFTP_ACK 4
17 | #define TFTP_ERROR 5
18 | #define TFTP_OACK 6
19 |
20 | /* tftp state */
21 | #define STATE_NONE 0
22 | #define STATE_RRQ 1
23 | #define STATE_WRQ 2
24 | #define STATE_DATA 3
25 | #define STATE_ACK 4
26 | #define STATE_OACK 5
27 |
28 | /* tftp transfer mode */
29 | #define TRANS_ASCII "netascii"
30 | #define TRANS_BINARY "octet"
31 |
32 | /* tftp progress state */
33 | #define TFTP_PROGRESS 0
34 | #define TFTP_FAIL 1
35 | #define TFTP_SUCCESS 2
36 |
37 | /* define */
38 | #define TFTP_SERVER_PORT 69
39 | #define TFTP_TEMP_PORT 51000
40 | #define TFTP_BLK_SIZE 512
41 | #define MAX_MTU_SIZE 1514
42 | #define FILE_NAME_SIZE 20
43 |
44 | //#define __TFTP_DEBUG__
45 |
46 | /* typedef */
47 | typedef struct tftp_data {
48 | uint16_t opcode;
49 | uint16_t block_num;
50 | uint8_t data[0];
51 | } TFTP_DATA_T;
52 |
53 | typedef struct tftp_error {
54 | uint16_t opcode;
55 | uint16_t error_code;
56 | uint8_t error_msg[0];
57 | } TFTP_ERROR_T;
58 |
59 | typedef struct tftp_option {
60 | uint8_t *code;
61 | uint8_t *value;
62 | } TFTP_OPTION;
63 |
64 | /* Functions */
65 | void TFTP_init(uint8_t socket, uint8_t *buf);
66 | void TFTP_exit(void);
67 | int TFTP_run(void);
68 | void TFTP_read_request(uint32_t server_ip, uint8_t *filename);
69 | void tftp_timeout_handler(void);
70 |
71 | #endif /*__TFTP_H__ */
72 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/eepromHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __EEPROMHANDLER_H__
3 | #define __EEPROMHANDLER_H__
4 |
5 | #define EEPROM_ENABLE
6 | #if defined(EEPROM_ENABLE)
7 | #define EEPROM_ENABLE_BYI2CPERI
8 | #if !defined(EEPROM_ENABLE_BYI2CPERI)
9 | #define EEPROM_ENABLE_BYGPIO
10 | #endif
11 | #endif
12 |
13 | #define EE24AA01 128
14 | #define EE24AA02 256
15 | #define EE24AA04 512
16 | #define EE24AA08 1024
17 | #define EE24AA16 2048
18 | #define EE24AA32 4096
19 | #define EE24AA64 8192
20 | #define EE24AA128 16384
21 | #define EE24AA256 32768
22 |
23 | #define EE_TYPE EE24AA64
24 |
25 | #if (EE_TYPE > EE24AA16)
26 | #define EEPROM_BLOCK_SIZE 512
27 | #define EEPROM_PAGE_SIZE 32
28 | #else
29 | #define EEPROM_BLOCK_SIZE 256
30 | #define EEPROM_PAGE_SIZE 16
31 | #define EEPROM_BLOCK_COUNT 2 // 2(24AA04), 4(24AA08), 8(24AA16)
32 | #endif
33 |
34 | void bsp_24aaxx_gpio_init(void);
35 |
36 | u8 EE24AAXX_ReadOneByte(u16 ReadAdder);
37 | void EE24AAXX_WriteOneByte(u16 WriteAddr,u8 DataToWrite);
38 | void EE24AAXX_WriteLenByte(u16 WriteAddr,u32 DataToWrite,u8 Len);
39 | u32 EE24AAXX_ReadLenByte(u16 ReadAddr,u8 Len);
40 | void EE24AAXX_Read(u16 ReadAddr,u8 *pBuffer,u16 NumToRead);
41 | void EE24AAXX_Write(u16 WriteAddr,u8 *pBuffer,u16 NumToWrite);
42 | void EE24AAXX_Init(void);
43 | void EE24AAXX_WritePage(u16 WriteAddr,u8 *pBuffer,u8 len);
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/flashHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __FLASHHANDLER_H__
3 | #define __FLASHHANDLER_H__
4 |
5 | #define MULTIFLASH_ENABLE
6 |
7 | #define FLASH_PAGE0_BASE 0x08000000
8 | #define FLASH_CONFIG_PAGE 3
9 | #if !defined(MULTIFLASH_ENABLE)
10 | #define FLASH_PAGE_SIZE 0x400
11 | #define FLASH_PAGE 128
12 | #define FLASH_BOOT_PAGE 24 // 1 page 1K
13 | #define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*126)) // Page126,127 (STM32103RBT6, the last page of 128kB on-chip flash, 2kB size)
14 | //#define FLASH_PAGE_SIZE 0x800
15 | //#define FLASH_PAGE 64
16 | //#define FLASH_BOOT_PAGE 12 // 1 page 2K
17 | //#define CONFIG_PAGE_ADDR (0x8000000+(FLASH_PAGE_SIZE*62)) // Page62,63 (STM32103RCT6, the last page of 256kB on-chip flash, 4kB size)
18 | #define FLASH_APP_PAGE (FLASH_PAGE - FLASH_BOOT_PAGE - FLASH_CONFIG_PAGE)
19 | #endif
20 |
21 | #if defined(MULTIFLASH_ENABLE)
22 | typedef struct __Probe_Flash {
23 | uint32_t flash_page0_base;
24 | uint32_t flash_app_base;
25 | uint16_t flash_page_size;
26 | uint16_t flash_page;
27 | uint8_t flash_boot_page;
28 | uint8_t flash_config_page;
29 | uint16_t flash_app_page ;
30 | uint32_t config_page_addr ;
31 | } __attribute__((packed)) Probe_Flash;
32 |
33 | extern Probe_Flash flash;
34 |
35 | void probe_flash(void);
36 | #endif
37 |
38 | int addr_to_page(uint32_t addr);
39 | void erase_flash_page(uint32_t page_addr);
40 | int write_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
41 | int read_flash(uint32_t addr, uint8_t *data, uint32_t data_len);
42 | void save_data(uint8_t *data, uint32_t data_len, uint16_t block_number);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/gpioHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __GPIOHANDLER_H__
3 | #define __GPIOHANDLER_H__
4 |
5 | #include
6 |
7 | #define LEDn 2
8 |
9 | #define LED1_PIN GPIO_Pin_8
10 | #define LED1_GPIO_PORT GPIOA
11 | #define LED1_GPIO_CLK RCC_APB2Periph_GPIOC
12 |
13 | #define LED2_PIN GPIO_Pin_12
14 | #define LED2_GPIO_PORT GPIOC
15 | #define LED2_GPIO_CLK RCC_APB2Periph_GPIOC
16 |
17 | #define BOOT_PIN GPIO_Pin_8
18 | #define BOOT_GPIO_PORT GPIOC
19 | #define BOOT_GPIO_CLK RCC_APB2Periph_GPIOC
20 |
21 | #define W5500_RESET_PIN GPIO_Pin_0 // PB.0
22 | #define W5500_RESET_PORT GPIOB /* GPIOB */
23 | #define W5500_RESET_CLK RCC_APB2Periph_GPIOB
24 |
25 | typedef enum
26 | {
27 | LED1 = 0,
28 | LED2 = 1,
29 | LED3 = 2,
30 | LED4 = 3
31 | } Led_TypeDef;
32 |
33 | void W5500_RESET();
34 | void LED_Init(Led_TypeDef Led);
35 | void LED_On(Led_TypeDef Led);
36 | void LED_Off(Led_TypeDef Led);
37 | void LED_Toggle(Led_TypeDef Led);
38 | uint8_t get_LED_Status(Led_TypeDef Led);
39 | void BOOT_Pin_Init();
40 | uint8_t get_bootpin_Status();
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/i2cHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __I2CHANDLER_H__
3 | #define __I2CHANDLER_H__
4 |
5 | /* Includes ------------------------------------------------------------------*/
6 | #include "stm32f10x.h"
7 |
8 | // I2C EERPOM Peri function Section
9 | #define EPP_I2C I2C1
10 | #define EEP_Address 0xA0
11 | #define EEP_MacAddresss 0xFA
12 | #define EEP_I2C_RCC RCC_APB1Periph_I2C1
13 | #define EEP_GPIO_RCC RCC_APB2Periph_GPIOB
14 | #define EEP_PORT GPIOB
15 | #define EEP_SCL_Pin GPIO_Pin_6
16 | #define EEP_SDA_Pin GPIO_Pin_7
17 |
18 | extern u8 EEPROM_ADDRESS;
19 | void I2C1Initialize(void);
20 | void EEP_Read(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t NumByteToRead);
21 | void EEP_Write(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
22 | void I2C_EE_WaitEepromStandbyState(void);
23 |
24 |
25 | // I2C EERPOM GPIO function Section
26 | #define IIC1_SCL_PORT GPIOC
27 | #define IIC1_SCL_PIN GPIO_Pin_6
28 |
29 | #define IIC1_SDA_PORT GPIOC
30 | #define IIC1_SDA_PIN GPIO_Pin_7
31 |
32 | #define IIC1_SCL_HIGH() GPIO_WriteBit(IIC1_SCL_PORT,IIC1_SCL_PIN,Bit_SET)
33 | #define IIC1_SCL_LOW() GPIO_WriteBit(IIC1_SCL_PORT,IIC1_SCL_PIN,Bit_RESET)
34 |
35 | #define IIC1_SDA_HIGH() GPIO_WriteBit(IIC1_SDA_PORT,IIC1_SDA_PIN,Bit_SET)
36 | #define IIC1_SDA_LOW() GPIO_WriteBit(IIC1_SDA_PORT,IIC1_SDA_PIN,Bit_RESET)
37 |
38 | #define IIC1_READ_DATA GPIO_ReadInputDataBit(IIC1_SDA_PORT,IIC1_SDA_PIN)
39 |
40 | void IIC1_Init(void);
41 | void IIC1_Start(void);
42 | void IIC1_Stop(void);
43 | u8 IIC1_Wait_Ack(void);
44 | void IIC1_Ack(void);
45 | void IIC1_NAck(void);
46 | void IIC1_Send_Byte(u8 txd);
47 | u8 IIC1_Read_Byte(unsigned char ack);
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/rccHandler.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.c
3 | * @brief RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #include "stm32f10x.h"
13 | #include "rccHandler.h"
14 |
15 | /**
16 | * @brief Sets System clock frequency to 72MHz and configure HCLK, PCLK2
17 | * and PCLK1 prescalers.
18 | * @param None
19 | * @return None
20 | */
21 | #if 1
22 | void RCC_Configuration(void)
23 | {
24 | ErrorStatus HSEStartUpStatus;
25 |
26 | /* RCC system reset(for debug purpose) */
27 | RCC_DeInit();
28 |
29 | /* Enable HSE */
30 | RCC_HSEConfig(RCC_HSE_ON);
31 |
32 | /* Wait till HSE is ready */
33 | HSEStartUpStatus = RCC_WaitForHSEStartUp();
34 |
35 | if(HSEStartUpStatus == SUCCESS)
36 | {
37 | /* Enable Prefetch Buffer */
38 | FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
39 |
40 | /* Flash 2 wait state */
41 | FLASH_SetLatency(FLASH_Latency_2);
42 |
43 | /* HCLK = SYSCLK */
44 | RCC_HCLKConfig(RCC_SYSCLK_Div1);
45 |
46 | /* PCLK2 = HCLK */
47 | RCC_PCLK2Config(RCC_HCLK_Div1);
48 |
49 | /* PCLK1 = HCLK/2 */
50 | RCC_PCLK1Config(RCC_HCLK_Div2);
51 |
52 | /* PLLCLK = 8MHz * 9 = 72 MHz */
53 | RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);
54 | // RCC_PLLConfig(RCC_PLLSource_PREDIV1, RCC_PLLMul_9);
55 |
56 | /* Enable PLL */
57 | RCC_PLLCmd(ENABLE);
58 |
59 | /* Wait till PLL is ready */
60 | while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
61 | {
62 | }
63 |
64 | /* Select PLL as system clock source */
65 | RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
66 |
67 | /* Wait till PLL is used as system clock source */
68 | while(RCC_GetSYSCLKSource() != 0x08)
69 | {
70 | }
71 |
72 | /* TIM2 clock enable */
73 | // RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2|RCC_APB1Periph_TIM3|RCC_APB1Periph_USART2, ENABLE);
74 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
75 |
76 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
77 |
78 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
79 | | RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
80 |
81 | }
82 | }
83 | #else
84 | void RCC_Configuration(void)
85 | {
86 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC
87 | | RCC_APB2Periph_AFIO | RCC_APB2Periph_USART1, ENABLE);
88 | }
89 | #endif
90 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/rccHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file rccHandler.h
3 | * @brief Header File for RCC Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __RCCHANDLER_H__
13 | #define __RCCHANDLER_H__
14 |
15 | void RCC_Configuration(void);
16 |
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/spiHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __SPIHANDLER_H__
3 | #define __SPIHANDLER_H__
4 |
5 | #define W5500_SPI SPI2
6 | #define W5500_SPI_CLK RCC_APB1Periph_SPI2
7 |
8 | #define W5500_SPI_SCK_PIN GPIO_Pin_13 /* PB.13 */
9 | #define W5500_SPI_SCK_GPIO_PORT GPIOB /* GPIOB */
10 | #define W5500_SPI_SCK_GPIO_CLK RCC_APB2Periph_GPIOB
11 |
12 | #define W5500_SPI_MISO_PIN GPIO_Pin_14 /* PB.14 */
13 | #define W5500_SPI_MISO_GPIO_PORT GPIOB /* GPIOB */
14 | #define W5500_SPI_MISO_GPIO_CLK RCC_APB2Periph_GPIOB
15 |
16 | #define W5500_SPI_MOSI_PIN GPIO_Pin_15 /* PB.15 */
17 | #define W5500_SPI_MOSI_GPIO_PORT GPIOB /* GPIOB */
18 | #define W5500_SPI_MOSI_GPIO_CLK RCC_APB2Periph_GPIOB
19 |
20 | #define W5500_CS_PIN GPIO_Pin_12 /* PB.12 */
21 | #define W5500_CS_GPIO_PORT GPIOB /* GPIOB */
22 | #define W5500_CS_GPIO_CLK RCC_APB2Periph_GPIOB
23 |
24 | #define W5500_DUMMY_BYTE 0xFF
25 | //#define W5500_RESET_PIN GPIO_Pin_9
26 |
27 | void W5500_SPI_Init(void);
28 | void W5500_Init(void);
29 | //void Net_Conf();
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/storageHandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * storageHandler.h
3 | *
4 | * Created on: 2014. 9. 16.
5 | * Author: Raphael Kwon
6 | */
7 |
8 | #ifndef STORAGEHANDLER_H_
9 | #define STORAGEHANDLER_H_
10 |
11 | #include
12 |
13 | int read_storage(uint8_t isConfig, void *data, uint16_t size);
14 | int write_storage(uint8_t isConfig, void *data, uint16_t size);
15 |
16 | #endif /* STORAGEHANDLER_H_ */
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/timerHandler.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __TIMERHANDLER_H__
3 | #define __TIMERHANDLER_H__
4 |
5 | void Timer_Configuration(void);
6 |
7 | void Delay(volatile uint32_t nCount);
8 | void delay_us (const uint32_t usec);
9 | void delay_ms (const uint32_t msec);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/PlatformHandler/uartHandler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file uartHandler.h
3 | * @brief Header File for UART Handler Example
4 | * @version 1.0
5 | * @date 2014/07/15
6 | * @par Revision
7 | * 2014/07/15 - 1.0 Release
8 | * @author
9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved.
10 | */
11 |
12 | #ifndef __UARTHANDLER_H__
13 | #define __UARTHANDLER_H__
14 |
15 | #include "ring_buffer.h"
16 |
17 | #define USART1_TX GPIO_Pin_9 // out
18 | #define USART1_RX GPIO_Pin_10 // in
19 | #define USART1_CTS GPIO_Pin_11 // in
20 | #define USART1_RTS GPIO_Pin_12 // out
21 |
22 | #define UART_SRB_SIZE 1024 /* Send */
23 | #define UART_RRB_SIZE 1024 /* Receive */
24 |
25 | extern RINGBUFF_T txring1, rxring1;
26 | extern uint32_t baud_table[11];
27 |
28 | void USART1_Configuration(void);
29 |
30 | int UART_read(void *data, int bytes);
31 | uint32_t UART_write(void *data, int bytes);
32 | int UART_read_blk(void *data, int bytes);
33 | void myprintf(char *fmt, ...);
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/common.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __COMMON_H__
3 | #define __COMMON_H__
4 |
5 | #define MAJOR_VER 101
6 | #define MINOR_VER 0
7 | #define MAINTENANCE_VER 0
8 |
9 | #define APP_BASE 0x08007000 // Boot Size 28K
10 |
11 | #define SOCK_CONFIG 0
12 | #define SOCK_TFTP 1
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/src/netutil/netutil.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __NETUTIL_H__
3 | #define __NETUTIL_H__
4 |
5 | #include
6 |
7 | #define SYSTEM_LITTLE_ENDIAN
8 |
9 | int8_t* inet_ntoa(uint32_t addr);
10 | int8_t* inet_ntoa_pad(uint32_t addr);
11 | uint32_t inet_addr(uint8_t* addr);
12 | uint16_t swaps(uint16_t i);
13 | uint32_t swapl(uint32_t l);
14 | uint16_t htons(uint16_t hostshort);
15 | uint32_t htonl(uint32_t hostlong);
16 | uint32_t ntohs(uint16_t netshort);
17 | uint32_t ntohl(uint32_t netlong);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/cmsis/README_CMSIS.txt:
--------------------------------------------------------------------------------
1 | * -------------------------------------------------------------------
2 | * Copyright (C) 2011-2014 ARM Limited. All rights reserved.
3 | *
4 | * Date: 17 February 2014
5 | * Revision: V4.00
6 | *
7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS)
8 | * Title: Release Note for CMSIS
9 | *
10 | * -------------------------------------------------------------------
11 |
12 | These files are the CMSIS Core Support and CMSIS DSP Include Files.
13 |
14 | To save space, from the complete ARM package (CMSIS-SP-00300-r4p0-00rel0.zip)
15 | only the CMSIS/Include folder was used here.
16 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The stm32f10x.h and system_stm32f10x.h files are from stsw-stm32054.zip,
2 | the folder:
3 |
4 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
5 |
6 | The cmsis_device.h is added for convenience.
7 |
8 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/cmsis/cmsis_device.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef STM32F1_CMSIS_DEVICE_H_
7 | #define STM32F1_CMSIS_DEVICE_H_
8 |
9 | #include "stm32f10x.h"
10 |
11 | #endif // STM32F1_CMSIS_DEVICE_H_
12 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/cmsis/system_stm32f10x.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f10x.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Header File.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17 | *
18 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /** @addtogroup CMSIS
23 | * @{
24 | */
25 |
26 | /** @addtogroup stm32f10x_system
27 | * @{
28 | */
29 |
30 | /**
31 | * @brief Define to prevent recursive inclusion
32 | */
33 | #ifndef __SYSTEM_STM32F10X_H
34 | #define __SYSTEM_STM32F10X_H
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /** @addtogroup STM32F10x_System_Includes
41 | * @{
42 | */
43 |
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @addtogroup STM32F10x_System_Exported_types
50 | * @{
51 | */
52 |
53 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @addtogroup STM32F10x_System_Exported_Constants
60 | * @{
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /** @addtogroup STM32F10x_System_Exported_Macros
68 | * @{
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @addtogroup STM32F10x_System_Exported_Functions
76 | * @{
77 | */
78 |
79 | extern void SystemInit(void);
80 | extern void SystemCoreClockUpdate(void);
81 | /**
82 | * @}
83 | */
84 |
85 | #ifdef __cplusplus
86 | }
87 | #endif
88 |
89 | #endif /*__SYSTEM_STM32F10X_H */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/cortexm/ExceptionHandlers.h:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #ifndef CORTEXM_EXCEPTION_HANDLERS_H_
7 | #define CORTEXM_EXCEPTION_HANDLERS_H_
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #if defined(__cplusplus)
12 | extern "C"
13 | {
14 | #endif
15 |
16 | // External references to cortexm_handlers.c
17 |
18 | extern void
19 | Reset_Handler(void);
20 | extern void
21 | NMI_Handler(void);
22 | extern void
23 | HardFault_Handler(void);
24 |
25 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
26 | extern void
27 | MemManage_Handler(void);
28 | extern void
29 | BusFault_Handler(void);
30 | extern void
31 | UsageFault_Handler(void);
32 | #endif
33 |
34 | extern void
35 | SVC_Handler(void);
36 |
37 | #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
38 | extern void
39 | DebugMon_Handler(void);
40 | #endif
41 |
42 | extern void
43 | PendSV_Handler(void);
44 | extern void
45 | SysTick_Handler(void);
46 |
47 | #if defined(__cplusplus)
48 | }
49 | #endif
50 |
51 | // ----------------------------------------------------------------------------
52 |
53 | #endif // CORTEXM_EXCEPTION_HANDLERS_H_
54 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/include/stm32f1-stdperiph/stm32f10x_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f10x_crc.h
4 | * @author MCD Application Team
5 | * @version V3.5.0
6 | * @date 11-March-2011
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | *
19 | * © COPYRIGHT 2011 STMicroelectronics
20 | ******************************************************************************
21 | */
22 |
23 | /* Define to prevent recursive inclusion -------------------------------------*/
24 | #ifndef __STM32F10x_CRC_H
25 | #define __STM32F10x_CRC_H
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | /* Includes ------------------------------------------------------------------*/
32 | #include "stm32f10x.h"
33 |
34 | /** @addtogroup STM32F10x_StdPeriph_Driver
35 | * @{
36 | */
37 |
38 | /** @addtogroup CRC
39 | * @{
40 | */
41 |
42 | /** @defgroup CRC_Exported_Types
43 | * @{
44 | */
45 |
46 | /**
47 | * @}
48 | */
49 |
50 | /** @defgroup CRC_Exported_Constants
51 | * @{
52 | */
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /** @defgroup CRC_Exported_Macros
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @defgroup CRC_Exported_Functions
67 | * @{
68 | */
69 |
70 | void CRC_ResetDR(void);
71 | uint32_t CRC_CalcCRC(uint32_t Data);
72 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
73 | uint32_t CRC_GetCRC(void);
74 | void CRC_SetIDRegister(uint8_t IDValue);
75 | uint8_t CRC_GetIDRegister(void);
76 |
77 | #ifdef __cplusplus
78 | }
79 | #endif
80 |
81 | #endif /* __STM32F10x_CRC_H */
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
95 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/cmsis/README_DEVICE.txt:
--------------------------------------------------------------------------------
1 | The system_stm32f10x.c file is from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
4 |
5 | The vectors_stm32f10x.c was created to conform to the startup_stm32f10x_xx*.s.
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/cortexm/_initialize_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | // Forward declarations.
13 |
14 | void
15 | __initialize_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // This is the default hardware initialisation routine, it can be
20 | // redefined in the application for more complex applications that
21 | // require early inits (before constructors), otherwise these can
22 | // be done in main().
23 | //
24 | // Called early from _start(), right after data & bss init, before
25 | // constructors.
26 | //
27 | // After Reset the Cortex-M processor is in Thread mode,
28 | // priority is Privileged, and the Stack is set to Main.
29 |
30 | void
31 | __attribute__((weak))
32 | __initialize_hardware(void)
33 | {
34 | // Call the CSMSIS system initialisation routine.
35 | SystemInit();
36 |
37 | #if defined (__VFP_FP__) && !defined (__SOFTFP__)
38 |
39 | // Enable the Cortex-M4 FPU only when -mfloat-abi=hard.
40 | // Code taken from Section 7.1, Cortex-M4 TRM (DDI0439C)
41 |
42 | // Set bits 20-23 to enable CP10 and CP11 coprocessor
43 | SCB->CPACR |= (0xF << 20);
44 |
45 | #endif // (__VFP_FP__) && !(__SOFTFP__)
46 | }
47 |
48 | // ----------------------------------------------------------------------------
49 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/cortexm/_reset_hardware.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include "cmsis_device.h"
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | extern void
13 | __attribute__((noreturn))
14 | NVIC_SystemReset(void);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // Forward declarations
19 |
20 | void
21 | __reset_hardware(void);
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | // This is the default hardware reset routine; it can be
26 | // redefined in the application for more complex applications.
27 | //
28 | // Called from _exit().
29 |
30 | void
31 | __attribute__((weak,noreturn))
32 | __reset_hardware()
33 | {
34 | NVIC_SystemReset();
35 | }
36 |
37 | // ----------------------------------------------------------------------------
38 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/diag/Trace.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #if defined(TRACE)
9 |
10 | #include
11 | #include
12 | #include "diag/Trace.h"
13 | #include "string.h"
14 |
15 | #ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
16 | #define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (128)
17 | #endif
18 |
19 | // ----------------------------------------------------------------------------
20 |
21 | int
22 | trace_printf(const char* format, ...)
23 | {
24 | int ret;
25 | va_list ap;
26 |
27 | va_start (ap, format);
28 |
29 | // TODO: rewrite it to no longer use newlib, it is way too heavy
30 |
31 | static char buf[OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE];
32 |
33 | // Print to the local buffer
34 | ret = vsnprintf (buf, sizeof(buf), format, ap);
35 | if (ret > 0)
36 | {
37 | // Transfer the buffer to the device
38 | ret = trace_write (buf, (size_t)ret);
39 | }
40 |
41 | va_end (ap);
42 | return ret;
43 | }
44 |
45 | int
46 | trace_puts(const char *s)
47 | {
48 | trace_write(s, strlen(s));
49 | return trace_write("\n", 1);
50 | }
51 |
52 | int
53 | trace_putchar(int c)
54 | {
55 | trace_write((const char*)&c, 1);
56 | return c;
57 | }
58 |
59 | void
60 | trace_dump_args(int argc, char* argv[])
61 | {
62 | trace_printf("main(argc=%d, argv=[", argc);
63 | for (int i = 0; i < argc; ++i)
64 | {
65 | if (i != 0)
66 | {
67 | trace_printf(", ");
68 | }
69 | trace_printf("\"%s\"", argv[i]);
70 | }
71 | trace_printf("]);\n");
72 | }
73 |
74 | // ----------------------------------------------------------------------------
75 |
76 | #endif // TRACE
77 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/README.txt:
--------------------------------------------------------------------------------
1 |
2 | The following files extend or replace some of the the newlib functionality:
3 |
4 | _startup.c: a customised startup sequence, written in C
5 |
6 | _exit.c: a customised exit() implementation
7 |
8 | _syscalls.c: local versions of the libnosys/librdimon code
9 |
10 | _sbrk.c: a custom _sbrk() to match the actual linker scripts
11 |
12 | assert.c: implementation for the asserion macros
13 |
14 | _cxx.cpp: local versions of some C++ support, to avoid references to
15 | large functions.
16 |
17 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/_cxx.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | // These functions are redefined locally, to avoid references to some
9 | // heavy implementations in the standard C++ library.
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | #include
14 | #include
15 | #include "diag/Trace.h"
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | namespace __gnu_cxx
20 | {
21 | void
22 | __attribute__((noreturn))
23 | __verbose_terminate_handler();
24 |
25 | void
26 | __verbose_terminate_handler()
27 | {
28 | trace_puts(__func__);
29 | abort();
30 | }
31 | }
32 |
33 | // ----------------------------------------------------------------------------
34 |
35 | extern "C"
36 | {
37 | void
38 | __attribute__((noreturn))
39 | __cxa_pure_virtual();
40 |
41 | void
42 | __cxa_pure_virtual()
43 | {
44 | trace_puts(__func__);
45 | abort();
46 | }
47 | }
48 |
49 | // ----------------------------------------------------------------------------
50 |
51 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/_exit.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include "diag/Trace.h"
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | extern void
14 | __attribute__((noreturn))
15 | __reset_hardware(void);
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | // Forward declaration
20 |
21 | void
22 | _exit(int code);
23 |
24 | // ----------------------------------------------------------------------------
25 |
26 | // On Release, call the hardware reset procedure.
27 | // On Debug we just enter an infinite loop, to be used as landmark when halting
28 | // the debugger.
29 | //
30 | // It can be redefined in the application, if more functionality
31 | // is required.
32 |
33 | void
34 | __attribute__((weak))
35 | _exit(int code __attribute__((unused)))
36 | {
37 | #if !defined(DEBUG)
38 | __reset_hardware();
39 | #endif
40 |
41 | // TODO: write on trace
42 | while (1)
43 | ;
44 | }
45 |
46 | // ----------------------------------------------------------------------------
47 |
48 | void
49 | __attribute__((weak,noreturn))
50 | abort(void)
51 | {
52 | trace_puts("abort(), exiting...");
53 |
54 | _exit(1);
55 | }
56 |
57 | // ----------------------------------------------------------------------------
58 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/_sbrk.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | #include
9 | #include
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | caddr_t
14 | _sbrk(int incr);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | // The definitions used here should be kept in sync with the
19 | // stack definitions in the linker script.
20 |
21 | caddr_t
22 | _sbrk(int incr)
23 | {
24 | extern char _Heap_Begin; // Defined by the linker.
25 | extern char _Heap_Limit; // Defined by the linker.
26 |
27 | static char* current_heap_end;
28 | char* current_block_address;
29 |
30 | if (current_heap_end == 0)
31 | current_heap_end = &_Heap_Begin;
32 |
33 | current_block_address = current_heap_end;
34 |
35 | // Need to align heap to word boundary, else will get
36 | // hard faults on Cortex-M0. So we assume that heap starts on
37 | // word boundary, hence make sure we always add a multiple of
38 | // 4 to it.
39 | incr = (incr + 3) & (~3); // align value to 4
40 | if (current_heap_end + incr > &_Heap_Limit)
41 | {
42 | // Some of the libstdc++-v3 tests rely upon detecting
43 | // out of memory errors, so do not abort here.
44 | #if 0
45 | extern void abort (void);
46 |
47 | _write (1, "_sbrk: Heap and stack collision\n", 32);
48 |
49 | abort ();
50 | #else
51 | // Heap has overflowed
52 | errno = ENOMEM;
53 | return (caddr_t) -1;
54 | #endif
55 | }
56 |
57 | current_heap_end += incr;
58 |
59 | return (caddr_t) current_block_address;
60 | }
61 |
62 | // ----------------------------------------------------------------------------
63 |
64 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/_write.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | // Do not include on semihosting and when freestanding
7 | #if !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
8 |
9 | // ----------------------------------------------------------------------------
10 |
11 | #include
12 | #include "diag/Trace.h"
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | // When using retargetted configurations, the standard write() system call,
17 | // after a long way inside newlib, finally calls this implementation function.
18 |
19 | // Based on the file descriptor, it can send arrays of characters to
20 | // different physical devices.
21 |
22 | // Currently only the output and error file descriptors are tested,
23 | // and the characters are forwarded to the trace device, mainly
24 | // for demonstration purposes.
25 |
26 | ssize_t
27 | _write (int fd, const char* buf, size_t nbyte);
28 |
29 | ssize_t
30 | _write (int fd __attribute__((unused)), const char* buf __attribute__((unused)),
31 | size_t nbyte __attribute__((unused)))
32 | {
33 | #if defined(TRACE)
34 | // STDOUT and STDERR are routed to the trace device
35 | if (fd == 1 || fd == 2)
36 | {
37 | return trace_write (buf, nbyte);
38 | }
39 | #endif // TRACE
40 |
41 | errno = ENOSYS;
42 | return -1;
43 | }
44 |
45 | // ----------------------------------------------------------------------------
46 |
47 | #endif // !defined(OS_USE_SEMIHOSTING) && !(__STDC_HOSTED__ == 0)
48 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/newlib/assert.c:
--------------------------------------------------------------------------------
1 | //
2 | // This file is part of the µOS++ III distribution.
3 | // Copyright (c) 2014 Liviu Ionescu.
4 | //
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #include "diag/Trace.h"
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | void
15 | __attribute__((noreturn))
16 | __assert_func (const char *file, int line, const char *func,
17 | const char *failedexpr)
18 | {
19 | trace_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
20 | failedexpr, file, line, func ? ", function: " : "",
21 | func ? func : "");
22 | abort ();
23 | /* NOTREACHED */
24 | }
25 |
26 | // ----------------------------------------------------------------------------
27 |
28 | // This is STM32 specific, but can be used on other platforms too.
29 | // If you need it, add the following to your application header:
30 |
31 | //#ifdef USE_FULL_ASSERT
32 | //#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
33 | //void assert_failed(uint8_t* file, uint32_t line);
34 | //#else
35 | //#define assert_param(expr) ((void)0)
36 | //#endif // USE_FULL_ASSERT
37 |
38 | #if defined(USE_FULL_ASSERT)
39 |
40 | void
41 | assert_failed (uint8_t* file, uint32_t line);
42 |
43 | // Called from the assert_param() macro, usually defined in the stm32f*_conf.h
44 | void
45 | __attribute__((noreturn))
46 | assert_failed (uint8_t* file, uint32_t line)
47 | {
48 | trace_printf ("assert_param() failed: file \"%s\", line %d\n", file, line);
49 | abort ();
50 | /* NOTREACHED */
51 | }
52 |
53 | #endif // defined(USE_FULL_ASSERT)
54 |
55 | // ----------------------------------------------------------------------------
56 |
--------------------------------------------------------------------------------
/WIZ550web_Firmware/WIZ550web_HW_Rev1.1/WIZ550web_Boot/system/src/stm32f1-stdperiph/README_STDPERIPH.txt:
--------------------------------------------------------------------------------
1 | These files are from stsw-stm32054.zip, the folder:
2 |
3 | STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src
4 |
5 |
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_logo_IoT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_logo_IoT.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_logo_top.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_logo_top.gif
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_makerspace_logo_120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/WIZnet_makerspace_logo_120.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/di_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/di_off.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/di_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/di_on.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/dio_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/dio_on.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/favicon.ico
--------------------------------------------------------------------------------
/WIZ550web_Webpages/0_Basic_Demopages/img/notused.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/0_Basic_Demopages/img/notused.png
--------------------------------------------------------------------------------
/WIZ550web_Webpages/1_Get_Set_Functions_Testpage/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wiznet/WIZ550web/fd7e323b7fb7a5ed05ee4181a8daa1cb2b48728d/WIZ550web_Webpages/1_Get_Set_Functions_Testpage/img/favicon.ico
--------------------------------------------------------------------------------