Zombieverter .bin compile help - Codeblocks
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Zombieverter .bin compile help - Codeblocks
I wondered if this should go in the Zombieverter thread but figured it might only clog up the thread with something so basic for most!
I'd like to get set up to use Codeblocks to compile the Zombie git files to keep up to date with all the development work. I'm running a Windows 10 laptop, and keep having computer issues getting virtualbox to run Ubuntu consistently, but my understanding is that windows 10 might only be a problem when uploading a .bin file over wifi, but there is no issue using Windows 10 to create the .bin (then maybe use another device to upload).
I have Codeblocks installed on Windows 10, and seem to have the arm-none-eabi toolchain installed ok too. Have a resent copy of the stm32-vcu repository and can open the stm32-vcu.cbp project. Trying to build the project, I get errors around the make/makefile.
Wondering if someone who has a similar setup could screenshot the key settings/properties windows showing the important links or options I should check (like below). I will figure out how to get mine fixed then?
I'd like to get set up to use Codeblocks to compile the Zombie git files to keep up to date with all the development work. I'm running a Windows 10 laptop, and keep having computer issues getting virtualbox to run Ubuntu consistently, but my understanding is that windows 10 might only be a problem when uploading a .bin file over wifi, but there is no issue using Windows 10 to create the .bin (then maybe use another device to upload).
I have Codeblocks installed on Windows 10, and seem to have the arm-none-eabi toolchain installed ok too. Have a resent copy of the stm32-vcu repository and can open the stm32-vcu.cbp project. Trying to build the project, I get errors around the make/makefile.
Wondering if someone who has a similar setup could screenshot the key settings/properties windows showing the important links or options I should check (like below). I will figure out how to get mine fixed then?
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
The printf commands are the issue, windows doesn't know printf on command line. So replace it all by "echo", like so
And also you need make.exe and point CodeBlocks to it
Code: Select all
@echo CLEAN ${OUT_DIR}
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Thanks Johu, I will give this a go Would this qualify for a support session if I don't get it!
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Hi johu, I wanted to check that I am on the right track. When you mention the 'printf' issue, I am taking this as only referring to the 'Makefile' file in the stm32-vcu-master github directory. There are 15 instances of 'printf' in that file, and I've shown a few example of what they were and what I've changed them to below (originally just replaced printf with echo but from your example looked like the " \n" etc info also gets removed).
I have make.exe installed, Codeblocks should be looking at this as set in the Toolchain Executables section of Global Compiler Settings, but still getting an error:
-------------- Build: STM32F107 in stm32-vcu (compiler: GNU GCC Compiler for ARM)---------------
Checking if target is up-to-date: make.exe -q
Running command: make
Execution of 'make' in 'C:\Users\Neil\Downloads\Stm32-vcu-master' failed.
My thoughts are that echo.o wouldn't be correct and I only need to worry about the @ commands. Also thrown by 'make' reference to the Stm32-vcu-master folder, should this be Makefile if I've done it right?
I have make.exe installed, Codeblocks should be looking at this as set in the Toolchain Executables section of Global Compiler Settings, but still getting an error:
-------------- Build: STM32F107 in stm32-vcu (compiler: GNU GCC Compiler for ARM)---------------
Checking if target is up-to-date: make.exe -q
Running command: make
Execution of 'make' in 'C:\Users\Neil\Downloads\Stm32-vcu-master' failed.
Code: Select all
...my_string.o digio.o my_fp.o printf.o anain.o throttle.o ...
...@printf " OBJCOPY $(BINARY).bin\n"...
...@printf " OBJCOPY $(BINARY).hex\n"...
...@printf " LD $(subst $(shell pwd)/,,$(@))\n"...
...@printf " CLEAN ${OUT_DIR}\n"...
Code: Select all
...my_string.o digio.o my_fp.o echo.o anain.o throttle.o ...
...@echo OBJCOPY $(BINARY).bin...
...@echo OBJCOPY $(BINARY).hex...
...@echo LD $(subst $(shell pwd)/,,$(@))...
...@echo CLEAN ${OUT_DIR}...
My thoughts are that echo.o wouldn't be correct and I only need to worry about the @ commands. Also thrown by 'make' reference to the Stm32-vcu-master folder, should this be Makefile if I've done it right?
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
Looks right. Can you run make on the command line?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
When I first tried 'make' from the command line I got errors about not being a command. Fixed the path's and should now be working.
Running 'make' from the stm32 folder gives me this reply, not sure yet what this means:
EDIT: Retried building in Codeblocks now the 'make' path was changed and get the same error as above
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
Ok, one step further then. Just run "make get-deps" once, then remove "get-deps" behind the "images:" label in line 63.
Code::Blocks just executes the make command so you'll always get the same result as on command line
Code::Blocks just executes the make command so you'll always get the same result as on command line
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Thanks johu,
Ok. So ran make get-deps once and got a similar error:
Then opened the Makefile in Notepad and edited line 63: images: get-deps $(BINARY) to images: $(BINARY) and ran 'make'. This looks to do more but something still annoying it:
Wondering if your suggestion to remove 'get-deps' might mean remove the whole line, I tried removing the rest of that line $(BINARY) and ran 'make', but this still gave an error:
I'm thinking the 'make get-deps' didn't do what it was supposed to above
Ok. So ran make get-deps once and got a similar error:
Then opened the Makefile in Notepad and edited line 63: images: get-deps $(BINARY) to images: $(BINARY) and ran 'make'. This looks to do more but something still annoying it:
Wondering if your suggestion to remove 'get-deps' might mean remove the whole line, I tried removing the rest of that line $(BINARY) and ran 'make', but this still gave an error:
I'm thinking the 'make get-deps' didn't do what it was supposed to above
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Googling some forums and working through this. Originally I had only downloaded the repo zip files so went back and cloned it properly and using git bash tried the 'make' command again. More happening this time. Stopped on an error again, ran make get-deps and got another error.
As per previous suggestion, I edited line 63 of the makefile (images: get-deps $(BINARY) and removed get-deps from the line). I know get-deps didn't run right but tried anyway. Running make again gives similar error to before.
More homework to do
As per previous suggestion, I edited line 63 of the makefile (images: get-deps $(BINARY) and removed get-deps from the line). I know get-deps didn't run right but tried anyway. Running make again gives similar error to before.
More homework to do
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
Oh I thought you were already compiling per your other thread.
I faintly remember this happening on Zapateros Windows machine. I "solved" it by copying the already compiled libopencm3 over
In fact you only need the static lib for the STM32F1, attached it. Extract it into libopencm3/lib
Then, with get-deps removed you should be able to just run "make"
EDIT: also it doesn't seem to find the eabi binaries. If you type "arm-non-eabi-gcc" what happens?
I faintly remember this happening on Zapateros Windows machine. I "solved" it by copying the already compiled libopencm3 over
In fact you only need the static lib for the STM32F1, attached it. Extract it into libopencm3/lib
Then, with get-deps removed you should be able to just run "make"
EDIT: also it doesn't seem to find the eabi binaries. If you type "arm-non-eabi-gcc" what happens?
- Attachments
-
- libopencm3_stm32f1.a.zip
- (907.86 KiB) Downloaded 66 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Thanks johu, I will give this a try tomorrow
From the suggestions in the Zombie thread I've just tried gitpod and have been able to compile the latest stm32 repo, so I can try uploading and testing that tomorrow too.
From the suggestions in the Zombie thread I've just tried gitpod and have been able to compile the latest stm32 repo, so I can try uploading and testing that tomorrow too.
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Ran 'arm-non-eabi-gcc' and 'arm-none-eabi-gcc' and got following error so yes, looks to be issue here. They do show up in codeblocks on the toolchains though:
Copied over the 'libopencm3_stm32f1.a' file above and unzipped into the lib folder of libopencm3 in the clone repo. Just ran make before I figure out how to fix eabi issue out of curiosity:
Copied over the 'libopencm3_stm32f1.a' file above and unzipped into the lib folder of libopencm3 in the clone repo. Just ran make before I figure out how to fix eabi issue out of curiosity:
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
The settings in CodeBlocks are irrelevant, the toolchain has to be in your path variable
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 209
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 11 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
I had similar issue before issue before , when im home on Tuesday will record a video of how I set it up, I installed chocolatly to make it work. https://chocolatey.org/install
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Cheerspaaa wrote: ↑Sun May 01, 2022 9:05 am I had similar issue before issue before , when im home on Tuesday will record a video of how I set it up, I installed chocolatly to make it work. https://chocolatey.org/install
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Ahh, ok. Thought I had that done but was the GnuWin32 I did recently instead. This should be it now.
Rebooted and ran 'make' again. Still something with libopencm3:
-
- Posts: 209
- Joined: Fri Dec 06, 2019 8:59 pm
- Location: Dublin & Kilkenny Ireland
- Has thanked: 2 times
- Been thanked: 11 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
I have a working compiled .hex or bin if you need ,only thing not working is dash can output, pm if you want me to send it to you and ill dig it out as on other pc. I have only tested dit with gs450h gearbox and e65 can so far though , fixed a scaling issue for the throttle
- johu
- Site Admin
- Posts: 5791
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1025 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
Ah crap, the .h files are partially generated by some python scripts. So, attaching some more. Goes into /libopencm3/include/libopencm3
- Attachments
-
- libopencm3.zip
- (541.57 KiB) Downloaded 68 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Perfect, happy to try. Will send a PM, cheerspaaa wrote: ↑Tue May 03, 2022 5:22 pm I have a working compiled .hex or bin if you need ,only thing not working is dash can output, pm if you want me to send it to you and ill dig it out as on other pc. I have only tested dit with gs450h gearbox and e65 can so far though , fixed a scaling issue for the throttle
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Cheers johu, will give this a go. Sorry for taking up so much of your time on this one
-
- Posts: 509
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 284 times
- Been thanked: 65 times
Re: Zombieverter .bin compile help - Codeblocks
Johu, you the man! Looks like we have lift off! Bin and Hex have been created in the folder
- EV_Builder
- Posts: 1199
- Joined: Tue Apr 28, 2020 3:50 pm
- Location: The Netherlands
- Has thanked: 16 times
- Been thanked: 33 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
IMHO Visual Studio Code is the way togo on windows..
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Re: Zombieverter .bin compile help - Codeblocks
So after a few days trying to compile the stm3-vcu.bin file. I found a readme which gives a "simple way to compile" the files
The main thing is to get the software listed and install it all, don't get the latest version of anything.
The list is,
**For Windows:**
Download and install:
- msys - http://sourceforge.net/projects/mingw/f ... 1.0.11.exe
- Python - http://www.python.org/ftp/python/2.7/python-2.7.msi (any 2.7 release)
- arm-none-eabi/arm-elf toolchain (for example this one gcc-arm-embedded version 4.8 2014q3)
Run msys shell and set the path without standard Windows paths, so Windows programs such as 'find' won't interfere:
export PATH="/c//Python27:/c/ARMToolchain/bin:/usr/local/bin:/usr/bin:/bin"
At this point the cursor changed to a blinking triangle so I exited msys shell and then re started msys shell
Now, in "msys shell" run, "git clone https://github.com/damienmaguire/Stm32-vcu.git"
Then, "cd ~/Stm32-vcu"
followed by, "make get-deps"
then, make
you will find the hex and bin file in, C:\msys\1.0\home\<username>\Stm32-vcu
The main thing is to get the software listed and install it all, don't get the latest version of anything.
The list is,
**For Windows:**
Download and install:
- msys - http://sourceforge.net/projects/mingw/f ... 1.0.11.exe
- Python - http://www.python.org/ftp/python/2.7/python-2.7.msi (any 2.7 release)
- arm-none-eabi/arm-elf toolchain (for example this one gcc-arm-embedded version 4.8 2014q3)
Run msys shell and set the path without standard Windows paths, so Windows programs such as 'find' won't interfere:
export PATH="/c//Python27:/c/ARMToolchain/bin:/usr/local/bin:/usr/bin:/bin"
At this point the cursor changed to a blinking triangle so I exited msys shell and then re started msys shell
Now, in "msys shell" run, "git clone https://github.com/damienmaguire/Stm32-vcu.git"
Then, "cd ~/Stm32-vcu"
followed by, "make get-deps"
then, make
you will find the hex and bin file in, C:\msys\1.0\home\<username>\Stm32-vcu
- Attachments
-
- output of screen using the instructions for cloning.docx
- (24.6 KiB) Downloaded 60 times
- asavage
- Posts: 329
- Joined: Sat May 14, 2022 10:57 pm
- Location: Oak Harbor, Washington, USA
- Has thanked: 279 times
- Been thanked: 103 times
- Contact:
Re: Zombieverter .bin compile help - Codeblocks
Python 2.7 was EOL way back in 2020, and has been removed from most distributions; there's got to be an updated way to do this.