Jump to content
43oh

Energia 0101E0013 - How turn on optimization for Tiva/CC3200?


Recommended Posts

Tiva/Stellaris programs were compiled with optimization -Os in Energia E0012.  (Optimize for size).

In Energia E0013 optimization is turned off for Tiva/Stellaris and CC3200.  (-O0)

 

How do I turn optimization back on in Energia E0013?

I have been working on a Arduino/Energia library which has a timing critical interrupt handler.

 

Of course there is the #pragma route to controlling optimization.  But is there a way in the IDE, or in preferences.txt, is #pragma the preferred method.

 

On a somewhat related note, are there any release notes for the new version (which might cover changes and how to handle them)?  (e.g., where I could have found out about the change in optimization).

I have looked around a bit and haven't found any kind of list of what is new.

http://www.energia.nu/release.html only goes up through version 12.

The readme on github doesn't even mention the CC3200 https://github.com/energia/Energia/blob/master/ReadMe.md

 

After I had problems generating a listing in the new release I did discover that debugging information is turned off by default, and there is a new option for turning debugging information on/off (in File - Preferences).  But haven't found anything similar for optimization.

 

Thanks

Link to post
Share on other sites

Confirmed... Blink sketch with TM4C123:

[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-g++, -c, -O0, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/stellarpad, /tmp/build8593810888659232949.tmp/Blink.cpp, -o, /tmp/build8593810888659232949.tmp/Blink.cpp.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/stellarpad, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/wiring_analog.c, -o, /tmp/build8593810888659232949.tmp/wiring_analog.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/stellarpad, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/itoa.c, -o, /tmp/build8593810888659232949.tmp/itoa.c.o]
...etcetc...

TM4C129:

[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-g++, -c, -O0, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /tmp/build8593810888659232949.tmp/Blink.cpp, -o, /tmp/build8593810888659232949.tmp/Blink.cpp.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/wiring_analog.c, -o, /tmp/build8593810888659232949.tmp/wiring_analog.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/itoa.c, -o, /tmp/build8593810888659232949.tmp/itoa.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/wiring_shift.c, -o, /tmp/build8593810888659232949.tmp/wiring_shift.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/driverlib/hibernate.c, -o, /tmp/build8593810888659232949.tmp/hibernate.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -mfloat-abi=hard, -mfpu=fpv4-sp-d16, -fsingle-precision-constant, -DF_CPU=120000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f, -I/home/ebrundic/energia-0101E0013/hardware/lm4f/variants/launchpad_129, /home/ebrundic/energia-0101E0013/hardware/lm4f/cores/lm4f/driverlib/comp.c, -o, /tmp/build8593810888659232949.tmp/comp.c.o]

CC3200:

[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-g++, -c, -O0, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /tmp/build8593810888659232949.tmp/Blink.cpp, -o, /tmp/build8593810888659232949.tmp/Blink.cpp.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/wiring_analog.c, -o, /tmp/build8593810888659232949.tmp/wiring_analog.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/udma_if.c, -o, /tmp/build8593810888659232949.tmp/udma_if.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -O0, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/itoa.c, -o, /tmp/build8593810888659232949.tmp/itoa.c.o]

Stellaris lm4f also using -O0.

 

MSP430 doesn't appear affected.  This is using the release version of Energia 13.

Link to post
Share on other sites

One thing you can try is to replace the pde.jar with the one in the attached zip file.

If you are on windows simply replace the one in the Energia installation forlder.

If you are on OS X: Right click Energia -> Show Package Content -> Browse to Contents->Resources->Java.

 

Make sure that you backup the original pde.jar before copying the new one.

 

The attached pde.jar was compiled on OS X but give that it is java it should run on all platforms.

 

Robert

pde.jar.zip

Link to post
Share on other sites

That pde.jar works in Linux, had to put the "pde.jar" file it in ~/energia-0101E0013/lib ...

[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-g++, -c, -Os, -w, -fno-rtti, -fno-exceptions, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /tmp/build825913301492273382.tmp/Blink.cpp, -o, /tmp/build825913301492273382.tmp/Blink.cpp.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -Os, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/wiring_analog.c, -o, /tmp/build825913301492273382.tmp/wiring_analog.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -Os, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/udma_if.c, -o, /tmp/build825913301492273382.tmp/udma_if.c.o]
[/home/ebrundic/energia-0101E0013/hardware/tools/lm4f/bin/arm-none-eabi-gcc, -c, -Os, -w, -ffunction-sections, -fdata-sections, -mthumb, -mcpu=cortex-m4, -DF_CPU=80000000L, -MMD, -DARDUINO=101, -DENERGIA=13, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200, -I/home/ebrundic/energia-0101E0013/hardware/cc3200/variants/launchpad, /home/ebrundic/energia-0101E0013/hardware/cc3200/cores/cc3200/itoa.c, -o, /tmp/build825913301492273382.tmp/itoa.c.o]

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...