Description: Why transplant Freemodbus, this issue needs to be answered in two ways . First , modbus is a very good application layer protocol , it is very simple and relatively perfect. For no contact with modbus friends, I do not recommend direct transplant freemodbus, the patient should start from modbus documents and take full advantage of all the resources around you , for example, part of the modbus PLC. Second, the fact communication protocol embedded systems can develop their own , but through practice found loopholes own custom protocols , especially the expansion is extremely difficult. I have always believed that draw on the experience of others is a good way . Learn from others mature code can reduce debugging time , functions are also a lot more .
Personal point of view , for reference only .
freemodbus Tips
freemodbus only from the machine function . freemodbus more suitable for embedded systems, although there are examples of WIN32 example , if you want
To Search:
File list (Check if you may need any files):
CMSIS
.....\core_cm3.c
.....\core_cm3.h
.....\stm32f10x.h
.....\system_stm32f10x.c
.....\system_stm32f10x.h
Debug
.....\Exe
.....\...\Test FreeModbus.out
.....\List
.....\Obj
.....\...\core_cm3.o
.....\...\main.o
.....\...\mb.o
.....\...\mbcrc.o
.....\...\mbfunccoils.o
.....\...\mbfuncdiag.o
.....\...\mbfuncdisc.o
.....\...\mbfuncholding.o
.....\...\mbfuncinput.o
.....\...\mbfuncother.o
.....\...\mbrtu.o
.....\...\mbutils.o
.....\...\misc.o
.....\...\portevent.o
.....\...\portserial.o
.....\...\porttimer.o
.....\...\startup_stm32f10x_hd.o
.....\...\startup_stm32f10x_md.o
.....\...\stm32f10x_gpio.o
.....\...\stm32f10x_it.o
.....\...\stm32f10x_rcc.o
.....\...\stm32f10x_tim.o
.....\...\stm32f10x_usart.o
.....\...\system_stm32f10x.o
FreeModbus
..........\modbus
..........\......\ascii
..........\......\.....\mbascii.c
..........\......\.....\mbascii.h
..........\......\functions
..........\......\.........\mbfunccoils.c
..........\......\.........\mbfuncdiag.c
..........\......\.........\mbfuncdisc.c
..........\......\.........\mbfuncholding.c
..........\......\.........\mbfuncinput.c
..........\......\.........\mbfuncother.c
..........\......\.........\mbutils.c
..........\......\include
..........\......\.......\mb.h
..........\......\.......\mbconfig.h
..........\......\.......\mbframe.h
..........\......\.......\mbfunc.h
..........\......\.......\mbport.h
..........\......\.......\mbproto.h
..........\......\.......\mbutils.h
..........\......\mb.c
..........\......\rtu
..........\......\...\mbcrc.c
..........\......\...\mbcrc.h
..........\......\...\mbrtu.c
..........\......\...\mbrtu.h
..........\......\tcp
..........\......\...\mbtcp.c
..........\......\...\mbtcp.h
..........\port
..........\....\port.h
..........\....\portevent.c
..........\....\portserial.c
..........\....\portserial.c.bak
..........\....\porttimer.c
..........\....\porttimer.c.bak
Linker
......\stm32f10x_flash.icf
......\stm32f10x_flash_extsram.icf
......\stm32f10x_nor.icf
......\stm32f10x_ram.icf
settings
........\Test FreeModbus.cspy.bat
........\Test FreeModbus.dbgdt
........\Test FreeModbus.dni
........\Test FreeModbus.wsdt
........\Test FreeModbus_Debug.jlink
StartUp
.......\startup_stm32f10x_cl.s
.......\startup_stm32f10x_hd.s
.......\startup_stm32f10x_hd_vl.s
.......\startup_stm32f10x_ld.s
.......\startup_stm32f10x_ld_vl.s
.......\startup_stm32f10x_md.s
.......\startup_stm32f10x_md_vl.s
.......\startup_stm32f10x_xl.s
StdPeriph_Driver
................\inc
................\...\misc.h
................\...\stm32f10x_adc.h
................\...\stm32f10x_bkp.h
................\...\stm32f10x_can.h
................\...\stm32f10x_cec.h
................\...\stm32f10x_crc.h