I am using Arduino IDE 1.6.9 and board manager as "Node MCU 0.9 (ESP-12 Module). When I compile the program using the verify button. It creates a .bin file and my expectation is a .hex file.
I went through earlier posts and all suggested me to look for a .hex file using these options:
Look for the hex file path in the black screen
Look for the hex file under C:\Users\simbu\AppData\Local\Temp\buildXXXX.tmp
folder
Sketch => Export compiled Library
Unfortunately all the above options are creating a .bin file for my program. I am expecting a file with the .hex extension. Are .bin and .hex files the same?
I have three questions here.
If .bin and .hex are different files, how can I generate a .hex file ?
Can I use the .bin file (Size 228Kb) to upload into my AtMega MicroController using AVRDude commands?
Can I use ESP8266 as a programmer interface to upload the program/bin file into ATMega MicroController?
If .bin and .hex are different files, how can i generate .hex file ?
Can i use the .bin file (Size 228Kb) to upload into my AtMega MicroController using AVRDude commands?
You compiled for ESP8266 so of course you can't use that file with an ATmega microcontroller. You need to compile for the board you're going to upload to. When you do that you will indeed get the .hex file you are expecting.
Can I use ESP8266 as a programmer interface to upload the program/bin file into ATMega MicroController ?
Yes, you can use the ESP8266 as an ISP (in-system programming) programmer for AVR microcontrollers:
Connect the ESP8266 to your computer.
Select the appropriate ESP8266 board from the Tools > Board menu.
File > Examples > ESP8266AVRISP > Arduino_Wifi_AVRISP
Upload the sketch to your ESP8266. You can now use it as an ISP programmer. For more information see https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266AVRISP/README.rst
Related
Similar to an .exe file, is there a way to make a 'distributable' of an Arduino program? Some sort of ready-to-upload file... I'd like to share the program but the code should be kept the most secret as possible, or at least make it hard to know.
You can distribute the .hex binary file, and then let the users upload the binary on the Arduino themselves.
The ordinary Arduino IDE already does that for you when you click on the button verify & upload, so you simply have to take the generated .hex file and give it away.
Or you can use Arduino Makefile to get your .hex binaries using any other development environment.
Note: even though the source code is not included nor displayed, it is possible to reverse engineer an .hex binary as much as it is possible to do it with an .exe binary.
I want to build my own sketch upload app for my Arduino UNO. I have an USB cable which connects my Android smartphone with my UNO. Now I'd like to do something similar to the ArduinoDroid app: Read a .ino file from my Android device, compile and upload it with MY OWN app to the Arduino Board. Can someone give a clue? That would be great, thanks!
So there are 2 tasks here that your Android program will have to perform:
Compile the ino file(s).
Download the compiled program into the Arduino board.
The Arduino IDE uses the gcc/g++ open source compiler to compile the code. It then uses AVRDude to download the compiled source into the Arduino.
Both of these programs run on Linux, which is what Android OS is based upon. Download and install a Linux OS like Ubuntu. Then install gcc & AVRdude on that Linux OS (Google for instructions).
Once you have done that, read up on how to use both programs and play around until you get it working. Then all you have to do is have your Android program execute the same steps to compile and download the Arduino program.
Your Android program will have to somehow package or include the gcc compiler and AVRDude programs. Alternatively, you could send the ino files to a server to be compiled and then receive back the compiled program. Then all you would have to do is download the program into the Arduino.
We (will) have a BLE112, and we want to program it with a CC Debuger connected to the PC.
http://www.bluegiga.com/BLE112_Bluetooth_Smart_module
http://www.ti.com/lit/ug/swru197f/swru197f.pdf
We want to test the thermometer demo available at:
https://techforum.bluegiga.com/ble112?downloads#3.1 -> Bluetooth Smart: v.1.0.3 Software Development Kit
-> ble-1.0.3-43.zip -> src/thermometer-demo
this code "thermometer-demo" is the client PC application that connects to the BLE112 and asks to read the temperature.
but, where is the firmware source code for the BLE112 thermometer-demo?
There should be a .hex file in that folder. This is what you want to specify for the path in the BG Update Utility. If it hasn't been compiled yet, there won't be a .hex file.
In that case, just point the BG Update Utility to the project.xml file (could also be project.bgproj) and it will compile on the fly for you.
Also, if you are looking at their /src directory, that's just for their iOS examples. To get to firmware, look at /examples in their SDK.
I have an Arduino device witch has a sketch loaded on it. My question is can I read the sketch from the memory (hex file) and the dissansamble it ?
Yes. I would recommend you use ReAVR:
http://www.avrfreaks.net/index.php?func=viewItem&item_id=272&module=Freaks%20Tools
To get the HEX file, use an in system programmer like the AVR ISP MKII and use AVR Studio to read the hex directly.
I have an arduino file, which has a .ino extension. Is there a way to make this into an executable file with .exe extension? I want to be able to call it to execute from a TCL program.
EDIT:: Or, how would one run an Arduino .ino file from a TCL program?
You seem to be misunderstanding what the Arduino is about. The code in your .ino file gets uploaded to and executed on the Arduino microcontroller. The code does not run (execute) on the computer where you write your code.
If you want to communicate with the Arduino from your PC, you would typically do it through a serial or wifi connection. Do some searches on that (if that is what you are trying to do). There is a great deal of information and tutorials on that.