This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Custom firmware for TI ADS1118 BoosterPack

Other Parts Discussed in Thread: ADS1118, MSP430WARE

I am attempting to modify the firmware shipped with the ADS1118 BoosterPack. I have downloaded the compiled firmware and am able to flash this to the program ROM, but I am unable to work with the source file in Code Composer Studio.

I am looking for a step-by-step guide or someone to aid in configuring code composer studio that will allow me to edit, build and debug the firmware source code provided by TI.

The only relevant information I am able to find is from the Users Guide, section 6. However, this only goes so far as to state that the source code project was compiled with CCS 5.3. There seem to be some dependencies which I am a) not understanding and b) I am not loading. I suspect I need to be properly loading Grace (I do not know what this product or plugin does or why its needed), MSP430ware (again, I don't know what this is, or if its binary files or C libraries), and driverlib (again, confusion on my end).

If someone could provide a walkthrough for setting up CCS to be able to edit, compile & debug the provided firmware, I would greatly appreciate it. I tried helping a student for quite some time yesterday, but found the CCS project management a bit confusing.

Many thanks.

-S Thomas

  • Hi Stewart,

    I'm will look at rebuilding the project myself in CCS 6.x.  The GRACE tool is a configuration tool for setting up the peripherals of the MSP430 within CCS.  MSP430ware is a library of software and examples for the MSP430. 

    I will get back to you as soon as I can.

    Best regards,

    Bob B

  • Thanks Bob, I really appreciate it. Even better if the project is CCS v6.x compatible.

    Let me know how it goes, and what steps you took. Again, I really do appreciate it. I think I am missing something basic about the setup or include procedure with importing CCS based projects.

    Sincere thanks,

    -SThomas
  • Hi Stewart,

    Once CCS has been downloaded and installed you should have also received the GRACE and MSPware as a part of the CCS download.  The single biggest issue when compiling/linking while importing an old project is the software links to the previous version no longer exist.  In some cases you will receive an error (requiring a physical address change), and other cases you may receive a warning which can be ignored.

    I think part of what may be happening is mixed files using different compilers.  After import and before making any file changes, clean out the old files and rebuild everything.  On the menu bar click on Project->Clean... using the default selections.  This should clean out all of the old compile/link information and rebuild the files.  Let me know if you see any errors.  You can verify by downloading and running the program on the Launchpad.

    Once you get an error free build, you can try and edit the files then rebuild/download/debug again.  This should now work.

    To see how GRACE works you can click on the main.cfg file which should start the GRACE editing tool.

    Best regards,

    Bob B

  • Bob, Thanks for looking into this. I was able to get it working this morning. I had not been cleaning immediately after import, and that did seem to make a difference. I believe one of the computers I had been working on may have had grace installed as a standalone package as opposed to installing from the CCS App Center.

    I do have one more (hopefully) quick question about Grace. I opened it up and it seemed to have some graphical elements to it, but ultimately appeared to generate c files (header and source files). Just to help me wrap my head around this: If Grace is used to generate c source, why does the build process still require grace to run? Are these files being re-generated everytime the project is built? It would seem that grace would need to generate the source files once, and then a compile of the C source would only look at the source files and not need to include the grace program. It's more a question of if I or someone else creates a project that has used grace, is grace always going to be required to build the executable?

    Thanks so much Bob, I really appreciate it. And the firmware can now be successfully modified.

    (For reference and for anyone else stumbling on this, OS: Windows 7, CCS v6.1)

    My steps to get the firmware for the ADS1118 Booserpack to successfully build:

    1) install Grace and MSPWare from the CCS App Center (Help > App Center)

    2) Import the project into your workspace. To be safe, I imported the zipped archive (Project >> Import CCS Projects...)

    3) IMMEDIATELY clean the project (Project >> Clean...)

    4) I had 1 remaining error and needed to adjust the XDCtools version for the project. (Project >> Properties ; General, RTSC tab, select latest SDCtools version. For me this was 3.31.0.24_core)

    5) Rebuild the project without errors, download & Debug, and hack away.

  • Hi Stewart,

    I'm glad you got it going.  Questions about GRACE should be directed into the MSP430 forum, but basically what GRACE does is allow you to graphically setup the MSP430 peripherals in a much less complicated manner than by constructing the C code yourself.  Once completed, you can cut and paste the various code setup if you want, and then the GRACE generated stuff is no longer needed.  I think if you poke around and read through some of the documentation it will make more sense.  The clocks, interrupts, register settings for the peripherals can be rather complicated so this graphical tool is meant to make the job easier.  If you are familiar with MSP430 devices you do not need to use GRACE and can code the settings yourself.  Also, not all MSP430 devices are available in GRACE.

    As far as the build process, if you issue a clean, all files are recompiled. Generally speaking the files are not rebuilt unless you make a change in the code based on date/time of the previous build.

    Best regards,

    Bob B

  • Hi,

    I'm stuck in a similar situation with my ADS1118 (on top of an MSP430). I'm using CCS version 6.2, however, so I can't get Grace through the CCS App Center. Building the project would say that I did not have Grace installed.

    Instead, what I've done is installed Grace separately and generated the C files from the .cfg file. Then, I went into the build settings and got rid of the references to Grace (found in the RTSC tab). Building the project then only gives an error about gmake. "gmake: *** No rule to make target 'build-876411647', needed by 'configPkg/compiler.opt'." That error is thrown several times each build. That means the .out file is not generated, and I cannot send the file to my device.

    I've tried doing clean builds, and that hasn't fixed the issues. Any assistance would be greatly appreciated, as I've been stuck on getting my own code onto this device for a couple days. Thanks in advance.

  • Hi pi314rules,

    The error you are seeing is associated with the make file under the debug folder 'subdir_rules.mk'.  This is a part of the XDCtools associated with Grace.  If you have configuration files for the MSP430, I would start a new empty project for the MSP430 device you intend on using so that none of the Grace configuration elements are a part of the build.  Once you have the empty project copy the required files to the project and build.  I think this will be the easiest way to get the program to build properly if you are excluding Grace from the project.

    Best regards,

    Bob B

  • Thank you for your response.

    I believe the only build error after doing what you suggested is the following: "C:/ti/xdctools_3_24_05_48/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: Error: no target named: please use -t, -b, or --cb

    This is in the new project with the files copied over.
  • Hi pi314rules,

    Apparently you still have a linkage to the XDC tools used by Grace.  Either you copied more than the .c and .h files to the new project, or you have a linkage within one of the files that calls an XDC tool.  Make sure you have removed all references to Grace as either direct function calls or references to any included Grace headers.

    If you are still having issues you could try zipping the project and attaching it to a reply and I will take a look at it.

    Best regards,

    Bob B

  • Hi Bob B,

    It looks like the program was written with references to Grace. Recall that the program was written using CCS 5.3, when Grace was supported. The question is, is it possible to have a program that measures temperature without using Grace?

    I'll attach my current project setup, but if I could just know what to do, from start to finish, to the demo project so that it works with the latest version of CCS, I'd be extremely grateful.

    I downloaded the demo firmware here: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sbac121&fileType=zip

    Here's how I have it currently set up.

    ADS1118 Firmware Demo (current).zip

  • Hi pi314rules,

    It appears that when you created your empty project you used an 'Empty Grace (MSP430) Project' instead of the plain 'Empty Project.  I took your files and added them to a new Empty Project.  I copied the 'grace' and 'usr' folders to the project as well as main.c. In the include section of the main.c file make the following changes:

    #include <ti/mcu/msp430/Grace.h>

    #include "usr/UART_TxRx.h"

    #include "usr/ADS1118.h"

    #include "usr/LCD_driver.h"

    and in the main function change CSL_init() to Grace_init().

    You will also need to add to the project properties an include to the packages for the Grace configuration information.  It should appear similar to:

    Best regards,

    Bob B

  • Hi Bob B,

    Thank you so much for your help! For the first time, the code successfully built, and I was able to send the program to my device by clicking Debug.

    The only remaining issue is that the temperature is not being displayed on the screen. I'm not sure if this is at all related to any of the changes you suggested. I have tried building the program a few times, pressing the reset button on the MSP430, and turning it off and on again. I did have to press "resume" in CCS, because the debug stopped the program at the Grace_init() line. I'm fairly certain that the program is running on the device, but I could be missing something.
  • Hi pi314rules,

    Glad to hear you are making some progress.  Up to this point I'm assuming that you are using the MSP-EXP430G2 Launchpad, am I correct?  Did you try running the ADS1118 BoosterPack with the supplied micro to make sure that everything was working?

    You must make sure that the jumpers at J5 are removed (P1.0 and P1.6) as this will directly affect communication to the LCD.  Also, for the software to download and debug properly the TXD and RXD jumpers on J3 must be set to SW UART position (up and down like the others on the connector).

    The final thing is the Grace file 'InterruptVectors_init.c' contains empty functions.  Go back to the original source code and compare the files and update as necessary.

    Information regarding the debugger is when the debug session starts the device is reset and stops at the first line of code in the main function.  This is normal and will stop at Grace_init() which is the first line in the function.

    Unfortunately I do not have the ADS1118 BoosterPack so I cannot verify that the build works as expected, but it should if you followed the above information.  If it does not, you will need to troubleshoot the communication and pin functionality.  One of the very first things in the code is setting up the LCD display and writing to it.  You can check and verify the communication with an oscilloscope or logic analyzer if you have one.

    Best regards,

    Bob B

  • Hi Bob B,

    Apologies, I should have been clearer. Yes, I am using an MSP-EXP430G2 Launchpad, and the supplied micro (which I am assuming is the same thing as what I called the "demo program") worked fine.

    I did remove the J5 jumpers. Strangely enough though, the TXD and RXD jumpers have been in the HW UART position. Putting them the correct way did not change how the program ran (at least from what I saw).

    Copying the source code into 'InterruptVectors_init.c' from the original is what finally what made the temperature record onto the LCD screen. Problem officially solved!

    I cannot thank you enough for your help. I'm also glad that the problems I had here are well-documented, so that anyone else who has a similar issue can follow your incredibly helpful tips. Thank you!