Difference build size

Discussion related to "under the hood" OpenMV topics.
User avatar
URIDURI
Posts: 4
Joined: Sun Jan 14, 2018 11:41 pm
Location: Korea

Difference build size

Postby URIDURI » Mon Jan 15, 2018 12:18 am

hello.
I am using 'OpenMV M7' v1.8.0.

I recently reported a firmware bug and confirmed that it was patched through github.com.
However, 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.
User avatar
kwagyeman
Posts: 1746
Joined: Sun May 24, 2015 2:10 pm

Re: Difference build size

Postby kwagyeman » Mon Jan 15, 2018 2:48 am

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.
Nyamekye,
User avatar
URIDURI
Posts: 4
Joined: Sun Jan 14, 2018 11:41 pm
Location: Korea

Re: Difference build size

Postby URIDURI » Mon Jan 15, 2018 10:24 pm

kwagyeman wrote:
Mon Jan 15, 2018 2:48 am
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 ?
User avatar
kwagyeman
Posts: 1746
Joined: Sun May 24, 2015 2:10 pm

Re: Difference build size

Postby kwagyeman » Mon Jan 15, 2018 11:15 pm

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.
Nyamekye,
User avatar
URIDURI
Posts: 4
Joined: Sun Jan 14, 2018 11:41 pm
Location: Korea

Re: Difference build size

Postby URIDURI » Mon Jan 15, 2018 11:29 pm

kwagyeman wrote:
Mon Jan 15, 2018 11:15 pm
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
openmvide.png (152.16 KiB) Viewed 409 times
User avatar
kwagyeman
Posts: 1746
Joined: Sun May 24, 2015 2:10 pm

Re: Difference build size

Postby kwagyeman » Mon Jan 15, 2018 11:36 pm

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.
Nyamekye,
User avatar
URIDURI
Posts: 4
Joined: Sun Jan 14, 2018 11:41 pm
Location: Korea

Re: Difference build size

Postby URIDURI » Mon Jan 15, 2018 11:47 pm

kwagyeman wrote:
Mon Jan 15, 2018 11:36 pm
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.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests