Development on Ubuntu
Posted: Sun Sep 21, 2014 10:34 pm
Here are my sketchy notes on what I did to set up build, debugger and flash tools on Ubuntu. If anyone wants to see more detailed steps, let me know:
Starting from loading Ubuntu 14.04 64bit, aka Trusty for amd64. You need to install gcc build tools for ARM.
Ubuntu has a standard package for gcc-arm-none-eabi, but it is missing the stdlib++ which breaks the firmware build.
I loaded gcc tool chain "amd64 build of gcc-arm-none-eabi 4-8-2014q2-0trusty10 in ubuntu trusty RELEASE" from:
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded/+build/6128656
Download the file gcc-arm-none-eabi_4-8-2014q2-0trusty10_amd64.deb and install it:
sudo dpkg -i gcc-arm-none-eabi_4-8-2014q2-0trusty10_amd64.deb
You should be able to do a complete build from the top of the rusefi-code/firmware directory to create output files in the build/ directory.
Another tool set is the Texane's stlink package available from github:
https://github.com/texane/stlink
https://github.com/texane/stlink/blob/master/doc/tutorial/tutorial.pdf
This includes st-util to set up a gdb server connection to the Discovery board via usb. The tutorial explains how to set up gdb and flash firmware in gdb.
It also includes a command line st-flash firmware update tool, but for some reason, the st-flash tool does not work for me. I have not looked into what's wrong there.
But there is another gui based firmware update tool, qstlink2 available from here:
https://launchpad.net/~fpoussin/+archive/ubuntu/ppa
More information is available here:
http://hackaday.com/2011/10/17/how-to-develop-for-stm32-discovery-boards-using-linux
Starting from loading Ubuntu 14.04 64bit, aka Trusty for amd64. You need to install gcc build tools for ARM.
Ubuntu has a standard package for gcc-arm-none-eabi, but it is missing the stdlib++ which breaks the firmware build.
I loaded gcc tool chain "amd64 build of gcc-arm-none-eabi 4-8-2014q2-0trusty10 in ubuntu trusty RELEASE" from:
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded/+build/6128656
Download the file gcc-arm-none-eabi_4-8-2014q2-0trusty10_amd64.deb and install it:
sudo dpkg -i gcc-arm-none-eabi_4-8-2014q2-0trusty10_amd64.deb
You should be able to do a complete build from the top of the rusefi-code/firmware directory to create output files in the build/ directory.
Another tool set is the Texane's stlink package available from github:
https://github.com/texane/stlink
https://github.com/texane/stlink/blob/master/doc/tutorial/tutorial.pdf
This includes st-util to set up a gdb server connection to the Discovery board via usb. The tutorial explains how to set up gdb and flash firmware in gdb.
It also includes a command line st-flash firmware update tool, but for some reason, the st-flash tool does not work for me. I have not looked into what's wrong there.
But there is another gui based firmware update tool, qstlink2 available from here:
https://launchpad.net/~fpoussin/+archive/ubuntu/ppa
More information is available here:
http://hackaday.com/2011/10/17/how-to-develop-for-stm32-discovery-boards-using-linux