реклама на сайте
подробности

 
 
> OpenOCD: трудности сборки
Doka
сообщение Dec 28 2008, 07:59
Сообщение #1


Electrical Engineer
******

Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778



OpenOCD: какое HW выбрать для отладки ARM ?


взял из svn последнюю версию (1282)

в конфиге сборки есть такие строчки:
Код
   --enable-ioutil         Enable ioutil functions - useful for standalone OpenOCD implementations
  --enable-httpd          Enable builtin httpd server - useful for standalone OpenOCD implementations


конфигурю:
./configure --enable-ioutil --enable-httpd

собираю:
make

получаю:
CODE
...
...
httpd.c:50:24: error: microhttpd.h: No such file or directory
httpd.c:200: warning: ‘enum MHD_RequestTerminationCode’ declared inside parameter list
httpd.c:200: warning: its scope is only this definition or declaration, which is probably not what you want
httpd.c:200: warning: ‘struct MHD_Connection’ declared inside parameter list
httpd.c:200: error: parameter 4 (‘toe’) has incomplete type
httpd.c: In function ‘request_completed’:
httpd.c:209: warning: implicit declaration of function ‘MHD_destroy_post_processor’
httpd.c: At top level:
httpd.c:247: warning: ‘enum MHD_ValueKind’ declared inside parameter list
httpd.c:244: error: parameter 2 (‘kind’) has incomplete type
httpd.c: In function ‘iterate_post’:
httpd.c:253: error: ‘MHD_YES’ undeclared (first use in this function)
httpd.c:253: error: (Each undeclared identifier is reported only once
httpd.c:253: error: for each function it appears in.)
httpd.c: At top level:
httpd.c:257: warning: ‘enum MHD_ValueKind’ declared inside parameter list
httpd.c:256: error: parameter 2 (‘kind’) has incomplete type
httpd.c: In function ‘record_arg’:
httpd.c:261: error: ‘MHD_YES’ undeclared (first use in this function)
httpd.c: At top level:
httpd.c:265: warning: ‘struct MHD_Connection’ declared inside parameter list
httpd.c: In function ‘handle_request’:
httpd.c:288: error: ‘MHD_NO’ undeclared (first use in this function)
httpd.c:290: warning: implicit declaration of function ‘MHD_create_response_from_data’
httpd.c:291: error: ‘MHD_YES’ undeclared (first use in this function)
httpd.c:291: warning: assignment makes pointer from integer without a cast
httpd.c:292: warning: implicit declaration of function ‘MHD_queue_response’
httpd.c:293: error: ‘MHD_HTTP_INTERNAL_SERVER_ERROR’ undeclared (first use in this function)
httpd.c:294: warning: implicit declaration of function ‘MHD_destroy_response’
httpd.c:306: warning: assignment makes pointer from integer without a cast
httpd.c:318: warning: implicit declaration of function ‘loadFile’
httpd.c:324: warning: assignment makes pointer from integer without a cast
httpd.c:325: error: ‘MHD_HTTP_NOT_FOUND’ undeclared (first use in this function)
httpd.c:332: warning: assignment makes pointer from integer without a cast
httpd.c:333: warning: implicit declaration of function ‘MHD_add_response_header’
httpd.c:335: error: ‘MHD_HTTP_OK’ undeclared (first use in this function)
httpd.c: At top level:
httpd.c:345: warning: ‘struct MHD_Connection’ declared inside parameter list
httpd.c: In function ‘ahc_echo’:
httpd.c:358: error: ‘MHD_NO’ undeclared (first use in this function)
httpd.c:378: warning: implicit declaration of function ‘MHD_get_connection_values’
httpd.c:378: error: ‘MHD_GET_ARGUMENT_KIND’ undeclared (first use in this function)
httpd.c:383: warning: implicit declaration of function ‘MHD_create_post_processor’
httpd.c:384: warning: assignment makes pointer from integer without a cast
httpd.c:387: error: ‘MHD_YES’ undeclared (first use in this function)
httpd.c:397: warning: implicit declaration of function ‘MHD_post_process’
httpd.c:426: warning: passing argument 1 of ‘handle_request’ from incompatible pointer type
httpd.c: In function ‘httpd_start’:
httpd.c:438: warning: implicit declaration of function ‘pthread_mutexattr_init’
httpd.c:439: warning: implicit declaration of function ‘pthread_mutex_init’
httpd.c:443: warning: implicit declaration of function ‘MHD_start_daemon’
httpd.c:443: error: ‘MHD_USE_SELECT_INTERNALLY’ undeclared (first use in this function)
httpd.c:445: error: ‘MHD_OPTION_NOTIFY_COMPLETED’ undeclared (first use in this function)
httpd.c:446: error: ‘MHD_OPTION_END’ undeclared (first use in this function)
httpd.c:446: warning: assignment makes pointer from integer without a cast
httpd.c: In function ‘httpd_stop’:
httpd.c:468: warning: implicit declaration of function ‘MHD_stop_daemon’
httpd.c:469: warning: implicit declaration of function ‘pthread_mutex_destroy’
httpd.c: In function ‘openocd_sleep_prelude’:
httpd.c:474: warning: implicit declaration of function ‘pthread_mutex_unlock’
httpd.c: In function ‘openocd_sleep_postlude’:
httpd.c:479: warning: implicit declaration of function ‘pthread_mutex_lock’
make[3]: *** [httpd.o] Error 1
make[3]: Leaving directory `/hdd/500/download/soft/openocd/src/server'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/hdd/500/download/soft/openocd/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/hdd/500/download/soft/openocd'
make: *** [all] Error 2


т.о. судя по всему в этом пресловутом httpd сырой функционал, если не указывать в конфиге, то всё успешно собирается и даже запускается:
Код
$ openocd
Open On-Chip Debugger 1.0 (2008-12-28-02:43) svn:1282


вопроса 2 :
1. насколько действительно "useful for standalone OpenOCD implementations" этот пресловутый веб-сервер? (в документации комментариев на этот счёт не обнаружил)
2. как определить ревизию последнего успешного коммита??
полазил по репозитарию - бранчей по номерам релизов у них нет.. как определить какую ревизию брать из репозитария, чтобы это гарантированно собралось без ошибок??


--------------------
Блог iDoka.ru
CV linkedin.com/in/iDoka
Sources github.com/iDoka


Never stop thinking...........................
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
Doka
сообщение Apr 29 2009, 05:16
Сообщение #2


Electrical Engineer
******

Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778



приходится вновь вернуться к теме:

начиная примерно с версии репозитария 1477 по текущую не получается собрать OpenOCD.
симптом один и тот же.

я использую дистрибутивный GCC 4.1.2, собранный так:

Код
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)



ошибка все время одна и та же - несоответствие типов данных при ариф.операциях:

Код
$ ../configure -q -v --enable-release --enable-ioutil --enable-jlink
$ make all

make  all-recursive
make[1]: Entering directory `/hdd/500/data/soft/openocd/openocd.1524/build'
Making all in src
make[2]: Entering directory `/hdd/500/data/soft/openocd/openocd.1524/build/src'
Making all in helper
make[3]: Entering directory `/hdd/500/data/soft/openocd/openocd.1524/build/src/helper'
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-binarybuffer.o -MD -MP -MF ".deps/libhelper_a-binarybuffer.Tpo" -c -o libhelper_a-binarybuffer.o `test -f 'binarybuffer.c' || echo '../../../src/helper/'`binarybuffer.c; \
        then mv -f ".deps/libhelper_a-binarybuffer.Tpo" ".deps/libhelper_a-binarybuffer.Po"; else rm -f ".deps/libhelper_a-binarybuffer.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-options.o -MD -MP -MF ".deps/libhelper_a-options.Tpo" -c -o libhelper_a-options.o `test -f 'options.c' || echo '../../../src/helper/'`options.c; \
        then mv -f ".deps/libhelper_a-options.Tpo" ".deps/libhelper_a-options.Po"; else rm -f ".deps/libhelper_a-options.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-jim.o -MD -MP -MF ".deps/libhelper_a-jim.Tpo" -c -o libhelper_a-jim.o `test -f 'jim.c' || echo '../../../src/helper/'`jim.c; \
        then mv -f ".deps/libhelper_a-jim.Tpo" ".deps/libhelper_a-jim.Po"; else rm -f ".deps/libhelper_a-jim.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-jim-eventloop.o -MD -MP -MF ".deps/libhelper_a-jim-eventloop.Tpo" -c -o libhelper_a-jim-eventloop.o `test -f 'jim-eventloop.c' || echo '../../../src/helper/'`jim-eventloop.c; \
        then mv -f ".deps/libhelper_a-jim-eventloop.Tpo" ".deps/libhelper_a-jim-eventloop.Po"; else rm -f ".deps/libhelper_a-jim-eventloop.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-configuration.o -MD -MP -MF ".deps/libhelper_a-configuration.Tpo" -c -o libhelper_a-configuration.o `test -f 'configuration.c' || echo '../../../src/helper/'`configuration.c; \
        then mv -f ".deps/libhelper_a-configuration.Tpo" ".deps/libhelper_a-configuration.Po"; else rm -f ".deps/libhelper_a-configuration.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-log.o -MD -MP -MF ".deps/libhelper_a-log.Tpo" -c -o libhelper_a-log.o `test -f 'log.c' || echo '../../../src/helper/'`log.c; \
        then mv -f ".deps/libhelper_a-log.Tpo" ".deps/libhelper_a-log.Po"; else rm -f ".deps/libhelper_a-log.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I../../../src/helper -I../.. -I../../../src  -I../../../src/target -I../../../src/server -DPKGDATADIR=\"/usr/local/share/openocd\" -DPKGLIBDIR=\"/usr/local/lib/openocd\"    -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Werror -MT libhelper_a-command.o -MD -MP -MF ".deps/libhelper_a-command.Tpo" -c -o libhelper_a-command.o `test -f 'command.c' || echo '../../../src/helper/'`command.c; \
        then mv -f ".deps/libhelper_a-command.Tpo" ".deps/libhelper_a-command.Po"; else rm -f ".deps/libhelper_a-command.Tpo"; exit 1; fi
cc1: warnings being treated as errors
../../../src/helper/command.c: In function ‘handle_sleep_command’:
../../../src/helper/command.c:786: warning: comparison between signed and unsigned
make[3]: *** [libhelper_a-command.o] Error 1


пробовал писать в маил-лист разработчикам, но видимо не разобрался до конца с этой технологией - никакой реакции OpenOCD-комьюнити не последовало (5дней).


--------------------
Блог iDoka.ru
CV linkedin.com/in/iDoka
Sources github.com/iDoka


Never stop thinking...........................
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение Apr 29 2009, 06:37
Сообщение #3


Гуру
******

Группа: Модераторы
Сообщений: 8 455
Регистрация: 15-05-06
Из: Рига, Латвия
Пользователь №: 17 095



Цитата(Doka @ Apr 29 2009, 08:16) *
Код
../../../src/helper/command.c:786: warning: comparison between signed and unsigned
Исходник у вас есть. Что мешает посмотреть на строку 768 в src/helper/command.c, и если там сравнение знакового и беззнакового не содержит граблей, то просто добавить приведение типов одного из операндов?


--------------------
На любой вопрос даю любой ответ
"Write code that is guaranteed to work, not code that doesn’t seem to break" (C++ FAQ)
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Doka   OpenOCD: трудности сборки   Dec 28 2008, 07:59
- - amw   Цитата(Doka @ Dec 28 2008, 09:59) ... кон...   Jan 5 2009, 09:49
- - Doka   amw у меня RHEL-based линукс. в репозитариях эт...   Jan 18 2009, 15:42
|- - amw   Цитата(Doka @ Jan 18 2009, 17:42) amw у ...   Jan 19 2009, 12:27
|- - amw   Цитата(Doka @ Apr 29 2009, 08:16) ошибка ...   Apr 29 2009, 14:25
- - Harbour   -Werror убрать из мейкфала или привести, в указанн...   Apr 29 2009, 06:36
|- - Doka   Цитата(Harbour @ Apr 29 2009, 10:36) -Wer...   Apr 29 2009, 12:47
- - Doka   Сергей Борщ 1) ну, позанимавшись ранее, самодеяте...   Apr 29 2009, 07:13
- - Harbour   править нужно только эту строчку : 786 while ((ti...   Apr 29 2009, 09:15
- - Doka   Harbour ну, для конкретики, исправлено было так: К...   Apr 29 2009, 09:31
- - Harbour   Sorry, невозможно помочь человеку, который слушает...   Apr 29 2009, 10:02
|- - Doka   Цитатаправить нужно только эту строчку Цитата(Harb...   Apr 29 2009, 10:24
|- - alx2   Цитата(Doka @ Apr 29 2009, 15:24) задам в...   Apr 30 2009, 11:42
- - Harbour   а какой сакральный смысл постоянных изменений свое...   Apr 29 2009, 10:30
- - Doka   у меня не работает OpenOCD c jlink из чтения спарк...   Apr 29 2009, 10:50
- - Harbour   вряд ли кто-то тестит/юзает trunk на x86-64 и 4.x ...   Apr 29 2009, 11:33
- - Harbour   dev-list не для вопросов типа "у меня опять н...   Apr 29 2009, 13:26


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 31st July 2025 - 08:21
Рейтинг@Mail.ru


Страница сгенерированна за 0.01437 секунд с 7
ELECTRONIX ©2004-2016