2015-10-30 11:46 PM
I've just started using SW4STM32 and wrote a sample project to check it out but after setting up my board and its connection and a Run/Debug configuration I got this error when I want to deploy my program using ST-Link/V2 SWD:
Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-06-12-17:54) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 1000 kHz adapter_nsrst_delay: 100 none separate srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.261335 Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints Error: timed out while waiting for target halted TARGET: stm32f1x.cpu - Not halted in procedure 'program' in procedure 'reset' called at file ''embedded:startup.tcl'', line 478 in procedure 'ocd_bouncer'Unable to reset target **shutdown command invokedIsn't this supposed to work without problems?I can program and debug the chip using every other tools I have on my computer like Keil, Atollic TrueSTUDIO and STM32 ST-LINK Utility pretty easy and I wasn't expecting any problems at this stage!ST-LINK has the latest firmware and I have installed the latest ST-LINK USB driver so I sort of blame SW4STM32 or maybe STM32CubeMX because the project was created using STM32CubeMX.Any thoughts?2015-10-31 04:19 AM
2015-10-31 07:40 AM
Thank you
Just a question. What are those last lines? Is that some sort of script? It that is the case then where should I put them in project settings?2015-10-31 10:30 AM
2015-11-01 01:41 AM
Thank you. Well I already have these settings :
Yet I can only do the debugging but still can not Run/upload applications on the board. Then I don't know what the problem is. I'm using ST-LinkV2 and SWD connection. Simple as that. And I only have this problem with SW4STM32. I mean take Atollic TrueSTUDIO as an example which I'm fine with it by the way. Doesn't it use OpenOCD? -----------------------------------------Besides even if I select ''Use local script'' instead of ''Manual spec'' in Debug Configurations, there is one .cfg file in my project with contents as this: # This is an Mosi_STM32F103RCT board with a single STM32F103RCTx chip.# Generated by System Workbench for STM32source [find interface/stlink-v2.cfg]set WORKAREASIZE 0xC000transport select ''hla_swd''source [find target/stm32f1x_stlink.cfg]# use hardware reset, connect under resetreset_config srst_only srst_nogateWhich is not the same as your script for the most part. And it's pretty obvious that the SW4STM32 itself has generated this script based on my settings. So I don't think I'm supposed to modify anything. What do you guys think?2015-11-01 01:54 AM
2015-11-01 03:18 AM
Thank you.
Yes I was just looking in another thread in openstm32 and figured ''srst_only'' is making problems. So I selected ''Use local script'' and gave the path of my script.Now apparently I can debug without any problem but I still can not Run the application!I don't know how they are different. Here is the console log when I hit Run.***********************************Open On-Chip Debugger 0.9.0-dev-00418-g9afb8b4-dirty (2015-09-28-12:09)Licensed under GNU GPL v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlInfo : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWDadapter speed: 1000 kHzadapter_nsrst_delay: 100none separatenone separateInfo : Unable to match requested speed 1000 kHz, using 950 kHzInfo : Unable to match requested speed 1000 kHz, using 950 kHzInfo : clock speed 950 kHzInfo : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748Info : using stlink api v2Info : Target voltage: 3.263492Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpointstarget state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08002cd8 msp: 0x2000c000** Programming Started **auto erase enabledError: Invalid command argumentimage.base_address option value ('Configuration.elf') is not valid** Programming Failed **shutdown command invoked***********************************And here is the last line in script: (I should mention again that Debug is working with this script)# use hardware reset, connect under resetreset_config srst_nogate2016-01-07 08:05 AM
I had this same problem:
................image.base_address option value ('Configuration.elf') is not valid
................
and that file was .elf not should be spaces. To configure the file name .elf: Propierties-> C / C ++ build-> setting-> Buid artifact-> Artifact name-> ''name.elf''
2016-02-06 02:53 PM
Hey Mustafanfs,
Rename the elf file. That is to say remove the 'Configuration' part of it. It worked for me. Imagine, the folks who developed CubeMX didn't expect that error to happen LOL! I know how insulting IDE's can be, especially eclipse is one that can rise one's temper. Did you know that eclipse doesn't look into its own created project tree for compiling resources. No, you have to tell it to look there via Built settings => compiler includes. Insane, not? Instead this being the fact by default. Amazingly ridiculous. And that's not the only nonsensical stuff there is about eclipse. It's really unbelievable how 'smart' one must be to understand today's crooked logic in the ICT world. There have been better days some 25 years ago. Good luck!