strcmp
Posted: Sat Aug 16, 2014 9:49 am
i'm new on chibios (2.6.5) and chibistudio (preview 6) on STM32F4 discovery board
when i debug, and debugger arrive to strcmp line, argc value become 0 and argv is resetted (before arrive to strcmp argc=1 and argv point to string).
i must include something in makefile to use this function or there are bug with this function? is problem with heap?
the #include <stdio.h>/<string.h>/<stdlib.h> at the top of the main there are.
thanks
Code: Select all
void cmd_oven(BaseSequentialStream *chp, int argc, char *argv[]) {
int value = 0;
COMANDI_ERROR err = NEED_PARAMETERS;
(void)argv;
if (argc > 0) {
if (strcmp(argv[0], "?") == 0) { <-------
......
when i debug, and debugger arrive to strcmp line, argc value become 0 and argv is resetted (before arrive to strcmp argc=1 and argv point to string).
i must include something in makefile to use this function or there are bug with this function? is problem with heap?
the #include <stdio.h>/<string.h>/<stdlib.h> at the top of the main there are.
thanks