How to force a file to always build?

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

awneil
Posts: 8
Joined: Mon Mar 18, 2019 2:31 pm

Re: How to force a file to always build?

Postby awneil » Mon May 06, 2019 11:47 am

You're right; I didn't - because I got diverted from that project.

I'm not sure if the project was originally created by CubeMX. I received it as an IAR project, and converted that.

I must say that the whole dependency thingy seemed not entirely correct - not sure if that's as a result of the conversion, or inherent in Atollic, or what.

I've used Eclipse a lot, but this is my first time with Atollic specifically.

(in my diversion, I'm currently using Segger Embedded Studio - and that has different issues with its 'always build' option... :roll: )

rdamon
Posts: 10
Joined: Fri Mar 29, 2019 3:28 pm

Re: How to force a file to always build?

Postby rdamon » Mon May 06, 2019 1:15 pm

My project has listed as the Post-Build step: cmd.exe /c ..\postbuild.bat

postbuild.bat has the line

del Application\Version.*

(the IDE runs the build step from the output directory, and the file I want to always build is in my project at {$proj_dir}/Application/Version.c)

For me, this seems to work.

jconradt
Posts: 4
Joined: Mon May 06, 2019 9:50 am

Re: How to force a file to always build?

Postby jconradt » Mon May 06, 2019 1:35 pm

Thanks for your response!
I have tried to reproduce the settings (with an "external" bat file), instead of "rm" as direct POST build command), but still the same behavior.

Some observations:
-) the requested activity (removing of the object file) does happen. That is not the problem. But still, TrueStudio does not realize that the object file is missing (Version.o AND Version.su), when such deleting happens as part of a POST-build command. Only when deleting on abject file "by hand" after all building (and POST-build commands) finished, then TrueStudio recognizes the missing object file and re-compiles.
-) this is demonstrated by the message "Nothing to do" when starting a new "build" after the POST-build command has deleted the file.
-) further evidence: when modifying a different file (e.g. main.c) after automatic deletion of the object files, the IDE correctly compiles main.c but when linking it complains about a "missing" Version.o file --> so it really does not realize that the .o is missing.

I am surprised about your paths. I do not see any folder called "Application". In the automatically generated code (from STM CubeMX), I have the options to build a "debug" and a "release" version, with the output directories "Debug" and "Release" respectively. In both build configurations I have tested the automatic removal, but no luck. Where / how to you access the "Application" directory? Is this your own configuration?

Which version of TrueStudio are you using? (here it's 9.3, the most recent version) Maybe that's a "significant" difference...

and finally, if everything else fails, could you possibly create a "snapshot" of your project folder and share that with me / us? I mean no code (unless you don't care); I just want to compare project settings and similar with my project. That would be really helpful.

Thanks a lot! Jorg

rdamon
Posts: 10
Joined: Fri Mar 29, 2019 3:28 pm

Re: How to force a file to always build?

Postby rdamon » Mon May 06, 2019 4:18 pm

'Application' is a folder we create ourselves to put the main code files of our application as part of a standard file layout we use for many different platforms.

It sounds like you have somehow told eclipse to only look at the changes it makes to figure out what to make, not sure where you could have done that.

jconradt
Posts: 4
Joined: Mon May 06, 2019 9:50 am

Re: How to force a file to always build?

Postby jconradt » Tue May 07, 2019 8:05 am

I agree that "somehow" eclipse "misbehaves". BUT I have not "told" it to do. In fact it's a plain fresh install of Atollic True Studio 9.3; and I have verified this on a separate computer. The project is "out of the box" generated from CubeMX (setting: export for Atollic True Studio). No other changes or modifications.

Are you using "Atollic True Studio"? Version 9.3?
((because I have been able to do this properly on other versions of Eclipse; e.g. "EmProg Thunderbench" and also "Eclipse for C/C++ Developer"; just NOT on Atollic)).

SOLUTION
Anyways, I have the following "work-around: As Atollic True Studio is NOT recommended for new designs, I have instead installed the new "STM CubeIDE 1.0.0" (which combines TrueStudio and MX); and here everything works just fine. So in "CubeIDE 1.0.0" it's fine to remove the respective object file with a POST-BUILD command. Everything works as wanted.

Thanks for help, everyone.

Jorg


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 0 guests