Using Build Variables in Debug Configuration->Target Software Startup Scripts

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

merni
Posts: 1
Joined: Wed Nov 07, 2018 12:17 pm

Using Build Variables in Debug Configuration->Target Software Startup Scripts

Postby merni » Wed Nov 07, 2018 12:25 pm

Dear community

I am using Atollic TrueSTUDIO® for STM32, Built on Eclipse Neon.1a, Version: 9.0.1, Build id: 20180420-1214 to Debug an STM32F072 MCU over an ST-Link ISOL debug probe.

In the project settings->C/C++ Build->Settings-> ToolSettings Tab -> Other->Output format I choose Convert to Motorola S-record to get an srec file. With a postbuild script, I patch a CRC checksum into the srec file and save it. Now I like to debug the project using the srec file with the patched checksum.

In the Debug Configuration Dialogue I led C/C++ Application at the already selected .elf file to preserve the debug information.
In same dialogue, in the StartupScripts->Target Software Startup Scripts I change the line

# Load the program executable
load

To:
# Load the program executable
load Debug/openblt_stm32f042Crc16.srec

Which achieves the desired behavior: The srec file including the crc value is loaded on the device and the debugging is still possible.

To generalize the Debug configuration, I would like to use BuildVariables defined in the project settings->C/C++ Build->Build Variables, e.g:

# Load the program executable
load ${BUILD_CONFIGURATION}/${BuildArtifactFileBaseName}Crc16.srec

Unfortunately, it does not work:

Failure at line: 13 in 'Target Software Startup Scripts'. Please edit the debug
configuration settings.
${BUILD_CONFIGURATION}/${BuildArtifactFileBaseName}Crc16.srec: No such file or directory.

Is there a way to use variables in the Debug Configuration->StartupScripts->Target Software Startup Scripts to achieve an automatic adjustment of the load file path and name?

I am working on a Windows 10 64Bit machine.

Thank you for your help.
Marco

Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest