Sign in to follow this  
Followers 0
Janos

Where do I find the Script that runs after clicking Upload

13 posts in this topic

Hi,

 

i'm experimenting with the openMSP430 on an FPGA. If it's cofigured right, I should be able to run sketches compiled by Energia on the Softcore. But flashing the openMSP430 can't be done with mspdebug. A different Uploader, openmsp430-loader, is needed.

 

I checked "Show verbose output during upload" in the Energia preferences and so I noticed, that

mspdebug rf2500 --force-reset prog /tmp/build4194166154426707548.tmp/MySketch.cpp.hex 

is called after compilation. Now I'd like to find the script, running in the Background and change it, so that it calls openmsp430-loader with the right arguments instead. But I just can't find any file into the Energia folders that contains this line. Does anyone know where to find it?

 

An even greater thing would be to create an additional Board, that can be selected via Tools->Board, so that I wouldn't have to modify an existing Board, but that option is not so important to me.

Share this post


Link to post
Share on other sites

@@Janos the upload command is hardcoded into the Energia IDE and unfortunately can not be changed. The next release of Energia will be based on the new 1.6.x IDE that will have all these commands configured inside text files. At that point it will be very easy to change the upload command.

 

Robert

bluehash, jazz, Janos and 1 other like this

Share this post


Link to post
Share on other sites

Thank you!

 

I didn't expect it to be hard coded. Sadly' I'm not very experienced in Java programming, so changing this command in the source code and then build it might be a challenge for me, at least I expect it to take one whole day for me to get everything running :D

 

The possibilities of Version 1.6x also sound great, do you have a rough idea of when it could be available?

Share this post


Link to post
Share on other sites

@@Janos the upload command is hardcoded into the Energia IDE and unfortunately can not be changed. The next release of Energia will be based on the new 1.6.x IDE that will have all these commands configured inside text files. At that point it will be very easy to change the upload command.

 

Robert

 

Than my sbw+ flasher will work with Energia on Win / Linux / OS X without problems.

 

It will be great if Energia will be able to receive error number from cmd, and if it be able to integrate error number with error text description in Energia config text file. Of course, if Energia will open terminal window and display complete upload log than this is not needed.

Share this post


Link to post
Share on other sites

@@Janos

 

As an alternative, launch the modified upload command on a terminal window.

 

That's excactly what I'm doing right now. But always copying the path to the temp folder created by Energia after build and paste it into the command line after the upload command is just a bit more complicated than just clicking Upload in Energia. An easy Integration of this feature could be nice if I wanted to share my work with others...

Share this post


Link to post
Share on other sites
On 2/4/2016 at 6:23 PM, energia said:

The next release of Energia will be based on the new 1.6.x IDE that will have all these commands configured inside text files. At that point it will be very easy to change the upload command.

Robert

Where is this configuration text file? BTW, I am using Windows version, 1.6.10E18.

Share this post


Link to post
Share on other sites
20 hours ago, Rei Vilo said:

See boards.txtplatform.txt and programmers.txt.

Exact location on the hard-disk depends on the OS you use.

Files are located at "energia-1.6.10E18\hardware\energia\msp430".

I add my flasher to "programmers.txt"

sbwplus.name=sbwplus
sbwplus.protocol=sbwplus

and to "platform.txt"

# sbwplus
tools.sbwplus.upload.params.verbose=
tools.sbwplus.upload.params.quiet=
tools.sbwplus.path={runtime.tools.mspdebug.path}
tools.sbwplus.cmd.path={path}/bin/flash
tools.sbwplus.upload.pattern={cmd.path} -f "{build.path}/{build.project_name}.hex" -e -w -v

flash.exe is copied to bin dir.

I tried to uplad blink sketch to msp430g2553 with "Upload Using Programmer", but this faild with "missing program.tool configuration parameter".

After I modified in "boards.txt", MSP-EXP430G2553LP.upload.tool from mspdebug to sbwplus, device is flashed with "Upload". I checked outside of Energia, and device was flashed corectly. 

energia.gif

Is there any way for enabling Energia to display inside black cmd window, output from my flash.exe that is standard cmd application. Like here...

post-190-0-85255600-1353023637.gif

What is line in hex file generated from blink example, before file end, 4 bytes located at address 0?

:10FFF00068C068C0B0C168C068C068C068C000C0E0
:040000030000C00039
:00000001FF

EDIT:

OK, I found that record type 03 is used as start segment address related to 80x86 processors. Don't know about relation with MSP430 (value C000h?). AFAIK, IAR doesn't generate this.

Share this post


Link to post
Share on other sites
On 3/25/2017 at 6:36 PM, jazz said:

Is there any way for enabling Energia to display inside black cmd window, output from my flash.exe that is standard cmd application.

I guess that this is OS related, because on Ubuntu, flasher log is present. 

energia2.gif

Share this post


Link to post
Share on other sites

It is working fine on OS X, after "boards.txt" and "platform.txt" update, located at Energia.app/Contents/Java/hardware/energia/msp430/ and copied flash to Energia.app/Contents/Java/hardware/tools/msp430/bin/

energia3.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0