flaminggoat / Eachine-E58-CFW

15 stars 3 forks source link

Mine built binary cant fit on to the board #2

Open vido89 opened 6 months ago

vido89 commented 6 months ago

I compiled E58 binary but after striping the binary the size of my binary is 137,5 kB not 32 kB ? Any suggestion ? Tnx

vido89 commented 6 months ago

Im getting an ELF binary

binwalk e58

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ELF, 32-bit LSB executable, ARM, version 1 (SYSV)
74868         0x12474         Unix path: /home/slobodan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pid-2.1.0/src/lib.rst$

but the one dumped from drone is not an ELF binary

flaminggoat commented 6 months ago

You might need to build the rust library with --release

vido89 commented 6 months ago

OK I build cargo build --release but now Im getting an error

CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file:
  /media/slobodan/20606DD4606DB0E8/DRONE-E58/Eachine-E58-CFW-master/CFW/cmake-arm-embedded/toolchain-arm-none-eabi.cmake
Call Stack (most recent call first):
  CMakeLists.txt:5 (PROJECT)
vido89 commented 6 months ago

Ah sorry I forgot to download [cmake-arm-embedded @ 35a9698], but still I'm getting e58 252,6 kB

flaminggoat commented 5 months ago

I think thats okay as the elf contains debug symbols that won't actually be flashed to the chip. You should be able to flash the elf with gdb. If you run openocd as shown here https://github.com/flaminggoat/Eachine-E58-CFW/blob/master/Docs/Info.md#debugging you should then be able to use gdb to flash the elf as below.

gdb-multiarch e58
tar ext :3333
load