You are here

App development and Debug

3 posts / 0 new
Last post
dpeinado
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2022-01-14 11:59
Posts: 19
App development and Debug

Hello. I had some background programming in embedded systems, but I'm new to VESC programming. I've done an application very simple, but now I plan to make an application more complex, so debugging is a must. How do you debug an application? There is a dev tools console in VESC-Tool, and communications via USB between VESC and VESC-Tool, so the printing should not be an issue. How is it made? How can I print from VESC application so the result is written out in VESC-Tool console??

Thanks in advance,

Diego

Jfriesen
Offline
Last seen: 3 days 11 hours ago
VESC Free
Joined: 2017-10-24 22:49
Posts: 8

To print to terminal you can use under commands.h: 

int commands_printf(const char* format, ...);

You can see examples of usage in terminal.c

Jeff

dpeinado
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2022-01-14 11:59
Posts: 19

Thanks, I'm using commands_printf, but It has to be used with caution. I've put a commands_printf in a core routine and the firmware has stopped working. I connect the vesc with vesc-tool, but it disconnects automatically, so I can not send a new firmware, so It's bricked until I use a programmer.