Barney Rubble
Barney Rubble

Reputation: 21

Generating multiple product firmwares from single codebase using c2000 texas instruments code composer

At work we use a C2000 core Texas Instruments TMS320F DSP microcontroller. We started out with a single codebase and a single core product. Customer requirements have caused many modified branches to be made from our svn repository for different configurations and then different products to an extent. They all share the same control unit PCB and microcontroller sometimes with different peripherals attached externally. An example of a different configuration would be one product using a modified ADC routine and sequencer configuration (and different offset and scale values for the ADC calibrations), as well as different control routines / PID tuning values etc.

It has become a burden maintaining and updating all the different firmware projects for the products and I'm the sole developer. We are bouncing ideas around such as using difference reporting to minimise the differences between all the firmware projects and then using correctly setup #defines with #ifdef's and #ifndef statements to conditionally compile all the firmware projects and once and perhaps build all 10 or so firmwares at once.

So is it possible to setup the build environment to feed in #define _BUILD_CFG_1, finish the compile, and then feed in #define _BUILD_CFG_2 etc, and then I'm left with 10 compiled firmwares, all of the same version but with different configurations.

The other idea we had was to setup flash and run the differing sections of code at run time depending on certain bits in the flash which represented a different configuration. This would mean we had a single firmware for all products. This method is probably not practical because of our other settings and how they work. We are also concerned about any degradation in performance because we are pushed for CPU resources.

FYI we are using Texas Instruments Code Composer V4.

Are there other ways to go?

Thanks so much!

Upvotes: 0

Views: 179

Answers (1)

Martin Thompson
Martin Thompson

Reputation: 16832

IIRC Code Composer creates a Makefile to run underneath all the pretty IDE.

You could create another Makefile which would set the appropriate variables, call the IDE created Makefile, then move the resultant executable to its final resting place.

Upvotes: 1

Related Questions