When I changed from Modbus ASCII master selected to MOdbus RTU master it compiled. Is there extra configuration required for ASCII?
On Tue, Apr 23, 2024 at 1:38 PM Alan C. Assis <acas...@gmail.com> wrote: > I just verified the apps/modbus/Makefile and noticed that mb.c is only > compiled when CONFIG_MODBUS_SLAVE is selected. > > It means you are enabling the modbus slave or the modbus example (that > assume to be slave). > > So, don't enable CONFIG_EXAMPLES_MODBUS, only EXAMPLES_MODBUSMASTER > > Maybe we need to rename CONFIG_EXAMPLES_MODBUS to > CONFIG_EXAMPLES_MODBUSSLAVE. > > Best Regards, > > Alan > > On Tue, Apr 23, 2024 at 2:23 PM David Welshon <david.wels...@gmail.com> > wrote: > > > Thanks for the help and great videos and articles Alan! > > I just went through the video tutorial again. Unfortunately, modifying my > > own config as well as the nucleo-f4x1re:f401-nsh configurations per the > > video still can't find the functions > > > > On Tue, Apr 23, 2024 at 12:45 PM Alan C. Assis <acas...@gmail.com> > wrote: > > > > > Hi David, > > > > > > These functions are there (see apps/modbus/mb.c for instance). > > > > > > Did you follow this video tutorial: > > > https://www.youtube.com/watch?v=FmJLrG4Ldow > > > > > > Best Regards, > > > > > > Alan > > > > > > On Tue, Apr 23, 2024 at 12:41 PM David Welshon < > david.wels...@gmail.com> > > > wrote: > > > > > > > I am trying to get modbus mastermode rs485 example working on > > > > nucleo-f4x1re following the example on the youtube channel. I am > > getting > > > > undefined reference errors during linking and am not sure if I need > to > > > > modify source or am missing a configuration option. The device I am > > > > interacting with is set at a baudrate of 9600 with no parity instead > of > > > the > > > > baudrate in the video. But other than that I believe I followed the > > video > > > > closely. > > > > > > > > I started modifying the nsh config up to this point and have > zerocross > > > and > > > > gpio working, but I am stuck at the moment on this rs485 bit. > > Appreciate > > > > any help. > > > > Also, I have not participated in many mailing lists, so if I am in > the > > > > wrong place or I am breakin any etiquette rules I apologize in > advance > > > and > > > > appreciate your help finding any etiquette rules or posts to > straighten > > > me > > > > out. > > > > > > > > Attached is my build output and config file and below is a small > build > > > > output snippet. > > > > > > > > include -D__NuttX__ -DNDEBUG -D__KERNEL__ -I > > > > /home/david/nuttxspace/nuttx/arch/arm/src/chip -I > > > > /home/david/nuttxspace/nuttx/arch/arm/src/common -I > > > > /home/david/nuttxspace/nuttx/arch/arm/src/armv7-m -I > > > > /home/david/nuttxspace/nuttx/sched > > > > > > > > > > /home/david/nuttxspace/nuttx/boards/arm/stm32/nucleo-f4x1re/scripts/f401re.ld > > > > -o > > > > > > > > > > /home/david/nuttxspace/nuttx/boards/arm/stm32/nucleo-f4x1re/scripts/f401re.ld.tmp > > > > > > > > echo "LD: nuttx" > > > > > > > > LD: nuttx > > > > > > > > arm-none-eabi-ld --entry=__start -nostdlib --gc-sections --cref > > > > -Map=/home/david/nuttxspace/nuttx/nuttx.map > > > > > > > > > > -T/home/david/nuttxspace/nuttx/boards/arm/stm32/nucleo-f4x1re/scripts/f401re.ld.tmp > > > > -L /home/david/nuttxspace/nuttx/staging -L > > > > /home/david/nuttxspace/nuttx/arch/arm/src/board \ > > > > > > > > -o /home/david/nuttxspace/nuttx/nuttx \ > > > > > > > > --start-group -lsched -ldrivers -lboards -lc -lmm -larch -lxx -lapps > > -lfs > > > > -lbinfmt -lboard -lboard > > > > /usr/lib/gcc/arm-none-eabi/10.3.1/thumb/v7e-m/nofp/libgcc.a > > > > > > > > > > /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libm.a > > > > --end-group > > > > > > > > arm-none-eabi-ld: > > > > > > > > > > /home/david/nuttxspace/nuttx/staging/libapps.a(modbus_main.c.home.david.nuttxspace.apps.examples.modbus_1.o): > > > > in function `modbus_pollthread': > > > > > > > > modbus_main.c:(.text.modbus_pollthread+0x56): undefined reference to > > > > `eMBInit' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0x82): > > undefined > > > > reference to `eMBSetSlaveID' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0x98): > > undefined > > > > reference to `eMBClose' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0x9e): > > undefined > > > > reference to `eMBEnable' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0xbe): > > undefined > > > > reference to `eMBPoll' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0xc4): > > undefined > > > > reference to `eMBDisable' > > > > > > > > arm-none-eabi-ld: modbus_main.c:(.text.modbus_pollthread+0xc8): > > undefined > > > > reference to `eMBClose' > > > > > > > > make[1]: *** [Makefile:211: nuttx] Error 1 > > > > > > > > make[1]: Leaving directory > '/home/david/nuttxspace/nuttx/arch/arm/src' > > > > > > > > make: *** [tools/Unix.mk:546: nuttx] Error 2 > > > > > > > > "make all" terminated with exit code 2. Build might be incomplete. > > > > > > > > > >