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

 
 
51 страниц V  « < 15 16 17 18 19 > »   
Reply to this topicStart new topic
> Вопросы по Eclipse, CDT, Zylin embedded CDT, предлагаю обсуждать тут, может потом FAQ выжмем
AHTOXA
сообщение May 11 2010, 07:45
Сообщение #241


фанат дивана
******

Группа: Свой
Сообщений: 3 387
Регистрация: 9-08-07
Из: Уфа
Пользователь №: 29 684



Цитата(juvf @ May 11 2010, 12:39) *
Код
-O[n|l|m|h|hs|hz]
                Select level of optimization

У-у, видимо совсем всё поменялось в IAR:)

Цитата
что означает строка в makefile "$(CC) $(CFLAGS) -o $@ $<"? Конкретно что значит "-o $@ $<"


Вместо $(ИМЯ_ПЕРЕМЕННОЙ) подставляется значение этой переменной. У нас
CC = $(IARBIN)/icc430.exe,
CFLAGS = флаги компилятора.

$@ и $< - специальные переменные, цель и зависимость. В данном случае - имя объектного файла и исходника. (например, $@ = main.r43, $< = main.c)

Ещё раз повторю, попробуйте запустить make с ключом -n, и часть вопросов сразу снимется. Вот например, что получилось у меня с исходным мейк-файлом:
Код
D:\tmp\iarmake>make -n
echo --- compiling main.c
D:/Tools/micros/MSP430/IAR_EW23/430/bin/icc430.exe -c -S -O./obj/ -e -K
-gA -s9 -RCODE -r0 -L./lst/ -ID:/Tools/micros/MSP430/IAR_EW23/430/inc/  
-I "./src"  -I "./src/base"  -I "./src/terminal" -q -A./lst/ -t8 -DFLOAT_SUPPORT
-o obj/main.o ./src/main.c
echo --- linking...
D:/Tools/micros/MSP430/IAR_EW23/430/bin/xlink.exe  ./obj/main.o
-Ointel-standard -o ./exe/msp-eclipse-iar-test.d43 -l ./lst/msp-eclipse-iar-test.map
-xms -ID:/Tools/micros/MSP430/IAR_EW23/430/lib/  
-f D:/Tools/micros/MSP430/IAR_EW23/430/cw430/msp430F149.ddf
echo "Errors: none"


--------------------
Если бы я знал, что такое электричество...
Go to the top of the page
 
+Quote Post
MegaFPGA
сообщение May 14 2010, 04:20
Сообщение #242


Частый гость
**

Группа: Участник
Сообщений: 75
Регистрация: 12-11-09
Из: Уфа
Пользователь №: 53 567



Пытаюсь запустить отладчик.


В чем может быть проблема ?
Причина редактирования: Удалены неменянной ширины codebox-сы
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение May 14 2010, 05:31
Сообщение #243


Гуру
******

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



Цитата(MegaFPGA @ May 14 2010, 07:20) *
В чем может быть проблема ?
Вы не указали кристалл в конфиге OpenOCD. Что-то типа такого:
Код
set CHIPNAME at91sam7s256
source [find target/at91sam7sx.cfg]


--------------------
На любой вопрос даю любой ответ
"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
MegaFPGA
сообщение May 14 2010, 06:16
Сообщение #244


Частый гость
**

Группа: Участник
Сообщений: 75
Регистрация: 12-11-09
Из: Уфа
Пользователь №: 53 567



Спасибо. Помогло.
Теперь картина следующая:
Открываю дебагер перпектив
Запускаю OpenOCD
Консоль:
CODE
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Warn : use 'at91sam7s.cpu' as target identifier, not '0'
parport port = 0x378
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Info : clock speed 500 kHz
Info : JTAG tap: at91sam7s.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : at91sam7s.cpu: hardware has 2 breakpoint/watchpoint units


Запускаю Zylin
Консоль:
CODE
target remote localhost:3333
0x00000000 in ?? ()
monitor flash device = AT91SAM7S256
flash device = AT91SAM7S256: command requires more arguments
in procedure 'flash' called at file "command.c", line 650
called at file "command.c", line 361
monitor flash download = 1
flash download = 1: command requires more arguments
in procedure 'flash' called at file "command.c", line 650
called at file "command.c", line 361
monitor flash breakpoints = 1
flash breakpoints = 1: command requires more arguments
in procedure 'flash' called at file "command.c", line 650
called at file "command.c", line 361
monitor endian little
Runtime error, file "command.c", line 650:
invalid command name "endian"
monitor speed 30
Runtime error, file "command.c", line 650:
invalid command name "speed"
monitor reset 8
at91sam7s.cpu arp_examine
at91sam7s.cpu arp_halt
at91sam7s.cpu arp_halt_gdb
at91sam7s.cpu arp_poll
at91sam7s.cpu arp_reset
at91sam7s.cpu arp_waitstate
jtag arp_init-reset
jtag_reset trst_active srst_active
power_restore
reset [run|halt|init]
reset_config [none|trst_only|srst_only|trst_and_srst]
[srst_pulls_trst|trst_pulls_srst|combined|separate]
[srst_gates_jtag|srst_nogate] [trst_push_pull|trst_open_drain]
[srst_push_pull|srst_open_drain]
reset_nag ['enable'|'disable']
soft_reset_halt
srst_deasserted
Command handler execution failed
in procedure 'reset' called at file "command.c", line 650
called at file "command.c", line 361
monitor sleep 10
monitor writeu32 0xFFFFFD44 = 0x00008000
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
monitor writeu32 0xFFFFFC20 = 0x00000601
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
monitor sleep 10
monitor writeu32 0xFFFFFC2C = 0x00480a0e
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
monitor sleep 10
monitor writeu32 0xFFFFFC30 = 0x00000007
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
monitor sleep 10
monitor writeu32 0xFFFFFF60 = 0x00480100
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
monitor sleep 100
monitor speed 12000
Runtime error, file "command.c", line 650:
invalid command name "speed"
load
Loading section .text, size 0x8cf0 lma 0x100000
Load failed
break main
Breakpoint 12 at 0x1002d0
continue
Warning:
Cannot insert breakpoint 12.
Error accessing memory address 0x1002d0: (undocumented errno -1).



Disassembly:

CODE
0x00000000 andeq r0, r0, r0
0x00000004 andeq r0, r0, r0
0x00000008 andeq r0, r0, r0
0x0000000c andeq r0, r0, r0
0x00000010 andeq r0, r0, r0
0x00000014 andeq r0, r0, r0
0x00000018 andeq r0, r0, r0
0x0000001c andeq r0, r0, r0
0x00000020 andeq r0, r0, r0
0x00000024 andeq r0, r0, r0
0x00000028 andeq r0, r0, r0
0x0000002c andeq r0, r0, r0
0x00000030 andeq r0, r0, r0
0x00000034 andeq r0, r0, r0
0x00000038 andeq r0, r0, r0
0x0000003c andeq r0, r0, r0
0x00000040 andeq r0, r0, r0
0x00000044 andeq r0, r0, r0
0x00000048 andeq r0, r0, r0
0x0000004c andeq r0, r0, r0
0x00000050 andeq r0, r0, r0
0x00000054 andeq r0, r0, r0
0x00000058 andeq r0, r0, r0
0x0000005c andeq r0, r0, r0
0x00000060 andeq r0, r0, r0

Дальше идет полный мудежь
CODE
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Warn : use 'at91sam7s.cpu' as target identifier, not '0'
parport port = 0x378
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Info : clock speed 500 kHz
Info : JTAG tap: at91sam7s.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : at91sam7s.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'gdb' connection from 0
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
Error: Target not halted
Error: auto_probe failed -304

Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
flash device = AT91SAM7S256: command requires more arguments
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
flash download = 1: command requires more arguments
flash breakpoints = 1: command requires more arguments
Runtime error, file "command.c", line 650:
invalid command name "endian"
Runtime error, file "command.c", line 650:
invalid command name "speed"
Command handler execution failed
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "speed"
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target at91sam7s.cpu is not halted
Error: can't add breakpoint: target running
Info : dropped 'gdb' connection - error -400
Info : accepting 'gdb' connection from 0
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
Error: Target not halted
Error: auto_probe failed -304

Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
flash device = AT91SAM7S256: command requires more arguments
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
flash download = 1: command requires more arguments
flash breakpoints = 1: command requires more arguments
Runtime error, file "command.c", line 650:
invalid command name "endian"
Runtime error, file "command.c", line 650:
invalid command name "speed"
Command handler execution failed
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "writeu32"
Runtime error, file "command.c", line 650:
invalid command name "speed"
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target at91sam7s.cpu is not halted
Error: can't add breakpoint: target running
Error: invalid mode value encountered 1
Error: cpsr contains invalid mode value - communication failure
Error: invalid mode value encountered 1
Error: cpsr contains invalid mode value - communication failure
target state: halted
target halted in Thumb state due to watchpoint, current mode: Supervisor
cpsr: 0x20000073 pc: 0x00002661
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Jazelle debug entry -- BROKEN!
Error: Jazelle state handling is BROKEN!
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 00002f48 - check that memory is read/writable
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Error: Unable to set 32 bit software breakpoint at address 001002d0 - check that memory is read/writable
Error: unhandled core state
Warn : breakpoint not set
Go to the top of the page
 
+Quote Post
MegaFPGA
сообщение May 14 2010, 07:55
Сообщение #245


Частый гость
**

Группа: Участник
Сообщений: 75
Регистрация: 12-11-09
Из: Уфа
Пользователь №: 53 567



Оказывается make не работает
выдает вот что:
CODE

**** Build of configuration Default for project UMGPS ****

make umgps
arm-none-eabi-gcc umgps.o -o umgps
umgps.o: In function `ISR_Driver':
um_main.c:(.text+0x24): undefined reference to `sDefaultDriver'
umgps.o: In function `ISR_VBus':
um_main.c:(.text+0x58): undefined reference to `sDefaultDriver'
umgps.o: In function `CBK_NewRequest':
um_main.c:(.text+0x68): undefined reference to `BOT_RequestHandler'
umgps.o: In function `CBK_Resume':
um_main.c:(.text+0x7c): undefined reference to `DEV_Resume'
umgps.o: In function `CBK_Suspend':
um_main.c:(.text+0x8c): undefined reference to `DEV_Suspend'
umgps.o: In function `CBK_Reset':
um_main.c:(.text+0xa0): undefined reference to `BOT_Reset'
umgps.o: In function `CBK_Init':
um_main.c:(.text+0xf8): undefined reference to `BRD_ConfigureVBus'
umgps.o: In function `System_Controller_Interrupt_Handler':
um_main.c:(.text+0x164): undefined reference to `Periodic_Interval_Timer_ISR'
um_main.c:(.text+0x16c): undefined reference to `CC_Check_Time_Elapsed'
umgps.o: In function `ISR_CC100_Usart0':
um_main.c:(.text+0x194): undefined reference to `CC_USART0_Interrupt_Handler'
umgps.o: In function `main':
um_main.c:(.text+0x1f4): undefined reference to `BOT_Init'
um_main.c:(.text+0x1fc): undefined reference to `MODB_InitRegs'
um_main.c:(.text+0x208): undefined reference to `Init_PIT_Timer'
um_main.c:(.text+0x214): undefined reference to `CC_Init'
um_main.c:(.text+0x28c): undefined reference to `BOT_StateMachine'
um_main.c:(.text+0x29c): undefined reference to `Um_CC_MB_bot'
um_main.c:(.text+0x33c): undefined reference to `sDefaultDriver'
umgps.o:(.rodata+0x0): undefined reference to `sDefaultDriver'
c:/program files/yagarto/bin/../lib/gcc/arm-none-eabi/4.5.0/../../../../
arm-none-eabi/lib\libc.a(lib_a-exit.o): In function `exit':
C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\stdlib
/../../../../../newlib-1.18.0/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit'
collect2: ld returned 1 exit status
make: *** [umgps] Error 1


Почему если нажимать build all все работает и нормально собирается а когда собираешь через build make target выдает ошибку ?

Что здесь понимается под словом target ?

Сообщение отредактировал zltigo - May 14 2010, 11:41
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение May 14 2010, 09:56
Сообщение #246


Гуру
******

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



Цитата(MegaFPGA @ May 14 2010, 09:16) *
Спасибо. Помогло.
Теперь картина следующая:
...
Запускаю Zylin
Как-то у вас очень сложно получилось. Я использую Zylin embedded CDT plugin и ничего отдельно запускать не нужно.
Вот мой openocd.cfg:
CODE
interface jlink
jtag_khz 32
set CHIPNAME at91sam7s64
source [find target/at91sam7sx.cfg]

#flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 4032

arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable

proc read_register {register} {
set result ""
ocd_mem2array result 32 $register 1
return $result(0)
}


# remap. 0 = flash, 1 = ram
proc remap { area } {
set ram_start 0x00200000
set tmp1 [read_register 0]
#alter ram[0] contents
mww $ram_start [ expr [read_register $ram_start] ^ 0xFFFFFFFF]
set tmp2 [read_register 0]
#restore ram[0]
mww $ram_start [ expr [read_register $ram_start] ^ 0xFFFFFFFF]

if [ expr $tmp1 == $tmp2 ] { # remaped contents not altered -> flash remaped
if [ expr $area == 1 ] { # remap required
mww 0xFFFFFF00 0x00000001
}
} else {
if [ expr $area == 0] { # remap required
mww 0xFFFFFF00 0x00000001
}
}
}


$_TARGETNAME configure -event reset-init {
soft_reset_halt
# RSTC_CR : Reset peripherals
jtag_khz 32
mww 0xfffffd00 0xa5000004
# wait until SRCMP set (reset in progress)
while { [expr [read_register 0xfffffd04] & 0x00020000] != 0 } { sleep 1 }

# OSC enable, no timeout
mww 0xFFFFFC20 0x00000001
# wait until MOSCS
while { [expr [read_register 0xfffffC68] & 0x00000001] == 0 } { sleep 1 }

# Assuming 4.032 MHz osc
# *36/3 set LOCK after 6 SCLK
mww 0xFFFFFC2C 0x00230602

# PRES = 2
mww 0xFFFFFC30 0x00000004
#wait untli MCKRDY
while { [expr [read_register 0xfffffC68] & 0x00000008] == 0 } { sleep 1 }

# MCK = PLLCK / 2
mww 0xFFFFFC30 0x00000007
#wait untli MCKRDY
while { [expr [read_register 0xfffffC68] & 0x00000008] == 0 } { sleep 1 }

jtag_khz 8000 #0

# MC_FMR: FWS=1
mww 0xffffff60 0x00000100

remap 0
echo "reset done"
}
OpenOCD я запускаю прямо из gdb через pipe. Можно запускать отдельно и соединяться через target remote localhost:3333, но мне отдельный запуск показался неудобным. Вот что у меня записано в .gdbinit:
Код
target remote | openocd --pipe
#target remote localhost:3333
monitor reset init
load
s



Цитата(MegaFPGA @ May 14 2010, 10:55) *
Оказывается make не работает

Что здесь понимается под словом target ?
make работает. Он делает свою работу. target в терминологии make - цель, такая как clean или all. Но как-то не приходилось пользоваться опцией Make Target. Жму на иконку с молотком и он строит текущий проект.


--------------------
На любой вопрос даю любой ответ
"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
MegaFPGA
сообщение May 14 2010, 10:25
Сообщение #247


Частый гость
**

Группа: Участник
Сообщений: 75
Регистрация: 12-11-09
Из: Уфа
Пользователь №: 53 567



С таким конфигом выдает вот что:
CODE
target remote | openocd --pipe
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Remote communication error: No error.
monitor reset init
"monitor" command not supported by this target.
load
You can't do that when your target is `exec'
s
The program is not being run.
Go to the top of the page
 
+Quote Post
zltigo
сообщение May 14 2010, 12:06
Сообщение #248


Гуру
******

Группа: Свой
Сообщений: 13 372
Регистрация: 27-11-04
Из: Riga, Latvia
Пользователь №: 1 244



Цитата(MegaFPGA @ May 14 2010, 07:20) *
Пытаюсь запустить отладчик.

Admin: Исходные тексты превышающие все разумные размеры по ширине и сбивающие внешний вид форума будут удаляться.


--------------------
Feci, quod potui, faciant meliora potentes
Go to the top of the page
 
+Quote Post
Сергей Борщ
сообщение May 14 2010, 12:55
Сообщение #249


Гуру
******

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



Цитата(MegaFPGA @ May 14 2010, 13:25) *
С таким конфигом выдает вот что:
Ну что можно сказать?
CODE
source .gdbinit
Open On-Chip Debugger 0.4.0 (2010-04-14-14:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
0x0e874090 in ?? ()
JTAG tap: at91sam7s64.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
srst pulls trst - can not reset into halted mode. Issuing halt after reset.
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x300000d3 pc: 0x000ee8e4
requesting target halt and executing a soft reset
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x300000d3 pc: 0x00000000
32 kHz
8000 kHz
reset done
А если запустить openOCD отдельно и подключившись к нему через telnet дать команду reset init?


--------------------
На любой вопрос даю любой ответ
"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
gte
сообщение May 14 2010, 23:43
Сообщение #250


Гуру
******

Группа: Свой
Сообщений: 2 318
Регистрация: 13-02-05
Из: Липецкая область
Пользователь №: 2 613



Цитата(Сергей Борщ @ May 14 2010, 13:56) *
OpenOCD я запускаю прямо из gdb через pipe. Можно запускать отдельно и соединяться через target remote localhost:3333, но мне отдельный запуск показался неудобным. Вот что у меня записано в .gdbinit:[code]target remote | openocd --pipe

А как запустить JLinkGDBServer кто знает?
Go to the top of the page
 
+Quote Post
gte
сообщение May 15 2010, 20:05
Сообщение #251


Гуру
******

Группа: Свой
Сообщений: 2 318
Регистрация: 13-02-05
Из: Липецкая область
Пользователь №: 2 613



Снес Yagarto c Eclipse Europe, поставил Yagarto c GALILEO, втянул проект настроил, откомпилировал, загрузил, все, вроде бы, нормально.
Программа работает, на ЖКИ все выводится.

Джитаг МТлинк5, драйвера 3,80с.

Настройки дебагера
Код
target remote localhost:2331

monitor reset
monitor speed auto
monitor endian little
monitor flash device = LPC2368
monitor long 0xffffff60 0x00320100
monitor long 0xfffffd44 0xa0008000
monitor long 0xfffffc20 0xa0000601
monitor sleep 100
monitor long 0xfffffc2c 0x00480a0e
monitor sleep 200
monitor long 0xfffffc30 0x7
monitor sleep 100
monitor long 0xfffffd08 0xa5000401
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
symbol-file main.elf
continue

настройки не менял.

Но при попытке запуска на отладку пишет
Код
target remote localhost:2331
Vectors () at Common/src/Startup.S:130
130                    LDR     PC, DAbt_Addr
monitor reset
Resetting target

monitor speed auto
Select auto JTAG speed (65535 kHz)

monitor endian little
Target endianess set to "little endian"

monitor flash device = LPC2368
Select flash device: LPC2368

monitor long 0xffffff60 0x00320100
Writing 0x00320100 @ address 0xFFFFFF60

monitor long 0xfffffd44 0xa0008000
Writing 0xA0008000 @ address 0xFFFFFD44

monitor long 0xfffffc20 0xa0000601
Writing 0xA0000601 @ address 0xFFFFFC20

monitor sleep 100
Sleep 100ms

monitor long 0xfffffc2c 0x00480a0e
Writing 0x00480A0E @ address 0xFFFFFC2C

monitor sleep 200
Sleep 200ms

monitor long 0xfffffc30 0x7
Writing 0x00000007 @ address 0xFFFFFC30

monitor sleep 100
Sleep 100ms

monitor long 0xfffffd08 0xa5000401
Writing 0xA5000401 @ address 0xFFFFFD08

set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
symbol-file main.elf
continue
Remote connection closed

и вылетает.

Причем, 2 и 3 строчки сообщения бывают разные, может быть какая нибудь подпрограмма

Может драйвера менять на новые? Никто не сталкивался?

И еще. После установки Yagarto пришлось поправить настройки и Makefile, так как
изменилось название программ GCC на arm-none-eabi-ххх.exe.
Это нормально?
обновил драйвер до 4.144b
В логе сервера пишет в конце команд и больше не соединяется до ресета процессора.
Код
WARNING: Unknown  packet received:  "qAttached"

---------пропущено

Sleep 100ms
Writing 0xA5000401 @ address 0xFFFFFD08
Read 4 bytes @ address 0x00000000 (Data = 0xE59F4018)
Starting target CPU...
...Target halted (PC = 0x011B007C)
Reading all registers
ERROR: Read memory error @ address 0x011B0000, word access: Core error.
Connection to debugger closed !

WARNING: Failed to read cacheable memory @ address 0x011B007C
Read 4 bytes @ address 0x011B007C (Data = 0xE59F4018)


В общем, разобрался. сразу после установки последнего Yagarto c GALILEO я повозился с .gdbinit
на предмет запуска JLinkGDBServer, не получилось. Оставил не рабочий .gdbinit, естественно, удалив его упоминание
в строке GDB command file: в закладке "Debugger"
Под рукой не было "железа" и я не проверял работу, а на следующий день об этом уже забыл.
Так дебагер использовал .gdbinit не смотря на пустую строку.
Cам себе создал работу :-), но похоже, я не один. В конференции Сеггера висит подобный вопрос без ответа.
Go to the top of the page
 
+Quote Post
juvf
сообщение May 17 2010, 09:15
Сообщение #252


Профессионал
*****

Группа: Свой
Сообщений: 1 261
Регистрация: 14-05-09
Из: Челябинск
Пользователь №: 49 045



Цитата(AHTOXA @ May 11 2010, 13:45) *
Ещё раз повторю, попробуйте запустить make с ключом -n, и часть вопросов сразу снимется.
Спасибо помогло. Проект собрал.

Возникла следующая проблема: Пытаюсь установить плагин Zylin Embedded CDT. Получаю ошибку
Код
Some sites could not be found.  See the error log for more detail.
  No repository found at file:/C:/Documents%20and%20Settings/Прог/Мои%20документы/.
  HTTP Proxy Authentication Required: http://download.eclipse.org/technology/epp/packages/galileo/content.xml
    Proxy Authentication Required
  HTTP Proxy Authentication Required: http://download.eclipse.org/eclipse/updates/3.5/content.xml
    Proxy Authentication Required
  HTTP Proxy Authentication Required: http://download.eclipse.org/releases/galileo/content.xml
    Proxy Authentication Required
  HTTP Proxy Authentication Required: http://opensource.zylin.com/zylincdt/content.xml
    Proxy Authentication Required

как заставить Eclipse ходить через proxy с авторизацией? Или может можно как нить сделать локальное зеркало плагина Zylin Embedded CDT и установить из него?
Go to the top of the page
 
+Quote Post
AHTOXA
сообщение May 17 2010, 09:56
Сообщение #253


фанат дивана
******

Группа: Свой
Сообщений: 3 387
Регистрация: 9-08-07
Из: Уфа
Пользователь №: 29 684



Цитата(juvf @ May 17 2010, 15:15) *
Пытаюсь установить плагин Zylin Embedded CDT. Получаю ошибку


Тут я вам не советчик. Я никаких плагинов не ставил, всё у меня работало сразу "искаропки" smile.gif
ЗЫ. Eclipse HELIOS (IDE for C/C++ Developers).


--------------------
Если бы я знал, что такое электричество...
Go to the top of the page
 
+Quote Post
juvf
сообщение May 17 2010, 10:03
Сообщение #254


Профессионал
*****

Группа: Свой
Сообщений: 1 261
Регистрация: 14-05-09
Из: Челябинск
Пользователь №: 49 045



Цитата(AHTOXA @ May 17 2010, 15:56) *
всё у меня работало сразу "искаропки" smile.gif

А как из коробки? Мне нужно с помощью джитага внутрисхемно дебажить код. Нашел инструкцию Отладка программ для MSP430 с помощью Eclipse и GDB
Там первым делом этот плагин надо поставить.
Go to the top of the page
 
+Quote Post
AHTOXA
сообщение May 17 2010, 11:07
Сообщение #255


фанат дивана
******

Группа: Свой
Сообщений: 3 387
Регистрация: 9-08-07
Из: Уфа
Пользователь №: 29 684



Это видимо старый вариант, сейчас все нужные плагины уже включены.
Вкратце:
  1. Создаём проект.
  2. Добиваемся чтоб компилился (пишем мейкфайл).
  3. Меню Project-Properties-C/C++ Build-Settings - ставим птички на "Elf parser" и "GNU Elf parser".
  4. Меню Run-Debug configurations
    • Выделяем "C/C++ Application";
    • Давим на "New", даём имя;
    • Давим на "Search project", находим наш скомпилированный elf-файл;
    • На вкладке "Debugger" выбираем "gdbserver debugger"
    • Там же в строку "GDB Debugger" вводим имя дебуггера
    • На закладке connection указываем параметры соединения.
  5. Зашиваем прошивку в камень (можно это делать через отладчик, но для начала так)
  6. Запускаем OpenOCD или msp430-gdbproxy, если речь о MSP430;
  7. нажимаем Run-Debug.
  8. Вроде всёsmile.gif


--------------------
Если бы я знал, что такое электричество...
Go to the top of the page
 
+Quote Post

51 страниц V  « < 15 16 17 18 19 > » 
Reply to this topicStart new topic
8 чел. читают эту тему (гостей: 8, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 18th July 2025 - 16:53
Рейтинг@Mail.ru


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