This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
I’m using a stm32f407vg board. Suddenly I can’t download my code
to flash memory. It gives me this error » Debugger — Cortex-M error:
no target connected». In options for target > Debug > Settings
in SW Device tab I see » SWDIO: Error No target connected».
How can I solve this?
Top replies
Parents
-
I assume you are connecting using the on board debugger. If so,
here are some ideas for troubleshooting a ST-Link.I) Test with a pack example
-
the pack example are already setup to work on a board. Verify
with one of those examples. This rules out issues with your
code.
-
In the Keil IDE, under Project-> Options for Target -> on
the «Debug» tab, on the top right of the dialog, next the «USE:
ST-Link Debugger, click the «Settings» button — the «Cortex-M
Target Driver Setup» dialog appears.
If the top right of the dialog says «No ST-Link detected», or on
the top left, next to «Unit» the pull down box is empty: — Make sure
there are no Windows USB drivers or board debugger firmware issues.
If not — Swap out USB cables — Don’t connect the ST-Link to your
computer via USB hubIf the box on the top left says — «Unknown target connected» — On
the middle-left of the screen, in the ‘Target Com» box, switch the
Port from «JTAG» to «SW» — ST-LINK requires a Serial Wire interface,
not JTAG.======
If that works, close the dialogues. Still using the sample pack
example, Select Debug-> Start/ Stop debug session. If you get a
pop up box, that says- «st-link usb communication error» then see «uVISION DEBUGGER: ST-LINK USB communication error» at www.keil.com/…/3662.htm
-
Internal command error, make sure to check the command window
for additional information, then see: «uVISION
DEBUGGER: ST-Link Does Not Connect to STM32F4 Discovery
Board» at www.keil.com/…/3634.htm-
Internal command error» and then «Error while attempting to
read 64 bytes from memory 0x00000000» -
Check the Boot jumpers on the board to make sure you are
booting to the correct memory -
Internal command error» A previous program running on the
board is locking up.-
Pull the BOOT0 or BOOT pin high, and restart the board,
and perform a flash erase. -
In the Keil IDE, under Project-> Options for Target
-> on the «Debug» tab, on the top right of the dialog,
next the «USE: ST-Link Debugger, click the «Settings»
button — the «Cortex-M Target Driver Setup» dialog appears.
Try using «connect under reset», close the dialogs and then
perform a flash erase.
-
Pull the BOOT0 or BOOT pin high, and restart the board,
-
Try other connection/reset option «Connect under
Reset»
-
Internal command error» and then «Error while attempting to
- Internal DLL Error, then see «Internal DLL Error Debugging with ST-Link» at www.keil.com/…/3666.htm
- Finally, try the ST-LINK Utilities to erase and reconfigure the device
-
the pack example are already setup to work on a board. Verify
Reply
-
I assume you are connecting using the on board debugger. If so,
here are some ideas for troubleshooting a ST-Link.I) Test with a pack example
-
the pack example are already setup to work on a board. Verify
with one of those examples. This rules out issues with your
code.
-
In the Keil IDE, under Project-> Options for Target -> on
the «Debug» tab, on the top right of the dialog, next the «USE:
ST-Link Debugger, click the «Settings» button — the «Cortex-M
Target Driver Setup» dialog appears.
If the top right of the dialog says «No ST-Link detected», or on
the top left, next to «Unit» the pull down box is empty: — Make sure
there are no Windows USB drivers or board debugger firmware issues.
If not — Swap out USB cables — Don’t connect the ST-Link to your
computer via USB hubIf the box on the top left says — «Unknown target connected» — On
the middle-left of the screen, in the ‘Target Com» box, switch the
Port from «JTAG» to «SW» — ST-LINK requires a Serial Wire interface,
not JTAG.======
If that works, close the dialogues. Still using the sample pack
example, Select Debug-> Start/ Stop debug session. If you get a
pop up box, that says- «st-link usb communication error» then see «uVISION DEBUGGER: ST-LINK USB communication error» at www.keil.com/…/3662.htm
-
Internal command error, make sure to check the command window
for additional information, then see: «uVISION
DEBUGGER: ST-Link Does Not Connect to STM32F4 Discovery
Board» at www.keil.com/…/3634.htm-
Internal command error» and then «Error while attempting to
read 64 bytes from memory 0x00000000» -
Check the Boot jumpers on the board to make sure you are
booting to the correct memory -
Internal command error» A previous program running on the
board is locking up.-
Pull the BOOT0 or BOOT pin high, and restart the board,
and perform a flash erase. -
In the Keil IDE, under Project-> Options for Target
-> on the «Debug» tab, on the top right of the dialog,
next the «USE: ST-Link Debugger, click the «Settings»
button — the «Cortex-M Target Driver Setup» dialog appears.
Try using «connect under reset», close the dialogs and then
perform a flash erase.
-
Pull the BOOT0 or BOOT pin high, and restart the board,
-
Try other connection/reset option «Connect under
Reset»
-
Internal command error» and then «Error while attempting to
- Internal DLL Error, then see «Internal DLL Error Debugging with ST-Link» at www.keil.com/…/3666.htm
- Finally, try the ST-LINK Utilities to erase and reconfigure the device
-
the pack example are already setup to work on a board. Verify
Children
No data
0 / 0 / 0 Регистрация: 01.09.2012 Сообщений: 234 |
|
1 |
|
06.05.2013, 16:18. Показов 13603. Ответов 3
В попытках настроить дебаг — сломал себе st-link утилиту, не работает «connect» — выдаёт «no target connected» При этом из командной строки st-link_cli я перепрошить могу — но после успешной перепрошивки появляется то же сообщение «no target connected». Кстати, что именно означает это «no target connected»? Команда — «st-link_cli -c SWD ur -P Releasebla.hex -Rst -Run» С другого компьютера всё подключается и прошивается из утилиты, так что проблема видимо всё-таки именно в софте. Или это новая версия утилиты просто не работает вообще?
__________________
0 |
0 / 0 / 0 Регистрация: 13.05.2011 Сообщений: 401 |
|
08.05.2013, 13:11 |
2 |
В Target->Settings все правильно установлено? Попробуйте галку «Connect under risit» поставить. И еще такая ошибка «вылазит», если VTRef не подключен, те на ST-Link питание не подано. Если у Вас через st-link_cli работает, згачит с дровами все норм. Проблема где-то в настройках.
0 |
0 / 0 / 0 Регистрация: 01.09.2012 Сообщений: 234 |
|
08.05.2013, 17:12 |
3 |
Вчера разобрался — оказалось, что я в своём коде заюзал ножку, которую использовать было не нужно. (пока не разобрался, какую) Как не странно, но факт — чуть более старая версия st utility при этом работала, а чуть новее — не работала. Но еще не работало openocd и вообще все разные gdb. Выключил половину функционала, освободил половину пинов — всё заработало.
0 |
0 / 0 / 0 Регистрация: 13.05.2011 Сообщений: 401 |
|
08.05.2013, 17:23 |
4 |
В такой ситуации «Connect under risit» и спасает. А ножки нужны всего 2 — SWDIO и SWCLK.
0 |
In this tutorial we will see errors discovered by playing with the IDE uVision4 MDK-Lite.
Of course detailed errors and solutions are provided and will be added if more errors would be found.
Simple and easy, so let’s get started.
Unknow target connected
If, when you tried to download code to flash memory, you encountered this error:
Unknow target connected
from the Debugger — Cortex-M Error popup.
And just after a new popup saying:
Error: Flash Download failed - Target DLL has been cancelled
Then let’s see how to resolve it.
Open your uVision4 MDK-Lite and go to > Flash > Configure Flash Tools… > Utilities > Use Target Driver for Flash Programming > Select ST-Link Debugger > Settings > Debug > Port > SW > Click OK.
Error: Flash Download Failed — «Cortex-M3» or «Cortex-M4»
In the Build Output you have:
No Algorithm found for: 08000000H - 08000733H
To remove this error, let’s say to uVsion4 where is our programming algorithm:
Open the IDE then > Flash > Configure Flash Tools… > Utilities > Settings > Flash Download > Programming Algorithm > Click the Add button > Select your processor flash > Add > OK.
*** error 57: illegal address (0x08000000)
Once clicked on Start/Stop Debug Session, several popups ST-LINKIII-KEIL appear with the successive following messages:
Unknown target connected
Flash programming error
Error while attempting to write 1844 bytes to 0x08000000
Unknown target connected
And finally in the Command window we have this error:
*** error 57: illegal address (0x08000000)
To resolve it, go out from the debugger and then click Flash > Configure Flash Tools… > Debug > On the right side, select Use ST-Link (be careful to not select the ST-Link Deprecated version) > Settings > Debug > Port > SW > OK > OK.
Conclusion
A great place to be.
Форум РадиоКот • Просмотр темы — STM32L152 в Keil не запускатеся, в ST-LINK Utility работает
Сообщения без ответов | Активные темы
ПРЯМО СЕЙЧАС: |
Автор | Сообщение |
---|---|
|
Заголовок сообщения: STM32L152 в Keil не запускатеся, в ST-LINK Utility работает
|
Первый раз сказал Мяу!
Зарегистрирован: Чт апр 30, 2009 17:16:31 Рейтинг сообщения: 0
|
Здравствуйте. Подскажите, пожалуйста. Собственно, вопрос в теме. Сделал платку с контроллером STM32L152CB. Подключил по SWD, как написано в документации к отладчику (ST-LINK/V2): Дебаг в кейле запускается раз через раз. Когда не запускается, пишет: No Target connected А когда запускался, через несколько шагов выдавал ошибку: Error while attempting to read 64 bytes from memory Установил пятый кейл. Дебаг также запускается через раз. Но теперь программа стартует из адреса 0x1FF00000 (System memory). При подтягивании ножки Boot0 к нулю, контроллер перестаёт запускаться и выдаёт всё то же сообщение «No Target connected». В программке ST-LINK Utility всё всегда работает. Правда, первый раз программа выдала ошибку и сказала попробуйте в настройках поставить «Connect Under Reset». После этого всё работает без ошибок. Может ресет отключить от отладчика? Правда, мне уже надоело платы резать. И ещё, чтоб тем не плодить. Я может слепой, но может кто-нибудь даст ссылку, где чётко написано, какие контроллеры являются low density, medium density и т.д. А то в даташитах они постоянно ссылаются на это дело. Чисто интуитивно понтяно, что это примерно вот так, но тут только серия STM32F, да и в даташитах фигурирует medium density+, которого тут нет. Заранее спасибо! |
Вернуться наверх |
Профиль
|
Реклама | |
|
|
dosikus |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
||
Карма: 30 Рейтинг сообщения: 1
|
Схему и фотографии платы в нормальном разрешении . алёша писал(а): При подтягивании ножки Boot0 к нулю, контроллер перестаёт запускаться и выдаёт всё то же сообщение «No Target connected». Boot’ы влияют только на загрузку . И по дефолту должны быть оба в нулях . |
||
Вернуться наверх | |||
Реклама | |
|
|
алёша |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
Зарегистрирован: Чт апр 30, 2009 17:16:31 Рейтинг сообщения: 0
|
|
Вернуться наверх | |
алёша |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
Зарегистрирован: Чт апр 30, 2009 17:16:31 Рейтинг сообщения: 0
|
Поставил в кейле тоже Connect under Reset. Теперь в дебаг входит без проблем. Но после пары шагов куда-то улетает, а когда останавливаешь, выдаёт сообщение: Будем думать. |
Вернуться наверх | |
Реклама | |
|
Выгодные LED-драйверы для решения любых задач КОМПЭЛ представляет со склада и под заказ широкий выбор LED-драйверов производства MEAN WELL, MOSO, Snappy, Inventronics, EagleRise. Линейки LED-драйверов этих компаний, выполненные по технологии Tunable White и имеющие возможность непосредственного встраивания в систему умного дома (димминг по шине KNX), перекрывают практически полный спектр применений: от простых световых указателей и декоративной подсветки до диммируемых по различным протоколам светильников внутреннего и наружного освещения. Подобрать LED-драйвер>> |
алёша |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
Зарегистрирован: Чт апр 30, 2009 17:16:31 Рейтинг сообщения: 0
|
Парни, каждый раз затыкается на одной и той же инструкции: Код: GPIOA -> MODER = (1<<22)|(0<<23); http://s1.cfile.ru/a/f/detnb-otladka.jpg Если её закомментить, всё работает без проблем. При простой загрузке программы ошибок не было ни разу. При включении питания программа выполняется. А вот отладка глючит. Также почему-то при дебаге продолжает иногда стартовать с адреса 0x1FF00000, как будто ножки Boot настроены на выполнение встроенного загрузчика. Вот здесь написали, что прошиваться может нормально, а дебаг глючить из-за ножек Boot. У меня они подтянуты к нулю. |
Вернуться наверх | |
Реклама | |
|
|
Реклама | |
|
LIMF – источники питания High-End от MORNSUN со стандартным функционалом на DIN-рейку На склад Компэл поступили ИП MORNSUN (крепление на DIN-рейку) с выходной мощностью 240 и 480 Вт. Данные источники питания обладают 150% перегрузочной способностью, активной схемой коррекции коэффициента мощности (ККМ; PFC), наличием сухого контакта реле для контроля работоспособности (DC OK) и возможностью подстройки выходного напряжения. Источники питания выполнены в металлическом корпусе, ПП с компонентами покрыта лаком с двух сторон, что делает ее устойчивой к соляному туману и пыли. Изделия соответствуют требованиям ANSI/ISA 71.04-2013 G3 на устойчивость к коррозии, а также нормам ATEX для взрывоопасных зон. Подробнее>> |
dosikus |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
||
Карма: 30 Рейтинг сообщения: 0
|
алёша писал(а): Парни, каждый раз затыкается на одной и той же инструкции: Код: GPIOA -> MODER = (1<<22)|(0<<23); … Тем кто не любит читать даташит , обычно и приходится самим с собой болтать . Код: GPIOA -> MODER = (1<<22)|(0<<23); мы его напрочь вырубаем…. И далее, забыть магические числа и работать правильно : Код: GPIOA->MODER &=~ GPIO_MODER_MODER11; |
||
Вернуться наверх | |||
алёша |
Заголовок сообщения: Re: STM32L152 в Keil не запускатеся, в ST-LINK Utility работ
|
Зарегистрирован: Чт апр 30, 2009 17:16:31 Рейтинг сообщения: 0
|
dosikus писал(а): Тем кто не любит читать даташит Любим, умеем, практикуем Большое спасибо за помощь! Столько с платой намучился, что на код особо не подумал |
Вернуться наверх | |
Кто сейчас на форуме |
Сейчас этот форум просматривают: Majestic-12 [Bot] и гости: 12 |
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения |
I am stuck with a weird problem with STM32F103RC and ST-Link V2.
Whenever i try to flash a program to my stm there is this error.
No Target Connected & ERROR: Flash Download Failed — Target DLL has been cancelled.
Few Methods i tried to solve this problems are:
1. Disconnecting the Device. making the BOOT0 High and connecting the device and erasing the chip.
What happens in this case is Chip is erased at first. Then i could Flash the program. But again after few mins if i try to flash the same error occurs.
At first i though there was some problem with the code (as i was doing SPI) so i wrote a simple Blink LED code using HAL Library but same thing occurred. So i thought there might be some problem with the HAL library so i wrote the whole code using CMSIS core but same thing occurs.
2. Upgrading and Downgrading the ST-Link Firmware
Here after upgrading i got an ERROR: USB CONNECTION ERROR. SO i downgraded it again and came to the same place.
3. Following the steps from this YouTube video
I found this great video in YouTube from NewbieHack. Here basically what he did was to reset the device and erase the chip. I also followed the same steps but nothing happened. Here is the link of the video
I Almost tried everything and couldn’t understand that where the problem reside. Is it with STM32 or ST-Link or some software issue.
and sometimes i could erase the device but again after a min the same error occurs. I don’t know whats going on.
In all the above cases i used «Connect under reset» option form target->settings. Although i have explored all the options but nothing seems to work and PC is running on windows 10(if it’s imp)
Any Suggestions??
Thanks in Advance.