Failure at line 13

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

phoenix2000
Posts: 15
Joined: Sun Aug 12, 2018 11:02 am

Re: Failure at line 13

Postby phoenix2000 » Mon Nov 12, 2018 5:24 am

robmilne wrote:Add my name to the list - is not working in 9.1.0
Just trying to run a basic Nucleo 401 example (exactly as in the webinar at https://blog.atollic.com/webinar-stm32c ... truestudio) and all is well until the load via ST-Link - In my case it is line 6 of the 'Target Software Startup Scripts' with the single word 'load'

Drivers aren't the problem IMO - the board msc and cdc show up fine on my computer (Win7 Pro)

exactly, It stocks in 'load'.
please, help us. Isn't there anybody to help us in the atollic company, wow. :x

robmilne
Posts: 2
Joined: Sun Nov 11, 2018 7:15 pm

Re: Failure at line 13

Postby robmilne » Mon Nov 12, 2018 11:35 am

I should qualify one thing about the ST-Link. I was asked to update the ST-Link hardware before the debug operation which of course I allowed. The problem might lie with the update to the debugger firmware.

Markus Girdland
Posts: 149
Joined: Thu May 11, 2017 11:27 am

Re: Failure at line 13

Postby Markus Girdland » Mon Nov 12, 2018 1:41 pm

Hi,

We are not able to reproduce this problem. It seems as if the common denominator is a failing flash operation (the load command). There are several reasons as to why a load operation can fail. Let's try to isolate the problem. If you have this problem then please try to run STM32CubeProgrammer stand alone (the cli version bundled with TrueSTUDIO) like this:
1. Open a terminal
2. cd to your project debug (elf output) folder
3. Run:

Code: Select all

"C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.1.0\Servers\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe"  --connect port=SWD mode=UR reset=hwRst --download C:\MyProjectPath\ProjectName.elf --verify --quietmode
4. If flash has succeeded, then modify TrueSTUDIO debug configuration by commenting out load command

Does this debug launch cycle work?
This is a potential workaround.
If you want us to look at the problem more closely then we need a procedure to reproduce it reliably.

cowpaul
Posts: 2
Joined: Tue Nov 06, 2018 2:26 pm

Re: Failure at line 13

Postby cowpaul » Mon Nov 12, 2018 6:08 pm

Thanks Markus for your suggestion

I did as you asked and indeed the load from the STM32_Programmer_CLI.exe works just fine

Is there any way to trigger it from within the startup script or shall I just run it within the post compilation step within Build Steps

All the best
Paul Isaac

phoenix2000
Posts: 15
Joined: Sun Aug 12, 2018 11:02 am

Re: Failure at line 13

Postby phoenix2000 » Tue Nov 13, 2018 6:18 am

Markus Girdland wrote:Hi,

We are not able to reproduce this problem. It seems as if the common denominator is a failing flash operation (the load command). There are several reasons as to why a load operation can fail. Let's try to isolate the problem. If you have this problem then please try to run STM32CubeProgrammer stand alone (the cli version bundled with TrueSTUDIO) like this:
1. Open a terminal
2. cd to your project debug (elf output) folder
3. Run:

Code: Select all

"C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.1.0\Servers\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe"  --connect port=SWD mode=UR reset=hwRst --download C:\MyProjectPath\ProjectName.elf --verify --quietmode
4. If flash has succeeded, then modify TrueSTUDIO debug configuration by commenting out load command

Does this debug launch cycle work?
This is a potential workaround.
If you want us to look at the problem more closely then we need a procedure to reproduce it reliably.

I can flash this way too. but this not a way I like. so let me explain the procedure so then you can reproduce it.
I made a project for stm32f429 discovery board, with stm32cubemx which initialized all peripherals with their default setting. that's it, without coding anything more. in other words, my project has just some init function call and then a forever loop.
after compiling with the true studio, I opened the "Configure Debug", chose the project and then click on "Search Project..." so it can find the elf file.
but unfortunately, after these attempts, the debug fails and apparently as the warning says it's because of "load" command in the startup scripts.

Markus Girdland
Posts: 149
Joined: Thu May 11, 2017 11:27 am

Re: Failure at line 13

Postby Markus Girdland » Tue Nov 13, 2018 2:48 pm

cowpaul wrote:Is there any way to trigger it from within the startup script or shall I just run it within the post compilation step within Build Steps


There's no way to do it inside the startup script.

phoenix2000 wrote:I can flash this way too. but this not a way I like. so let me explain the procedure so then you can reproduce it.
I made a project for stm32f429 discovery board, with stm32cubemx which initialized all peripherals with their default setting. that's it, without coding anything more. in other words, my project has just some init function call and then a forever loop.
after compiling with the true studio, I opened the "Configure Debug", chose the project and then click on "Search Project..." so it can find the elf file.
but unfortunately, after these attempts, the debug fails and apparently as the warning says it's because of "load" command in the startup scripts.


I tried it again but I don't get the error, perhaps we're not doing the exact same process? Also, I use a STM32F4DISCOVERY board, not sure if it's the exact same?
Anyway, here is what I do:
1. Create a project for the board and initialize all peripherals with their default settings (I'm using stand alone, perhaps that is different?)
2. Generate the project directly into my workspace and for TrueSTUDIO
3. Import the project (existing projects into workspace) through TrueSTUDIO
4. Build it
5. Debug it, no need pointing out .elf since it finds it on its own

Am I doing anything differently from you?

Yacus
Posts: 1
Joined: Tue Nov 13, 2018 6:40 pm

Re: Failure at line 13

Postby Yacus » Tue Nov 13, 2018 6:49 pm

Hi,

I'm trying to do first steps with STM32.

What I observed:
On Nucleo-64 STM32F446 everything works fine - so IDE is configured properly.
But on my second board, STM32VLDiscovery I have receive the same error as in topic: Line:13 and stuck at "load" command.

I tried method gived above, using command line and STM32CubeProgrammer but it returns:
"Error: ST-LINK V1 not supported".

As I guess, my board has really old programmer type. Before there was also problems with SW4STM32 (V1 is not supported there).

Is here any option to force ST-LINK/V1 to work? Maybe some changes in configuration needed to play with V1?

Or my board should be scrapped?:D

phoenix2000
Posts: 15
Joined: Sun Aug 12, 2018 11:02 am

Re: Failure at line 13

Postby phoenix2000 » Wed Nov 14, 2018 6:51 am

Oh, I solved it by using the "AN1801 v1.1a".
But I didn't expect it, with respect to explanations in here:
http://blog.atollic.com/truestudio-for-stm32-9.1.0-is-released#ST_LINK
I thought there is no more need to this procedure in the new version.
Am I right? should we introduce the STM32CubeProgrammer to the truestudio as an external flash loader in the latest version too?

Markus Girdland
Posts: 149
Joined: Thu May 11, 2017 11:27 am

Re: Failure at line 13

Postby Markus Girdland » Wed Nov 14, 2018 9:03 am

Yacus wrote:Is here any option to force ST-LINK/V1 to work? Maybe some changes in configuration needed to play with V1?

Or my board should be scrapped?:D


In 9.1 we don't support v1 anymore because we're using CubeProgrammer for the flash operation but you can still use version 9.0.1 if you're using an ST-Link v1.

phoenix2000 wrote:Am I right? should we introduce the STM32CubeProgrammer to the truestudio as an external flash loader in the latest version too?


That shouldn't be needed, the cli version of CubeProgrammer is integrated in TrueSTUDIO in version 9.1 but if you need more options then you can still use the stand alone version of CubeProgrammer. In both cases it's still CubeProgrammer doing the flashing so there should be no difference except from any additional settings used.

philbrooksjazz
Posts: 1
Joined: Mon Nov 19, 2018 9:21 am

Re: Failure at line 13

Postby philbrooksjazz » Mon Nov 19, 2018 9:27 am

I'm having the same issue - very frustrating!!

I had some luck with disabling verify in the debug configuration settings.

Run -> Debug Configuration -> Debugger Tab -> Misc section -> uncheck "Verify Flash Download"

But it comes and goes, too early to tell if this is a real fix - but so far working.


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest