Jump to content
43oh

New Energia release 0101E0013 - 09/05/2014


Recommended Posts

  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I am happy to announce that release 0101E0013 just went up on http://energia.nu. This release adds support for the awesome CC3200 WiFi LaunchPad and CC3100 BoosterPack for MSP430 and TivaC.   I want

NEW FEATURE folks will want to be aware of!   For msp430 and lm4f (Tiva/Stellaris), there are three new ways to pause or halt the CPU-   void sleep(uint32_t milliseconds); void sleepSeconds(uint3

CC3200 users: Don't forget to visit http://energia.nu/cc3200guide/ and follow the directions there; this firmware update can only be done on Windows at the moment unfortunately, but it's important for

Posted Images

@@igor

 

In "tmp006.cpp" I replaced 3 occurences of "ADR1_0_ADR0_0" by "ADR1_0_ADR0_1"  on lines 191, 197 and 229 (cf Launchpad CC3200 schematic).

 

Compiling" QuickTMP006.ino"  gives this error :

*****\Documents\Energia\libraries\TMP006\tmp006.cpp: In function 'float Calculate_Temp(float*, float*)':
*****\Documents\Energia\libraries\TMP006\tmp006.cpp:312:8: error: expected unqualified-id before numeric constant
Link to post
Share on other sites

 

In "tmp006.cpp" I replaced 3 occurences of "ADR1_0_ADR0_0" by "ADR1_0_ADR0_1"  on lines 191, 197 and 229 (cf Launchpad CC3200 schematic).

 

Compiling" QuickTMP006.ino"  gives this error :

*****\Documents\Energia\libraries\TMP006\tmp006.cpp: In function 'float Calculate_Temp(float*, float*)':
*****\Documents\Energia\libraries\TMP006\tmp006.cpp:312:8: error: expected unqualified-id before numeric constant

 

Looks like there was an unfortunate selection of macro names for the CC3200 ports in Energia.h (they are named S0, ...)  Simple names, which make them more likely to conflict with names in user code.  (As happens in this library.)

 

In tmp006.cpp, if you change the name of the variable S0 in Calculate_Temp then it will compile.  (Lines 312 and 322)

Link to post
Share on other sites

 

The function enableXtal() looks suspiciously like it may be what you want.

At one of the calls to it it says.

/* Attempt to enable the 32kHz XTAL */

 

Seems a little odd that this function is called twice for some parts.

(if __MSP430_HAS_BC2__ is defined, it is called up near the top of initClocks(), and then it is called again down at the end of initClocks().)

Not clear from the code why it needs to be called twice.

 

enableXtal is not present in previous version of Energia.

(I haven't tested it to be sure that it is the part you want, or to figure out how to bypass the timeout).

 

Might be nice if there was a user configurable way to turn the check off.

 

Sorry for late to the game...... I just updated to E13 and found the same delay issue during power up. Is that I just need to comment out all calls to enableXtal in wiring.c, to get rid of the delays during power up? My application needs to be start running once the device is powered up, and I don't have the external crystal in my design. Thanks.

Link to post
Share on other sites
  • 2 weeks later...

Sorry for late to the game...... I just updated to E13 and found the same delay issue during power up. Is that I just need to comment out all calls to enableXtal in wiring.c, to get rid of the delays during power up? My application needs to be start running once the device is powered up, and I don't have the external crystal in my design. Thanks.

 

Another solution would be to declare enableXtal() weak in wiring.c, then you could override it in your code by declaring your own enableXtal() function.  Then you could use a crystal for some projects, and not for others.

 

Specifically:

wiring.c add:
void enableXtal() __attribute__((weak));

Energia.h add:
extern void enableXtal(void) __attribute__((weak));

Then in a project/sketch where you want to get rid of the delay, include a function called enableXtal().

void enableXtal() {}

This makes the enableXtal function just a simple return statement.  A similar approach is used in HardwareSerial.cpp/.h to implement serialEvent().

 

The downside of this approach (vs. commenting out the calls to enableXtal) is that the (now empty) enableXtal function is still called (twice in succession) [so it costs 10 bytes of code plus the time to execute the calls and returns].  The upside is you can have some projects with boards that have crystals, and some that don't.

 

[Edit: Note, I have tested the above to be sure that it allows one to control whether enableXtal is called.  I have not tested it to verify all the ramifications of not calling enableXtal.  So if commenting out enableXtal breaks something, this will break it also.]

 

@@spirilis

 

It would be nice if something like that could be incorporated into Energia.

Link to post
Share on other sites
  • 3 weeks later...

In Energia version 13, time function micros has problems on CC3200.  See 


http://forum.43oh.com/topic/5902-measure-short-amounts-of-time-with-micros/


 


[Thought it worth posting a brief note here so that those new to Energia 13 are more likely to see it.  The thread that points this out is now a bit buried.]


[Edit: Not as wide spread a problem as I thought.]


 


[Edit 2 Nov 2014]


The posting listed below has a patch which should fix this issue.


 


There was also an issue with the delay functions which were unreliable on both CC3200 and Tiva (in version 13 and 12).  That problem is also fixed by the patch in the post linked below.


 


http://forum.43oh.com/topic/6011-tiva-delaymicroseconds-unreliable/?p=52589

Link to post
Share on other sites
  • 2 weeks later...

The Energia Button Tutorial has a typo.

"If the buttonState is HIGH, it means that push button was pressed else it is not." This is wrong. When ButtonState is HIGH, the button was not pressed (using a pull-up setup). The arduino version of the tutorial uses a pull-down setup and this typo crept in on translation.

Link to post
Share on other sites

Energia 13 for OS X does not work.

 

After installation, when I try to start the app, I only get an error message telling me that Energia is damaged.

I have attached the snapshot of the error message.

My computer is a Macbook Pro with Retina Display running OS X 10.0.3.

 

Energia 12 runs fine. The problem is only with the upgrade.

 

I tried to download a new install package with no success. Also I uninstalled Energia 12 before trying the version 13 without any change.

 

What can I do to get Energia 13 on OS X?

Do I need to upgrade to OS X 10.10 (Yosemite)?

 

Please help.

 

post-37768-0-52706500-1415412698_thumb.jpg

 

 

11/08/2014 PROBLEM SOLVED

 

I used the post reporting similar issue with Mountain Lion. I disabled the OS X protection to start Energia, and everything went OK.

After that I restored standard protection, and it is working now.

 

Thanks to the poster of the fix.

Link to post
Share on other sites

There is an error in the definition of pgm_read_byte in Energia.h  in Energia version 13.

The error occurs on the CC3200, LM4F and MSP430 platforms

 

Currently it reads

#define pgm_read_byte(x) (*x)
#define pgm_read_dword(x) (*x)

This does not work if the argument is an expression (e.g. from AdafruitGFX 

https://github.com/adafruit/Adafruit-GFX-Library/blob/master/Adafruit_GFX.cpp

      line = pgm_read_byte(font+(c*5)+i);

with Energia's macro, this winds up being equivalent to font[0] + (c*5) + i, when it should be font[c*5+i].

 

(To demonstrate misbehavior, try using AdafruitGFX to display a character.  Actually AdafruitGFX has the macro done right, but if you do not make their version of the macro override the Energia one, it comes out with gibberish instead of characters.)

 

The macros in Energia.h should read

#define pgm_read_byte(x) (*(const unsigned char *)(x))
#define pgm_read_dword(x) (*(const unsigned long *)(x))
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...