- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
04-13-2017 09:35 AM
I have a python script which generates some C source and header files. When I turn off parallel build, I only need to compile once. When I turn on parallel builds, I have to compile twice as the generated source files seem to get missed by the first build. Since there can be significant differences in build times between parallel and non-parallel builds I'd prefer to use parallel builds so I end up compiling twice. The generated files are not always generated as they are only generated when I make changes to a text file that the files are generated from.
04-13-2017 10:38 AM
So the python script is run and then the project is built within Studio? Is the project "Refreshed" before it is built? (right click the project folder and select "Refresh")
04-13-2017 10:50 AM
The python script is run as a pre-build step. I press the hammer to build the application and the pre-build step updates (only if needed) source and header files and the build proceeds. If the parallel build check box is checked, then the updated files are not compiled and I have to press the hammer a second time.
04-13-2017 04:16 PM
It turns out this is a known issue with the Eclipse CDT builder: ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=340300 ). There a couple of workarounds suggested:
1. Add your own builder that runs the pre-build python script and that gets invoked before the CDT Builder.
1. Add a makefile.init in the project root with the following content: allwithpre : $(MAKE) --no-print-directory pre-build $(MAKE) --no-print-directory main-build 2. Remove the pre-build task from the configuration 3. In the project settings, C/C++ Build -> Behavior -> Workbench Build Behavior, Change "all" to "allwithpre"
The first option might be easier to do with Simplicity Studio.
04-18-2017 03:18 PM
Yes CDT 9.3 should be released fairly soon, but I'm not sure when the update will be incorporated into Simplicity Studio.
As far as creating your own eclipse builder there are some examples available on the web if you want to go down that path.