cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading firmware code from 2.0.3 to 3.4

brandonchan2001
Associate
Posted on April 14, 2011 at 23:10

Upgrading firmware code from 2.0.3 to 3.4

1 REPLY 1
Posted on May 17, 2011 at 14:31

First consider why you need to transition, is the old library unstable, will the new one cause significant regression issues? Are you migrating to newer parts? Can you fix any perceived issues, or bugs, etc by back-porting the library changes you want?

I'd recommend you fork the project, create a new project shell using the new library and then bring in your old code a section at a time, starting with say the GPIO initialization. ie start with the foundations and work up.

Use tools like WinMerge or Araxis to pull sections between your old source tree, and graft it into the new donor tree. You could try to do it within your IDE, but I would not recommend it. Merge tools are ideal for this, and help you become familiar with the differences.

How complicated this is will depend a lot of how much abstraction you have in your project, if you have a lot of source files, or if you work with more monolithic source.

If you don't have good abstraction, you might consider refactoring your current code slightly before porting it to the new library with the differences between them in mind.

Whatever you do, keep multiple separate source trees so you don't break your current working project. And don't try to do the work in-place, start the new project from scratch with a new library based template, using the existing old library project from Keil or IAR will likely contain a lot of hidden meta-data (options, includes, defines) that is a real pig to deal with.

A lot of this will of course depend on your tool chain, and source code management regime.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..