CANopenNode / CanOpenSTM32

CANopenNode on STM32 microcontrollers.
Other
275 stars 110 forks source link

Configuring the micro as MASTER problem, CO_NMT_sendCommand() not defined. #56

Closed Liuk-93 closed 6 months ago

Liuk-93 commented 6 months ago

Currently, I am working on configuring my code to enable the microcontroller as a master and send NMT command messages. I used the editor for configuration; however, I am facing difficulties as the CO_NMT_sendCommand() function is not available in the microcontroller's IDE.

Someone can explain me the rigth passage to configure the micro as Master?

Thanks

MaJerle commented 6 months ago

Reposting to the core repo https://github.com/CANopenNode/CANopenNode/issues/494

andrewteta commented 6 months ago

Placing the following near the top of CO_driver_target.h worked for me:

#define CO_CONFIG_NMT (CO_CONFIG_NMT_MASTER)
CANopenNode commented 6 months ago

Yes, this is the correct approach. Editor only generates Object Dictionary and some macros related to it.