Translate

Saturday, December 15, 2018

Timer for UV box - final build - software


Once the hardware was ready, I resumed the code developed with Energia.


Let's see what I found.

Like the hardware I did find some problems resuming to work on this project.

I didn't remember exactly what version of Energia I originally used to develop the code, so I started from scratch, installing on my Ubuntu machine the latest Energia IDE : Energia 1.8.7E21 (10/17/2018)

The installation went without problems and it did recognized the MSP430 connected via the Launchpad J3 connector (see first part article).
Then I loaded the sketch from the bitbucket and hit the first problem.

The first attempt to compile the code failed because missing a bunch of libraries, libraries I didn't save in the repository.
Fortunately I did found an old computer with those libraries installed.
I did copy them in the new installed Energia environment (Energia directory/libraries) and the code did compile.

The second problem was related to "load" the compiled code on the board.
Actually it did load just fine, but it didn't work.
I don't know what actually was going on since there is no debugger or tools to tell what is going on in the code, working in progress on this.

So after some time I decided to try to use the old computer with the old Energia version (I think it is a version 11 of the IDE).
Code compiled, loaded and ... working.

So there is something wrong with the Energia running on my Ubuntu machine.
Possible things :
  • 64 bit machine vs. 32 bit machine
  • USB loader problems
The same problems exists using Energia also on a Mac, is not only Linux related.

Because of that I did work so far on the old computer (my glorious Gateway laptop) and resumed the code.
Again, too much time passed since I developed the code initially, the stored code was actually not completed, don't know where the running code was stored at this point.
Anyway, resumed the debug and set up the official version 1.0 of the firmware to handle the Timer.

The code is available on bitbucket.

Installation


In order to program the MSP430, here a quick step-by-step guide.

  1. Install Energia (see problem above, you may end up on a wrong machine)
  2. Checkout the repository
  3. Copy the libraries (directory Energia_libraries) in the Energia library directory
  4. Connect the UV Box timer board to the Launchpad board (see hardware article)
  5. Start Energia
  6. Load the code and select board (MSP4302553) and port
  7. Compile and upload the code


1 comment: