guides:stm32toolchain
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:stm32toolchain [2014/08/17 16:56] – jonsowman | guides:stm32toolchain [2016/04/07 20:48] (current) – [Step 5 (libopencm3 Libraries)] mbrejza | ||
---|---|---|---|
Line 12: | Line 12: | ||
* For use of newlib-nano, | * For use of newlib-nano, | ||
* Extract to somewhere like /usr/local and add / | * Extract to somewhere like /usr/local and add / | ||
- | export PATH=/ | + | '' |
*Then to use the amended PATH: | *Then to use the amended PATH: | ||
'' | '' | ||
Line 18: | Line 18: | ||
* Alternatively (and for when they fix newlib nano in the repos), install from ppa: | * Alternatively (and for when they fix newlib nano in the repos), install from ppa: | ||
- | '' | + | '' |
- | $ sudo apt-get update | + | '' |
- | $ sudo apt-get install gcc-arm-none-eabi'' | + | '' |
* Check install is working by running | * Check install is working by running | ||
Line 32: | Line 32: | ||
==== Step 3 - Fetch and build libopencm3 ==== | ==== Step 3 - Fetch and build libopencm3 ==== | ||
- '' | - '' | ||
- | - Run $ '' | + | - Run '' |
- | - '' | + | - '' |
==== Step 4 - Adjust for your device ==== | ==== Step 4 - Adjust for your device ==== | ||
Line 57: | Line 57: | ||
==== Step 7 - Flash the firmware ==== | ==== Step 7 - Flash the firmware ==== | ||
* Connect the board to the machine via the USB port | * Connect the board to the machine via the USB port | ||
- | * Erase the device with $ st-flash erase | + | * Erase the device with '' |
- | * Make the .bin version of the binary with $ make bin | + | * Make the .bin version of the binary with '' |
- | * Flash the firmware to the device with $ st-flash write main.bin 0x8000000 | + | * Flash the firmware to the device with '' |
* 0x800000 is the start address of the flash memory in the device memory address space | * 0x800000 is the start address of the flash memory in the device memory address space | ||
- | **On Linux, st-flash needs root privileges ($ sudo ./st-flash ...) to access the USB system until you set up udev rules** | + | **On Linux, st-flash needs root privileges ('' |
---- | ---- | ||
Line 109: | Line 109: | ||
==== Step 5 (libopencm3 Libraries) ==== | ==== Step 5 (libopencm3 Libraries) ==== | ||
- | Firstly add the libopencm3 files to the project directory. This can be fetched from the [[https:// | + | Firstly add the libopencm3 files to the project directory. This can be fetched from the [[https:// |
The final file needed is part of the linker script. Copy [[https:// | The final file needed is part of the linker script. Copy [[https:// |
guides/stm32toolchain.1408294580.txt.gz · Last modified: 2014/08/17 16:56 by jonsowman