2020-11-04 02:55 PM
In Codewarrior 11.x under the debug configuration C/C++ Application section I can enter "${BuildLocation}/PE-15B00.elf" and that debug configuration is used for all my different build configurations. In STM32CubeIDE, when I try to use variables in this section they are not expanded. Also, I cannot find an equivalent to "${BuildLocation)" in the STM32CubeIDE variable list. For the most part I only need one debug configuration for my debug and release configurations but STM32CubeIDE is forcing me to use 2. On top of that I have a bootloader build config and a firmware build config for my projects so I now have 4 debug configs when 1 would do. Has anyone found a way around this? Thanks.
2020-11-04 05:41 PM
Why do you have multiple debug configs? You can remove them at will (build configs -> manage).
Since your bootloader is a different application, I would expect a different configuration for it, if not a different project entirely.
The output ELF file is built at "${ProjDirPath}/${ConfigName}" which is also "${CWD}".
2020-11-05 06:20 AM
I tried to substitute $(CWD) and it added a the path before that variable then the variable then the elf. This is the result of using CWD
F:\Projects\Smart-Fly\PwrEq\Units\PE-09_Test\STMicro\$(CWD)\TU-1.elf not found
STM32CubeIDE will create a new debug config for my debug and release since the release elf goes in a different directory. I also have my reasons for doing the bootloader as a build configuration under one project.
Thanks,
2020-11-05 06:25 AM
You did $(CWD) which is different than ${CWD}. I checked that those both worked with CubeIDE v1.4.2 on my system before I made that post.
I would use ${ProjDirPath}/${ConfigName} in case they change the working directory somehow.
2020-11-05 07:04 AM
Thanks for pointing out my mistake. I tried to use your second suggestion and got "Reference to undefined variable ProjDirPath". So, I went back and tried using CWD and got "Reference to undefined variable CWD". I am on 1.4.2 also.
2020-11-05 10:15 AM
Go into project properties -> C/C++ Build -> Build Variables. They should be listed there. Where exactly are you entering these variables?
2020-11-05 10:26 AM
Hi, I am entering them under the debug configuration screen, C/C++ Application line. It does not seem to recognize environment variables. Picture attached. This works just fine in Codewarrior 11.x, screen from that attached too. Seems I can only upload one picture so I combined them.
2020-11-05 10:48 AM
Yeah, looks like it doesn't work in that box, unfortunately. Bummer. Sorry for the noise.
I didn't know CodeWarrior was still a thing. Last time I used it was 20 years ago in PalmOS.
2020-11-05 11:45 AM
The Codewarrior you used stopped at version 6. I used it about 8 years ago for a Coldfire project last. Still really liked that version. Freescale rebased a new version on Eclipse and called it Codewarrior 10.x, and for the most part it was crap. They did a major upgrade and called it 11x and that has turned into a pretty nice version of Eclipse. Anyway, thanks for the help. What still amazes me is that both these IDEs are based on Eclipse yet that page, which seems to be a standard page across all Eclipse IDEs can look so different on different releases. I wish ST would make it look more like the Codewarrior version. For me it keeps my directory structure and debug configurations really clean.