B4R Question Access to hex file...

rbghongade

Active Member
Licensed User
Longtime User
@Erel,
thank you for B4R! I think if offline compiling (without connecting board) is made possible alongwith the access to hex file , it would indeed make B4R more versatile as we could use simulators too.
regards,

Edit: I found that the hex file is generated in /Your Project/objects/bin
I used this hex file in Proteus Simulation and all works fine!
If possible can this hex file be named as per the project name instead of a generic "src.ino.hex" ?
 
Last edited:

Starchild

Active Member
Licensed User
Longtime User
After compiling,
There is no HEX file in my project/objects/bin folder.
just this file only: build.options.json
Is the HEX file somewhere else?
Also, where is the BIN file located?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It should look like this if the compilation was successful:

SS-2016-06-08_15.34.01.png


What do you need it for? Which board are you using?
 
Upvote 0

Starchild

Active Member
Licensed User
Longtime User
I'm working on implementing a STM32 Nucleo dev board.
There is great support for STM32 on Arduino IDE on the internet.

I need to drag and drop the BIN file onto the USB drive created by the ST-LINK v2.1 interface.

Works great with compilations in Arduino IDE direct.
Although I have to fetch the BIN file manually from the build folder in temp.

For B4R, after compiling, my project/object/bin folder still does not contain any of the result files you have indicated.
Just the build.options.JSON file.
Could this be caused by the fact that B4R does a compile and RUN.
The code can't be transferred using the Upload method.
I just need a compile, no run.

The same board type/upload settings in Arduino IDE compile the code, fail the upload, the BIN file is still created.

I've updated to Arduino IDE v1.6.9 to get the STM32 and B4R compatability.
Just to note, I did not get any B4R result files when testing on v1.6.8

I also tried selecting the "Arduino/Genuino Uno" board type for B4R.
Still no result files after compilation.

Is there a build log created by the Arduino Buider that I can check?

I have set the configuration path for Arduino.exe in B4R.
My B4R test code is just the default NEW project code. Nothing extra.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've just tested it without a connected device and it did produce the binaries.

Anyway you have another option, compile your app with B4R and then open Objects\src and open src.ino with Arduino IDE. You can configure the Arduino IDE to be used with an external editor (File - Preferences - Use external editor). This will allow you to build it from Arduino IDE. You don't need to open the IDE each time.
 
Upvote 0

Starchild

Active Member
Licensed User
Longtime User
Ahh.
I tried following my own instructions.
This now generates the binaries too.

It turns out I had a library reference in my test project, to a Library I was working on some time ago. Although it did not through any errors, still seems it stopped the binaries being produced. I will investigate that one later.

Sorry to waste your time.
but thanks for the support.

I'll post a detailed description on implementing the STM32 dev boards once I get it all worked out. Looks very good though. Lots of RAM and large Flash space, and cheap.
 
Upvote 0
Top