ChristianIvarsson / bdmtoy

5 stars 4 forks source link

Lacking of docs making compilation harder than it should. #1

Open deividAlfa opened 1 month ago

deividAlfa commented 1 month ago

Thanks a lot for these great tools, but I had a hard time making them work!

Please consider making releases, otherwise everyone has to setup and compile everything, everytime, which is an amazing waste of time when it can be done only once.

To anyone asking how to run this, these were my findings:

STM32 firmware

The firmware makefile hardcodes the toolchain, I commented this line: https://github.com/ChristianIvarsson/bdmtoy/blob/3e57867b1ed36418c652d986eeafc323f8357058/firmware/makefile#L4 #GCCPATH="D:/ARM_GCC/6 2017-q2-update/bin/"

Worked fine with the default sourced by apt-get, using Debian 10 (Buster): sudo apt install gcc-arm-none-eabi

Run make. If it compiles correctly, flash firmware.bin from firmware/bin folder.

The firmware might work in the smaller and cheaper STM32F103C6, just modify the linker script to 32K flash / 10K ram: https://github.com/ChristianIvarsson/bdmtoy/blob/3e57867b1ed36418c652d986eeafc323f8357058/firmware/link.ld#L4-L5

But I didn't test it!

Linux GUI

I wanted to compile the GUI but again no instructions of any kind. In the end I did: sudo apt install qt5-* -y

Then:

cd host/gui/nix/bdmstuff
qmake

Compilation will fail as it's missing libusb and no version is specified, this worked:

cd bdmtoy/host
git clone --recursive --single-branch -b "v1.0.27" https://github.com/libusb/libusb

But not yet, compilation would fail, apparently in needs -fpermissive flag, so I added it here: https://github.com/ChristianIvarsson/bdmtoy/blob/3e57867b1ed36418c652d986eeafc323f8357058/host/gui/nix/bdmstuff/bdmstuff.pro#L26 QMAKE_CXXFLAGS += -pthread -fpermissive

Now it'll compile correctly.

Run the gui with ./bdmstuff

Windows GUI

Absolutely no idea, I've had enough for today!

deividAlfa commented 1 month ago

Firmware build for STM103C8 firmware.zip

I was able to recover my EDC16C39 after an accident where the laptop crashed during flashing!

Both nix GUI and CLI tools worked! Thanks a lot!

I would like to donate some cash for your efforts and generosity publishing this tool, please send me a paypal link! (Yet lacking lot of docs about how to build this 🤔 haha)

Avoid using USB hubs and USB 3.0 ports, at least for me the program would recognize the adapter but always fail during the process, connected to a usb 2.0 port and worked!