Перейти к содержанию
    

Вопросы по Eclipse, CDT, Zylin embedded CDT

Вот что я писал для SAM7 (увы, до LPC руки пока не дошли)

 

Ага. Заработало. По вашему коду понял, что мне нехватало Remap.

 

Вот код инициализации.

 

monitor reset   
monitor speed 30   
monitor speed auto  
break main  
load  
monitor long 0xE01FC040 = 0x00000002    # MEMMAP = 2  
continue

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Window->Preferences->C/C++->Editor->Content Assistant - это не оно?

Да, спасибо, эту вкладку я изучал, там галочки расставлены везде, где нужно.

Но, к сожадению, автоматическое открытие окна с вариантами (после небольшой задержки) предусмотрено только после ввода ".", "->" и "::". В остальных случаях - только по нажатию CTRL + Space.

В SlickEdit сделано удобнее - там вообще не надо ничего нажимать :biggrin:

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

В SlickEdit сделано удобнее - там вообще не надо ничего нажимать :biggrin:

Зато в качестве бонуса - автоподстановка поумнее будет, чем в слике... :)

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

У меня несколько вопросов по связке Eclipse Ganimede + WinAVR + simulavr + avr-gdb и т.п..

 

1. С помощью шаманских плясок с бубном заставил работать отладку с "симулятором" simulavr. Пляски заключаются в том, что если указать в настройках отладки Эклипса все, как (с моей точки зрения) требуется, то elf-файл запускается на исполнение виндой, а не грузится в GDB. естественно, попытка запустить оканчивается ошибкой (но это никак нигде не проявляется), отладка стартует, но "во flash" естественно 0xFFFF и все (это прекрасно видно в окне дизассемблера). Эклипс честно "шагает" по отладочной инфе, но реально simulavr только кричит о том, что 0xFFFF - это плохая инструкция. Тем не менее, если в консоли GDB ввести вручную команды остановки, затем выбора файла (причем с полным путем), затем загрузки этого файла, затем поставить вручную же точку остановки на main - то все начинает работать. причем с этого момента повторный и т.д. запуск сессии отладки уже происходит без ручных манипуляций (пока не выгружается Эклипс). В общем, что-то тут не то и не так. Вопрос: как правильно организовать все это дело?

 

2. Постоянно и Step Over и Step Into выполняет одно и то же - отладку с входом в функции. Почему и как вылечить?

 

3. Если все-таки приобрету что-то типа AVRDRAGON - смогу ли я без вышеописанных проблем отлаживать программы?

 

4. Существуют ли соответствующие средства для Eclipse, чтобы осуществлять отладку для микроконтроллеров SiLabs C8051Fxxx? Фирменный аппаратный отладчик-программатор имеется, но Силабовская среда разработки - это убожище, каких свет не видывал. Вроде, есть GCC для 51-ых, но как там с поддержкой силабовских аппаратных средств отладки и программирования?

 

5. Avrdude - отличная вещь :) Однако, постоянно не хочет запускаться из Eclipse, если активно окошко с сообщениями об ошибках-варнингах - ругается, что не указан проект. Щелкнуть в окне проекта недолго, но хотелось бы вылечить раз и навсегда... Это возможно?

 

P.S. OFF: я решил полностью переключиться на легально бесплатные средства разработки, отсюда много странных вопросов...

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Вообще, откровенно говоря после долгого использования VS - "Эклипс" вызывает чувство аллергии и желание смыть это дело в унитаз. Вопрос по существу, как в Эклипсе подключить поиск по внешним директориям, а не только по папке проекта? Так бездарно написан хелп, что и не понятно как это сделать.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Вообще, откровенно говоря после долгого использования VS - "Эклипс" вызывает чувство аллергии и желание смыть это дело в унитаз.

А VS это чё?

если это VC то у меня такоеже желание смыть его в унитаз.

 

кстате. С недавних пор для отладки есклипсу не нужен плагин от Zylin. В крайней версии разработчики добавили такойже но свой. пользую , вроде работает также (не хуже и не лучше). У когонить есть мысли по этому поводу?

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

:) VS - это ms Visual Studio, а версия 2008 просто изумительна по лёгкости и удобству. Может подскажите, как настроить поиск?

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

:) VS - это ms Visual Studio, а версия 2008 просто изумительна по лёгкости и удобству. Может подскажите, как настроить поиск?

я не пробывал..

предпочитаю писать маленький исходный код чоб не искать :) шутка

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

А никто не прикручивал Eclipse к Keil uVision3?

Что-то после SlickEdit и Eclipse при работе с AVR, uVision IDE для ARM смотрится как-то примитивно...

:05:

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Это Кейл - примитивно?

Всё гениальное - просто и стильно, Вы видимо ещё не привыкли.

Изменено пользователем sevstels

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Поделитесь пожалуйста конфигом openocd для LPC2378+OpenOCD+OOCDLink, у кого есть.

 

Использовал эту связку когда-то давно, года три-четыре назад, и с другим процессором. Работало.

Вчера обновил OpenOCD с SVN. Поменялись форматы конфига радикально.

В примере нашел конфиг для LPC2148+OpenOCD+JTAG Key. Вроде этот ближе чем LPC2294.

Подправил ftdi_* параметры под OOCDLink.

Подправил reset_config.

Если в конфиге не задавать target create ....., то определяется процессор. но ругается на отсутствие target.

Если задать target create ....., то процессор не находит.

В обоих случаях завершается сообщением "Can not halt core"

 

Еще немного подправил конфиг, но успех не пршел :(

 

Конфиг

#daemon configuration
telnet_port 4444
gdb_port 3333

# tell gdb our flash memory map
# and enable flash programming
gdb_memory_map enable
gdb_flash_program enable

#interface
interface ft2232
ft2232_device_desc "Dual RS232"
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0x6010
#jtag_speed 3
jtag_khz 1000

#use combined on interfaces or targets that can't set TRST/SRST separately
# reset_config trst_and_srst srst_pulls_trst
reset_config trst_and_srst separate

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
# jtag_device 4 0x1 0xf 0xe
jtag newtap MyChip MyTap -irlen 4 -ircapture 0x1 -irmask 0xF

#target configuration
# target create MyTap arm7tdmi -endian little -chain-position 0
# [new_target_name] configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0

#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
# flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 14765 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

init
reset halt

Лог (короткий)

$ openocd
Open On-Chip Debugger 1.0 (2009-01-29-21:12) svn:1363
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
1000 kHz
Info : JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Warn : no gdb ports allocated as no target has been specified
Warn : no tcl port specified, using default port 6666
invalid command name "reset_halt"

Лог подлиннее

$ openocd -d
Open On-Chip Debugger 1.0 (2009-01-29-21:12) svn:1363
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openoc...k/src/openocd.c $
User : 5 1 command.c:494 command_run_line(): 
Debug: 6 1 configuration.c:88 find_file(): found openocd.cfg
Debug: 8 1 command.c:91 script_command(): script_command - telnet_port
Debug: 9 1 command.c:108 script_command(): script_command - telnet_port, argv[0]=ocd_telnet_port
Debug: 10 1 command.c:108 script_command(): script_command - telnet_port, argv[1]=4444
Debug: 12 1 command.c:91 script_command(): script_command - gdb_port
Debug: 13 1 command.c:108 script_command(): script_command - gdb_port, argv[0]=ocd_gdb_port
Debug: 14 1 command.c:108 script_command(): script_command - gdb_port, argv[1]=3333
Debug: 16 1 command.c:91 script_command(): script_command - gdb_memory_map
Debug: 17 1 command.c:108 script_command(): script_command - gdb_memory_map, argv[0]=ocd_gdb_memory_map
Debug: 18 1 command.c:108 script_command(): script_command - gdb_memory_map, argv[1]=enable
Debug: 20 1 command.c:91 script_command(): script_command - gdb_flash_program
Debug: 21 1 command.c:108 script_command(): script_command - gdb_flash_program, argv[0]=ocd_gdb_flash_program
Debug: 22 1 command.c:108 script_command(): script_command - gdb_flash_program, argv[1]=enable
Debug: 24 1 command.c:91 script_command(): script_command - interface
Debug: 25 2 command.c:108 script_command(): script_command - interface, argv[0]=ocd_interface
Debug: 26 2 command.c:108 script_command(): script_command - interface, argv[1]=ft2232
Debug: 28 2 command.c:91 script_command(): script_command - ft2232_device_desc
Debug: 29 2 command.c:108 script_command(): script_command - ft2232_device_desc, argv[0]=ocd_ft2232_device_desc
Debug: 30 2 command.c:108 script_command(): script_command - ft2232_device_desc, argv[1]=Dual RS232
Debug: 32 2 command.c:91 script_command(): script_command - ft2232_layout
Debug: 33 2 command.c:108 script_command(): script_command - ft2232_layout, argv[0]=ocd_ft2232_layout
Debug: 34 2 command.c:108 script_command(): script_command - ft2232_layout, argv[1]=oocdlink
Debug: 36 2 command.c:91 script_command(): script_command - ft2232_vid_pid
Debug: 37 2 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[0]=ocd_ft2232_vid_pid
Debug: 38 2 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[1]=0x0403
Debug: 39 2 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[2]=0x6010
Debug: 41 2 command.c:91 script_command(): script_command - jtag_khz
Debug: 42 2 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz
Debug: 43 2 command.c:108 script_command(): script_command - jtag_khz, argv[1]=1000
Debug: 44 2 jtag.c:2662 handle_jtag_khz_command(): handle jtag khz
User : 45 2 command.c:383 command_print(): 1000 kHz
Debug: 47 2 command.c:91 script_command(): script_command - reset_config
Debug: 48 2 command.c:108 script_command(): script_command - reset_config, argv[0]=ocd_reset_config
Debug: 49 2 command.c:108 script_command(): script_command - reset_config, argv[1]=trst_and_srst
Debug: 50 2 command.c:108 script_command(): script_command - reset_config, argv[2]=separate
Debug: 51 2 jtag.c:1909 jim_newtap_cmd(): Creating New Tap, Chip: MyChip, Tap: MyTap, Dotted: MyChip.MyTap, 6 params
Debug: 52 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -irlen
Debug: 53 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -ircapture
Debug: 54 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -irmask
Debug: 55 2 jtag.c:2041 jim_newtap_cmd(): Created Tap: MyChip.MyTap @ abs position 0, irlen 4, capture: 0x1 mask: 0xf
Debug: 57 2 command.c:91 script_command(): script_command - init
Debug: 58 3 command.c:108 script_command(): script_command - init, argv[0]=ocd_init
Debug: 59 3 openocd.c:137 handle_init_command(): target init complete
Debug: 60 3 ft2232.c:1575 ft2232_init_libftdi(): 'ft2232' interface using libftdi with 'oocdlink' layout (0403:6010)
Debug: 61 176 ft2232.c:1617 ft2232_init_libftdi(): current latency timer: 2
Debug: 62 178 ft2232.c:1872 jtagkey_init(): 80 08 1b
Debug: 63 180 ft2232.c:1930 jtagkey_init(): 82 06 0f
Debug: 64 182 ft2232.c:276 ft2232_speed(): 86 05 00
Debug: 65 190 openocd.c:144 handle_init_command(): jtag interface init complete
Debug: 66 190 jtag.c:2257 jtag_init_inner(): Init JTAG chain
Debug: 67 190 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 68 190 jtag.c:1504 jtag_reset_callback(): -
Debug: 69 192 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 70 192 jtag.c:1504 jtag_reset_callback(): -
Info : 71 200 jtag.c:1624 jtag_examine_chain(): JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Debug: 72 200 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 73 200 jtag.c:1504 jtag_reset_callback(): -
Debug: 74 206 openocd.c:150 handle_init_command(): jtag init complete
Debug: 75 206 openocd.c:153 handle_init_command(): jtag examine complete
Debug: 76 206 openocd.c:159 handle_init_command(): flash init complete
Debug: 77 206 openocd.c:163 handle_init_command(): mflash init complete
Debug: 78 206 openocd.c:167 handle_init_command(): NAND init complete
Debug: 79 206 openocd.c:171 handle_init_command(): pld init complete
Warn : 80 206 gdb_server.c:2195 gdb_init(): no gdb ports allocated as no target has been specified
Warn : 81 206 tcl_server.c:178 tcl_init(): no tcl port specified, using default port 6666
User : 82 206 command.c:626 openocd_jim_vfprintf(): invalid command name "reset_halt"
User : 85 206 command.c:626 openocd_jim_vfprintf(): 
User : 87 206 command.c:626 openocd_jim_vfprintf(): 
User : 89 206 command.c:626 openocd_jim_vfprintf(): 
User : 91 206 command.c:626 openocd_jim_vfprintf(): 
User : 93 206 command.c:626 openocd_jim_vfprintf(): 

Если в конфиге раскоментировать строки

#target configuration
target create MyTap arm7tdmi -endian little -chain-position 0
[new_target_name] configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0

То лог такой (короткий)

$ openocd
Open On-Chip Debugger 1.0 (2009-01-29-21:12) svn:1363
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
1000 kHz
Info : JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Warn : no tcl port specified, using default port 6666
Info : JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Error: timed out while waiting for target halted
Runtime error, file "embedded:startup.tcl", line 211:
    expected return code but got 'TARGET: MyTap - Not halted'
Runtime error, file "openocd.cfg", line 38:

Длинный

$ openocd -d
Open On-Chip Debugger 1.0 (2009-01-29-21:12) svn:1363
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openoc...k/src/openocd.c $
User : 5 0 command.c:494 command_run_line(): 
Debug: 6 0 configuration.c:88 find_file(): found openocd.cfg
Debug: 8 0 command.c:91 script_command(): script_command - telnet_port
Debug: 9 0 command.c:108 script_command(): script_command - telnet_port, argv[0]=ocd_telnet_port
Debug: 10 0 command.c:108 script_command(): script_command - telnet_port, argv[1]=4444
Debug: 12 0 command.c:91 script_command(): script_command - gdb_port
Debug: 13 0 command.c:108 script_command(): script_command - gdb_port, argv[0]=ocd_gdb_port
Debug: 14 0 command.c:108 script_command(): script_command - gdb_port, argv[1]=3333
Debug: 16 1 command.c:91 script_command(): script_command - gdb_memory_map
Debug: 17 1 command.c:108 script_command(): script_command - gdb_memory_map, argv[0]=ocd_gdb_memory_map
Debug: 18 1 command.c:108 script_command(): script_command - gdb_memory_map, argv[1]=enable
Debug: 20 1 command.c:91 script_command(): script_command - gdb_flash_program
Debug: 21 1 command.c:108 script_command(): script_command - gdb_flash_program, argv[0]=ocd_gdb_flash_program
Debug: 22 1 command.c:108 script_command(): script_command - gdb_flash_program, argv[1]=enable
Debug: 24 1 command.c:91 script_command(): script_command - interface
Debug: 25 1 command.c:108 script_command(): script_command - interface, argv[0]=ocd_interface
Debug: 26 1 command.c:108 script_command(): script_command - interface, argv[1]=ft2232
Debug: 28 1 command.c:91 script_command(): script_command - ft2232_device_desc
Debug: 29 1 command.c:108 script_command(): script_command - ft2232_device_desc, argv[0]=ocd_ft2232_device_desc
Debug: 30 1 command.c:108 script_command(): script_command - ft2232_device_desc, argv[1]=Dual RS232
Debug: 32 1 command.c:91 script_command(): script_command - ft2232_layout
Debug: 33 1 command.c:108 script_command(): script_command - ft2232_layout, argv[0]=ocd_ft2232_layout
Debug: 34 1 command.c:108 script_command(): script_command - ft2232_layout, argv[1]=oocdlink
Debug: 36 1 command.c:91 script_command(): script_command - ft2232_vid_pid
Debug: 37 1 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[0]=ocd_ft2232_vid_pid
Debug: 38 1 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[1]=0x0403
Debug: 39 1 command.c:108 script_command(): script_command - ft2232_vid_pid, argv[2]=0x6010
Debug: 41 1 command.c:91 script_command(): script_command - jtag_khz
Debug: 42 1 command.c:108 script_command(): script_command - jtag_khz, argv[0]=ocd_jtag_khz
Debug: 43 1 command.c:108 script_command(): script_command - jtag_khz, argv[1]=1000
Debug: 44 1 jtag.c:2662 handle_jtag_khz_command(): handle jtag khz
User : 45 1 command.c:383 command_print(): 1000 kHz
Debug: 47 1 command.c:91 script_command(): script_command - reset_config
Debug: 48 1 command.c:108 script_command(): script_command - reset_config, argv[0]=ocd_reset_config
Debug: 49 2 command.c:108 script_command(): script_command - reset_config, argv[1]=trst_and_srst
Debug: 50 2 command.c:108 script_command(): script_command - reset_config, argv[2]=separate
Debug: 51 2 jtag.c:1909 jim_newtap_cmd(): Creating New Tap, Chip: MyChip, Tap: MyTap, Dotted: MyChip.MyTap, 6 params
Debug: 52 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -irlen
Debug: 53 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -ircapture
Debug: 54 2 jtag.c:1928 jim_newtap_cmd(): Processing option: -irmask
Debug: 55 2 jtag.c:2041 jim_newtap_cmd(): Created Tap: MyChip.MyTap @ abs position 0, irlen 4, capture: 0x1 mask: 0xf
Debug: 56 2 target.c:3920 jim_target(): Target command params:
Debug: 57 2 target.c:3921 jim_target(): target create MyTap arm7tdmi -endian little -chain-position 0 
Debug: 58 2 target.c:3920 jim_target(): Target command params:
Debug: 59 2 target.c:3921 jim_target(): target count 
Debug: 60 2 target.c:3920 jim_target(): Target command params:
Debug: 61 2 target.c:3921 jim_target(): target number 0 
Debug: 63 2 command.c:91 script_command(): script_command - init
Debug: 64 2 command.c:108 script_command(): script_command - init, argv[0]=ocd_init
Debug: 65 3 openocd.c:137 handle_init_command(): target init complete
Debug: 66 3 ft2232.c:1575 ft2232_init_libftdi(): 'ft2232' interface using libftdi with 'oocdlink' layout (0403:6010)
Debug: 67 177 ft2232.c:1617 ft2232_init_libftdi(): current latency timer: 2
Debug: 68 179 ft2232.c:1872 jtagkey_init(): 80 08 1b
Debug: 69 181 ft2232.c:1930 jtagkey_init(): 82 06 0f
Debug: 70 183 ft2232.c:276 ft2232_speed(): 86 05 00
Debug: 71 191 openocd.c:144 handle_init_command(): jtag interface init complete
Debug: 72 191 jtag.c:2257 jtag_init_inner(): Init JTAG chain
Debug: 73 191 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 74 191 jtag.c:1504 jtag_reset_callback(): -
Debug: 75 193 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 76 193 jtag.c:1504 jtag_reset_callback(): -
Info : 77 201 jtag.c:1624 jtag_examine_chain(): JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Debug: 78 201 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 79 201 jtag.c:1504 jtag_reset_callback(): -
Debug: 80 207 openocd.c:150 handle_init_command(): jtag init complete
Error: 81 215 embeddedice.c:197 embeddedice_build_reg_cache(): unknown EmbeddedICE version (comms ctrl: 0x00000000)
Debug: 82 215 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000000
Debug: 83 215 embeddedice.c:401 embeddedice_write_reg(): 20: 0x00000000
Debug: 84 217 openocd.c:153 handle_init_command(): jtag examine complete
Debug: 85 217 openocd.c:159 handle_init_command(): flash init complete
Debug: 86 217 openocd.c:163 handle_init_command(): mflash init complete
Debug: 87 217 openocd.c:167 handle_init_command(): NAND init complete
Debug: 88 217 openocd.c:171 handle_init_command(): pld init complete
Debug: 89 217 gdb_server.c:2225 gdb_init(): gdb service for target arm7tdmi at port 3333
Warn : 90 217 tcl_server.c:178 tcl_init(): no tcl port specified, using default port 6666
Debug: 92 225 command.c:91 script_command(): script_command - reset
Debug: 93 225 command.c:108 script_command(): script_command - reset, argv[0]=ocd_reset
Debug: 94 225 command.c:108 script_command(): script_command - reset, argv[1]=halt
Debug: 95 225 target.c:3920 jim_target(): Target command params:
Debug: 96 225 target.c:3921 jim_target(): target names 
Debug: 97 225 target.c:3054 target_handle_event(): event: 11 reset-start - no action
Debug: 98 225 jtag.c:2290 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / RESET
Debug: 99 225 jtag.c:1196 jtag_add_reset(): SRST line released
Debug: 100 225 jtag.c:1215 jtag_add_reset(): TRST line asserted
Debug: 101 225 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 102 225 jtag.c:1504 jtag_reset_callback(): -
Debug: 103 225 jtag.c:1192 jtag_add_reset(): SRST line asserted
Debug: 104 225 jtag.c:1215 jtag_add_reset(): TRST line asserted
Debug: 105 225 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 106 225 jtag.c:1504 jtag_reset_callback(): -
Debug: 107 225 jtag.c:1192 jtag_add_reset(): SRST line asserted
Debug: 108 225 jtag.c:1196 jtag_add_reset(): SRST line released
Debug: 109 225 ft2232.c:1032 jtagkey_reset(): trst: 1, srst: 0, high_output: 0x04, high_direction: 0x0f
Debug: 110 225 ft2232.c:1032 jtagkey_reset(): trst: 1, srst: 1, high_output: 0x00, high_direction: 0x0f
Debug: 111 225 ft2232.c:1032 jtagkey_reset(): trst: 0, srst: 1, high_output: 0x02, high_direction: 0x0f
Debug: 112 225 ft2232.c:1032 jtagkey_reset(): trst: 0, srst: 0, high_output: 0x06, high_direction: 0x0f
Debug: 113 227 jtag.c:2257 jtag_init_inner(): Init JTAG chain
Debug: 114 229 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 115 229 jtag.c:1504 jtag_reset_callback(): -
Info : 116 237 jtag.c:1624 jtag_examine_chain(): JTAG tap: MyChip.MyTap tap/device found: 0x401f002b (Manufacturer: 0x015, Part: 0x01f0, Version: 0x4)
Debug: 117 237 jtag.c:434 jtag_call_event_callbacks(): jtag event: JTAG controller reset (RESET or TRST)
Debug: 118 237 jtag.c:1504 jtag_reset_callback(): -
Debug: 119 243 target.c:3920 jim_target(): Target command params:
Debug: 120 243 target.c:3921 jim_target(): target names 
Debug: 121 243 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000000
Debug: 122 243 embeddedice.c:401 embeddedice_write_reg(): 20: 0x00000000
Debug: 123 251 target.c:3920 jim_target(): Target command params:
Debug: 124 251 target.c:3921 jim_target(): target names 
Debug: 125 251 target.c:3054 target_handle_event(): event: 12 reset-assert-pre - no action
Debug: 126 251 arm7_9_common.c:810 arm7_9_assert_reset(): target->state: running
Debug: 127 251 embeddedice.c:401 embeddedice_write_reg(): 8: 0x00000000
Debug: 128 251 embeddedice.c:401 embeddedice_write_reg(): 9: 0x00000003
Debug: 129 251 embeddedice.c:401 embeddedice_write_reg(): 11: 0xffffffff
Debug: 130 251 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000100
Debug: 131 251 embeddedice.c:401 embeddedice_write_reg(): 13: 0x000000f7
Debug: 132 251 jtag.c:1192 jtag_add_reset(): SRST line asserted
Debug: 133 251 target.c:3054 target_handle_event(): event: 13 reset-assert-post - no action
Debug: 134 251 target.c:3920 jim_target(): Target command params:
Debug: 135 251 target.c:3921 jim_target(): target names 
Debug: 136 251 target.c:3054 target_handle_event(): event: 14 reset-deassert-pre - no action
Debug: 137 251 arm7_9_common.c:870 arm7_9_deassert_reset(): target->state: reset
Debug: 138 251 jtag.c:1196 jtag_add_reset(): SRST line released
Debug: 139 251 target.c:3054 target_handle_event(): event: 15 reset-deassert-post - no action
Debug: 140 251 target.c:3920 jim_target(): Target command params:
Debug: 141 251 target.c:3921 jim_target(): target names 
Debug: 142 251 ft2232.c:1032 jtagkey_reset(): trst: 0, srst: 1, high_output: 0x02, high_direction: 0x0f
Debug: 143 303 ft2232.c:1032 jtagkey_reset(): trst: 0, srst: 0, high_output: 0x06, high_direction: 0x0f
Debug: 144 310 target.c:1724 target_wait_state(): waiting for target halted...
Error: 147 1254 target.c:1731 target_wait_state(): timed out while waiting for target halted
User : 148 1254 command.c:626 openocd_jim_vfprintf(): Runtime error, file "embedded:startup.tcl", line 211:
   User : 149 1254 command.c:626 openocd_jim_vfprintf(): expected return code but got 'TARGET: MyTap - Not halted'
User : 151 1254 command.c:626 openocd_jim_vfprintf(): 
User : 153 1254 command.c:626 openocd_jim_vfprintf(): 
User : 155 1254 command.c:626 openocd_jim_vfprintf(): 
User : 157 1254 command.c:626 openocd_jim_vfprintf(): 
Debug: 158 1254 command.c:427 run_command(): Command failed with error code -4
User : 159 1254 command.c:626 openocd_jim_vfprintf(): Runtime error, file "openocd.cfg", line 38:
   User : 160 1254 command.c:626 openocd_jim_vfprintf(): 
User : 163 1254 command.c:626 openocd_jim_vfprintf(): 
User : 165 1254 command.c:626 openocd_jim_vfprintf(): 

Может кто подскажет что не так? В инете по LPC23xx примеров пока не нашел.

Изменено пользователем amw

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

"Поколдовав" некоторое время с настройками и покурив доки, и персобрав тулчейн пару раз - в соответствии с доками openocd - получил следующее:

openocd.cfg

telnet_port 4444
gdb_port 3333
gdb_memory_map enable
gdb_flash_program enable
interface ft2232
ft2232_device_desc "Dual RS232"
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0x6010
jtag_khz 10
jtag_nsrst_delay 200
jtag_ntrst_delay 200
reset_config trst_and_srst srst_pulls_trst
jtag newtap MyChip MyTap -irlen 4 -ircapture 0x1 -irmask 0xF
target create MyTap arm7tdmi -endian little -chain-position 0
[new_target_name] configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
flash  bank lpc2000 0x0    0x7d000 0 0 0         lpc2000_v2 14765 calc_checksum

.gdbinit

target remote localhost:3333
monitor reset
monitor sleep 2000
monitor poll
monitor soft_reset_halt
break main
continue

Лог openocd

$ openocd
Open On-Chip Debugger 1.0 (2009-01-30-21:03) svn:1363


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
10 kHz
Info : JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warn : EmbeddedICE version 7 detected, EmbeddedICE handling might be broken
Warn : no tcl port specified, using default port 6666
Info : accepting 'gdb' connection from 0
target state: halted
target halted in Thumb state due to debug-request, current mode: Abort
cpsr: 0x800000b7 pc: 0x7fffe152
Warn : acknowledgment received, but no packet pending
Info : JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
target state: running
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x800000d3 pc: 0x00000000
Info : dropped 'gdb' connection - error -400
Info : accepting 'gdb' connection from 0
Warn : acknowledgment received, but no packet pending
Info : JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
target state: running
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00000000
Info : no watchpoint unit available for hardware breakpoint
Info : can't add hardware breakpoint, resource not available
Error: unexpected error -308
Info : no watchpoint unit available for hardware breakpoint
Info : can't add hardware breakpoint, resource not available
Error: unexpected error -308
Warn : memory read caused data abort (address: 0xffffffff, size: 0x1, count: 0x1)

Лог gdb

source .gdbinit
main () at src/main.c:89
89        FIO0DIR = 0xFFFFFFFF;
JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)


target state: running

requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00000000

Breakpoint 2 at 0x300: file src/main.c, line 89.

Breakpoint 1, main () at src/main.c:89
89        FIO0DIR = 0xFFFFFFFF;
Cannot find bounds of current function

DATA ABORT Возникает при остановке на второй и последующих точках прерывания (после той, что в начале main()). Предидущие точки прерывания удаляю перед установкой новой.

Пошаговая отладка вроде идет, если шагать с самого начала запуска, но это тоскливо. Нужны точки прерывания в нужных мне местах.

Отладка из флеш. Прошиваю процессор отдельно.

На команду gdb load ругается так:

openocd

Info : JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
target state: running
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00000000
Warn : memory write caused data abort (address: 0x40000000, size: 0x4, count: 0x2)
Warn : lpc2000 prepare sectors returned -307
Error: failed erasing sectors 0 to 8 (-902)
Error: flash_erase returned -902

gdb

source .gdbinit
EXCEPTION_VECTORS () at src/crt0.S:60
60        ldr    pc, RESET_ADDR
Current language:  auto; currently asm
JTAG tap: MyChip.MyTap tap/device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)


target state: running

requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x00000000

/home/amw/workspace/DSP/.gdbinit:10: Error in sourced command file:
Error erasing flash with vFlashErase packet

Кроме того, у меня в программе в есть перехваты всех Exception с выводом дампа на UART.

При запуске высыпает кучу PREFETCH ABORT, а при остановке на точках прерывания высыпает еще и кучу DATA ABORT в придачу.

 

С чем может быть связано и как это победить?

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

При запуске высыпает кучу PREFETCH ABORT, а при остановке на точках прерывания высыпает еще и кучу DATA ABORT в придачу.

 

С чем может быть связано и как это победить?

 

Скорее всего компановка неправильная, или выравнивания нету или просто черт знает куда линкуется или еще что-нибудь.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Скорее всего компановка неправильная, или выравнивания нету или просто черт знает куда линкуется или еще что-нибудь.

Ну уж не знаю, что там с компоновкой ему не нравится, но если просто прошить - не по JTAG, а через UART - то все работает правильно.

Аборты возникают в процессе прошивки и отладки. Если без JTAG, то проект работает как надо.

Изменено пользователем amw

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Ну уж не знаю, что там с компоновкой ему не нравится, но если просто прошить - не по JTAG, а через UART - то все работает правильно.

Аборты возникают в процессе прошивки и отладки. Если без JTAG, то проект работает как надо.

 

Значит файл корректный. А вы не пробовали просто поотлаживать без предварительной прошивки?

Я начал пока с этого.

 

Ааа. Пардон. Не увидел

Отладка из флеш. Прошиваю процессор отдельно.
.

В любом случае у меня такого не возникало.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...