mpiannucci / HelloMSP430

Simple blinking light example for the MSP430
MIT License
4 stars 0 forks source link

readme revisions #4

Open bootchk opened 6 years ago

bootchk commented 6 years ago

Suggestions for updating the readme:

Emphasize in the description and in the name of the repository it is for cmake, that's why most people would use or reject this.

Change the name of the toolchain file in the example command to "msp430-energia" instead of "msp430" Or make it metasyntactic i.e. cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/msp430-FOO.cmake ../

For most users the first step will be to edit the toolchain file to change the path to the installed Energia. For example, it was not in /opt/energia on my Ubuntu because I downloaded Energia from TI instead of from the Ubuntu repositories (and I extracted into a wierd place.)

Thanks. It works fine, so far.

bootchk commented 6 years ago

I will add my further experiences. Not to discredit your work, just for the benefit of others who might want to use this.

The latest, low end MSP-EXP430FR2433 Launchpad (dev kit) did not seem to work with the latest Energia 18 aka Energia 1.6.10E18 since there is no tools/msp430/msp430/include/msp430fr2433.h in the toolchain. So "set(MSP_CPU_FLAG -mmcu=msp430fr2433)" gives an error. As best I can tell, the Energia "Board manager" is supposed to recognize 2433 and might download the proper include files? I haven't tried it. Maybe that would enable these Makefiles to work, or maybe one must wait for the next Energia release?

Even "set(MSP_CPU_FLAG -mmcu=msp430fr4133)" (for which include files exist in the toolchain) gives compilation errors, simply because the msp430 family has diverged so much, that your example uses devices or registers which are not found on the lowest-end members of the family?

Again, thanks.

bootchk commented 6 years ago

I tried starting the Energia IDE and using the "Board Manager" to download (a package?) that supports fr2433 However, as noted in the Energia website it downloads to ~/.energia15/packages/energia/tools/msp430-gcc/4.6.5/msp430/include/msp430fr2433.h (at least the file I am looking for.) Which the cmake files don't seem to know about, and cmake throws error: #error "Failed to match a default include file" I tried this fix:

include_directories(SYSTEM ${MSP430_PATH}/msp430/include /home/bootch/.energia15/packages/energia/tools/msp430-gcc/4.6.5/msp430/include ) without success.

Some background: I have used the Energia IDE, and Eclipse IDE, and command line with cmake.