Цитата(sysel @ Mar 10 2010, 12:44)
И попутный вопрос: почему отладка вспотыкается об точку входа в main() ?
Как от этого избавиться?
М.б. в этом проблема(проц. останавливается в ожидании того, что по jtag-у придёт команда "дальше", a jtag-то не подключен)?
Спотыкается, потому что в настройках дебагера стоит галочка "run to main". Что просите - то и получаете.
По поводу старта: Задумайтесь над этими строками документации:
Цитата
4.Memory re-mapping
Boot ROM re-mapping
Following a hardware reset, the Boot ROM is temporarily mapped to address 0. This is
normally transparent to the user. However, if execution is halted immediately after reset by
a debugger, it should correct the mapping for the user. See Section33–6.
Цитата
P2[10] — General purpose digital input/output pin. 5 V tolerant pad with 5
ns glitch filter providing digital I/O functions with TTL levels and hysteresis.
Note: A LOW on this pin while RESET is LOW forces the on-chip
bootloader to take over control of the part after a reset and go into ISP
mode. See Section32–1.
Цитата
The flash boot loader code is executed every time the part is powered on or reset. The
loader can execute the ISP command handler or the user application code. A LOW level
after reset at pin P2.10 is considered an external hardware request to start the ISP
command handler. Assuming that power supply pins are on their nominal levels when the
rising edge on RESET pin is generated, it may take up to 3ms before P2.10 is sampled
and the decision on whether to continue with user code or ISP handler is made. If P2.10 is
sampled low and the watchdog overflow flag is set, the external hardware request to start
the ISP command handler is ignored. If there is no request for the ISP command handler
execution (P2.10 is sampled HIGH after reset), a search is made for a valid user program.
If a valid user program is found then the execution control is transferred to it. If a valid user
program is not found, the auto-baud routine is invoked.
Цитата
3.1.1Criterion for Valid User Code
The reserved Cortex-M3 exception vector location 7 (offset 0x001C in the vector table)
should contain the 2’s complement of the check-sum of table entries 0 through 6. This
causes the checksum of the first 8 table entries to be 0. The boot loader code checksums
the first 8 locations in sector 0 of the flash. If the result is 0, then execution control is
transferred to the user code.