# Difference build size

**URL:** https://forums.openmv.io/t/difference-build-size/548
**Category:** OpenMV Boards
**Created:** [January 15, 2018, 5:18am UTC](https://forums.openmv.io/t/difference-build-size/548 "2018-01-15T05:18:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![URIDURI](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/uriduri/32/31_2.png) [@URIDURI](https://forums.openmv.io/u/URIDURI)
#### Post date: [January 15, 2018, 5:18am UTC](https://forums.openmv.io/t/difference-build-size/548/1 "2018-01-15T05:18:08Z")

</div>

hello.  
I am using ‘OpenMV M7’ v1.8.0.

I recently reported a firmware bug and confirmed that it was patched through [github.com](http://github.com).  
However, [github.com](http://github.com) did not have the latest firmware.

So I downloaded the firmware source and compiled it myself.  
It ended successfully.

However, the difference occurs in the build size.  
I did not modify the source either. Only Compile did it.  
v1.8.0 = bootloader.bin = 131,072 Byte, fiemware.bin = 1,362,096 Byte  
My Compile = bootloader.bin = 131,072 Byte, fiemware.bin = 1,441,552 Byte

This seems to affect the saving of the template file.  
When I download the compiled binary file and save the template  
The system becomes a blind. This can not be restored only by RESET.  
To restore it, you need to download the firmware again.

Are there special options when compiling?  
How do I get the latest firmware?

Thank you.

---

<div class="post-metadata">

### Author: ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)
#### Post date: [January 15, 2018, 7:48am UTC](https://forums.openmv.io/t/difference-build-size/548/2 "2018-01-15T07:48:21Z")

</div>

When making do:

make TARGET=OPENMV3 (or TARGET=OPENMV2 for the M4)

Then, only load the firmware.bin file or the openmv.dfu. The other binaries are not loadable.

The firmwares will be in their respective folders. The OpenMV Cam M7 is the OPENMV3 board.

---

<div class="post-metadata">

### Author: ![URIDURI](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/uriduri/32/31_2.png) [@URIDURI](https://forums.openmv.io/u/URIDURI)
#### Post date: [January 16, 2018, 3:24am UTC](https://forums.openmv.io/t/difference-build-size/548/3 "2018-01-16T03:24:11Z")

</div>

> [@](#):
>
> When making do:
> 
> make TARGET=OPENMV3 (or TARGET=OPENMV2 for the M4)
> 
> Then, only load the firmware.bin file or the openmv.dfu. The other binaries are not loadable.
> 
> The firmwares will be in their respective folders. The OpenMV Cam M7 is the OPENMV3 board.

Compiling the last final source of github is firmware version 2.7.0.  
However, if you download it to the board, it will be displayed as 2.6.0.

The code I modified for testing  
/openmv-ide-1.8.0/openmv/src/omv/usbdbg.h

#define FIRMWARE\_VERSION\_MAJOR (3)  
#define FIRMWARE\_VERSION\_MINOR (0)  
#define FIRMWARE\_VERSION\_PATCH (0)

Even if you change the version in the source code, it will continue to be displayed as 2.6.0.

What is the problem ?

---

<div class="post-metadata">

### Author: ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)
#### Post date: [January 16, 2018, 4:15am UTC](https://forums.openmv.io/t/difference-build-size/548/4 "2018-01-16T04:15:57Z")

</div>

That’s the correct file. However, I don’t have the problem you are having.

Um, so the build system is kinda bad. Generally you want to do a complete rebuild whenever you change anything outside of a C file. Please try that.

---

<div class="post-metadata">

### Author: ![URIDURI](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/uriduri/32/31_2.png) [@URIDURI](https://forums.openmv.io/u/URIDURI)
#### Post date: [January 16, 2018, 4:29am UTC](https://forums.openmv.io/t/difference-build-size/548/5 "2018-01-16T04:29:41Z")

</div>

> [@](#):
>
> That’s the correct file. However, I don’t have the problem you are having.
> 
> Um, so the build system is kinda bad. Generally you want to do a complete rebuild whenever you change anything outside of a C file. Please try that.

Of course I did it.  
make clean  
make target = OPENMV3

copy /openmv-ide-1.8.0/openmv/firmware/OPENMV3 → /opt/openmvide/share/qtcreator/firmware/OPENMV3

I clicked to update it.

 ![openmvide.png](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/c4ba43fc8b9c277e82ccfeb1a13247ab98acbd0c.png)

---

<div class="post-metadata">

### Author: ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)
#### Post date: [January 16, 2018, 4:36am UTC](https://forums.openmv.io/t/difference-build-size/548/6 "2018-01-16T04:36:15Z")

</div>

Ah, I see what’s wrong. Yeah, so the files in OpenMV IDE’s dir aren’t used unless you tell the IDE to update resources.

Um, when updating your camera please use the “Tools-\>Run Bootloader” option to select the binary file.

If you want to update the IDE’s resources you have to tell it to do this by calling the IDE with this command line flag: -update\_resources

…

OpenMV IDE copies all the stuff from it’s install dir into a local user dir so that it has write access to the files. For example, on windows the IDE can’t write to it’s install directory so it copies all resources it may update to a per user application directory. It only detects to re-copy when the IDE version changes.

Yes, I could hash all the files but that would require a re-scan of all the resource files on every startup.

---

<div class="post-metadata">

### Author: ![URIDURI](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/uriduri/32/31_2.png) [@URIDURI](https://forums.openmv.io/u/URIDURI)
#### Post date: [January 16, 2018, 4:47am UTC](https://forums.openmv.io/t/difference-build-size/548/7 "2018-01-16T04:47:57Z")

</div>

> [@](#):
>
> Ah, I see what’s wrong. Yeah, so the files in OpenMV IDE’s dir aren’t used unless you tell the IDE to update resources.
> 
> Um, when updating your camera please use the “Tools-\>Run Bootloader” option to select the binary file.
> 
> If you want to update the IDE’s resources you have to tell it to do this by calling the IDE with this command line flag: -update\_resources
> 
> …
> 
> OpenMV IDE copies all the stuff from it’s install dir into a local user dir so that it has write access to the files. For example, on windows the IDE can’t write to it’s install directory so it copies all resources it may update to a per user application directory. It only detects to re-copy when the IDE version changes.
> 
> Yes, I could hash all the files but that would require a re-scan of all the resource files on every startup.

I have finally verified the updated version.  
Thank you very much for your kind reply.
