How to burn .hex intel format file on cc2530 EB - hex

Hello there I am a newbie working on the SMARTRF-05EB - Evaluation Board, I have installed SDCC and Contiki-2.6 in the Linux Virtual Machine. I am able to build all the examples present in this directory contiki-2.6/contiki/examples/cc2530dk , but I am clueless as to how to flash the final .hex image file on EB.
Is there a way to burn it from Linux directly using some command or do I have to switch back to Windows and use TI's Flash Programmer to burn the application image. When I try to flash the application using the Flash Programmer I get this message highlighted in RED : "Flash Image overlaps with the bootloader"
Can someone please let me know about how to correctly place the application code on a particular address so that I can save the bootloader from being corrupted by my application .hex file.
I would like to flash say for example the simple "hello world" .hex file.
Thanks

Hello there I had to figure it out by going through the documentation..so the commmand that I used in getting a successful output on the hardware was this
1) root#ubuntu:/home/contiki/contiki-2.6/examples/cc2530dk# make TARGET=cc2530dk clean
2) root#ubuntu:/home/contiki/contiki-2.6/examples/cc2530dk# make TARGET=cc2530dk
also in the previous directory, cd to hello-world and execute the 2 commands as below:
1) root#ubuntu:/home/contiki/contiki-2.6/examples/hello-world# make TARGET=cc2530dk clean
2) root#ubuntu:/home/contiki/contiki-2.6/examples/hello-world# make TARGET=cc2530dk
These 2 commands help in building the .hex for the SMART05-EB and then use the TI's SMARTRF STUDIO software or TI's Flash Programmer for burning the hex image on the SoC. Open up TeraTerm or anyother Serial Communication software and then choose the port with settings 115200 8-N-1 and you should be able to get the output on screen. I have issues in building the other examples in other directory - for eg ping-ipv6, so would be posting a new question regarding such examples.
Thanks

After compiling the code for the example you are working with it 'll create a platform specific file Ex. for sky (hello-world.sky) in you case it 'll be hello-world.cc2538dk. Just use the following command to convert it to ihex file
msp430-objcopy udp-multicast.exp2420 -O ihex udp-multicast.ihex
You can now rename the ihex file to hex file and upload the hex file to your mote using TI flash program (http://processors.wiki.ti.com/index.php/MSP430_Flasher_-_Command_Line_Programmer). From windows use the following command to upload the file.
MSP430Flasher.exe -n "MSP430F5438A" -m SBW4 -w your_hex_file.hex -i COMxx [VCC]

Related

How to cross compile Arduino code for esp8266?

I have a Raspberry Pi at a remote location. I have attempted to run the Arduino IDE on that system but it doesn't have enough memory. I would like to compile some code on my Ubuntu desktop, copy the executable file to the Pi and use some utility to load it to an ESP8266 running the OTA software. What I need is to know where the executable is after an IDE compile step and what utility might be used to transfer the file from the Pi to the ESP8266 over the lan.
Any ideas?
Thanks,
Jim.
in arduino ide,
go to, File-> Preferences. Tick mark the boxes for compilation “Show verbose output during: ☑ compilation"
Now You will get the location of all the files generated in arduino console.
See answer by Kinaly Jain. If you upload your code to a local esp, verbose mode will also show you the commands it used to do the upload. You can gather these commands into a script or a makefile to run on the remote Pi.
Thanks to both of the responders. I wanted to try to describe a possible scenario to satisfy my needs. I found out from another post that the "Sketch/Export compiled binary" menu selection will produce a bin file that can be uploaded using a script similar to the one in this page https://github.com/esp8266/Arduino/issues/3553
The script finds the available OTA ports in the network and then uses espota.py to upload the .bin file to the port that you select. I suggest slight update to that script. On my system, espota is in ~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/espota.py and it is now a python3 script. It is executable so you don't need to explicity execute python.
/home/$USER/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/espota.py -i $ip -p 8266 --auth="$password" -f "$path" 2> /dev/null && echo -e "Success:\t$ip" || echo -e "Fail: \t$ip" &
I've not tested it yet but I think it'll work with maybe some small tweaks. The avahi-browse utility is in the avahi-utils package on the Raspberry Pi OS. It was not installed by default on RPi OS but it appears to have been on Linux Mint.
To summarize I will run the Arduino IDE on my desktop using the "Export ..." menu, then I'll find the .bin file in the sketch directory and copy it to the Pi. Then I'll use the script mentioned before to hopefully write the bin file to the esp8266 via OTA. I hope this will help someone else with a similar problem.
Thanks again,
Jim.

Can't find a way to get graphic tablet drivers working on mint

So i was trying to install the XP Pen Driver for my Deco 01 v2 graphics tablet on my Linux Mint 19.2 Tina when i came to encounter the following error:
./Pentablet_Driver: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10' not found (required by ./Pentablet_Driver)
I went on to install qt 5.10, still the same error. Others suggested to just change the path wth sudo gedit /etc/ld.so.conf.d/randomLibs.conf which didn't change a thing.
Link to drivers:
https://www.xp-pen.com/download-440.html
The manufacturer has a page describing how to set up their software on Linux with pictures. However, when following them, you end up with a folder name somewhere along the line that has spaces in it, which causes issues.
So a modified set of instructions might look like this:
Connect your XP-Pen product to the computer.
Download the Linux Beta driver from XP-Pen official website.
When the download is complete, extract the compressed folder.
Rename the extracted folder to something without spaces.
Inside the renamed folder is another compressed folder which should be extracted.
Inside the final extracted folder, ensure "Pentablet_Driver.sh" has execution permissions by right clicking on it and going to "Properties->Permissions" and verifying that "Allow executing file as program" is checked.
Open the terminal. (CTRL+ALT+T)
Type "sudo ", then drag Pentablet_Driver.sh from the file browser onto the terminal.
Type the password to complete.
Make sure that you write exactly
sudo ./Pentablet_Driver.sh
instead
sudo ./Pentablet_Driver
I had the same error until I noticed that I forgot to add .sh at the end.

Extract code (.hex or similar) from arduino Mega ADK on windows 8

I am a new user of Arduino boards. I have an Arduino mega ADK and I have to extract the code that was downloaded on it, because I don't find the source code.
Is there a way to extract the code on Arduino board (such as the .hex file reading the flash memory) without having the source code ?
I use Windows 8.
Thank you very much.
Enrico
Generally, you can find the hex file in a temp directory on your windows machine (assuming it is the machine used to build the code. From the official Arduino docuemntation:
"Only the parts of the library needed for your sketch are included in the final .hex file, reducing the size of most sketches.
The .hex file is the final output of the compilation which is then uploaded to the board. During a "Verify" the .hex file is written to /tmp (on Mac and Linux) or \Documents and Settings\\Local Settings\Temp (on Windows). During upload, it's written to the applet sub-directory of the sketch directory (which you can open with the "Show Sketch Folder" item in the Sketch menu)."
In my experience, I had a bunch of randomly named directories in the location specified above and I had to sort them by date/time and find the one that had my hex file.
Hope that helps!
In Linux this worked for me in Mega 1280:
avrdude -p m1280 -c arduino -P /dev/ttyACM0 -b57600 -U flash:r:flash_backup_file.hex:r
change the baudrate and arduino type.

Where are the hex files compiled by Arduino?

Where does the Arduino IDE save the binaries on Mac OS X?
In the Arduino software: go to File -> Preferences and then select Show verbose output during -> compilation.
Finally, when you are compiling, the program will show you lots of data. At the last lines, you will find the path1 to the .hex file.
1Every time the path changes!
Arduino 1.6.5 has a new command: Under the Sketch menu, select Export compiled Binary, then Show Sketch Folder. There it is.
Arduino IDE uses the mktemp command to create the temp directory on Mac and Linux. However, on Mac the default $TMPDIR env var is not /tmp/ as it is on Linux. On Mac it's under /var/folders and it is randomly generated on boot. That complicates things a little, but here are tricks you can add to your toolkit (as aliases, functions, shell scripts, etc.) to help you find what you need.
To find the hex files
find $TMPDIR -name \*.hex -exec ls -lrt {} \; #<-- you need that backslash before and space after the semicolon
To find build directories
ls -ldrt $TMPDIR/build*
NOTE: The ls flags of r and t cause the listing to be "reverse" sorted by "time" respectively. This means that the newest will be on the bottom.
What UDalillu said. The trick also works on Windows. On XP it ended up in C:\Documents and Settings\Your_User_Name\Local Settings\Temp\buildxxxxx\ (the xxx number changes for each build, pick the most recent).
The arduino web page http://arduino.cc/en/Hacking/BuildProcess
described
During a "Verify" the .hex file is written to /tmp (on Mac and Linux) or \Documents and Settings\\Local Settings\Temp (on Windows)
I am using fedora19 64bit, and when i check my /tmp the build directory created is
/tmp/build8102....tmp/
I made a simple tutorial here with images
It is very beautifully explained in the following blog
Where to find Arduino Hex files or Output Binaries
I hope this helps :)

Auto run a jar file from usb drive

I have an runnable jar file in my USB drive. I need to auto-launch that jar, when the USB drive is plugged in to the system. I use Windows 7. I used autorun.inf to launch the jar file. But it doesn't work. Any suggestions please.
autorun.inf
[Autorun]
Open=myjar.jar
Action=Start portable apps
SEE UPDATE BELOW
The easiest way to do it would be to write a batch file (or a command file) to autorun.
that contains something like:
runjar.bat
java -jar myjar.jar
and in your autorun.inf do something like:
[Autorun]
open=runjar.bat
action=start portable apps
UPDATE
AAAH the problem is that Windows 7 has removed the support for autorun.inf.... See Autorun.inf Does Not Work In Windows 7 Anymore

Resources