Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
stmSetup.txt 4.26 KiB
Dieses Dokument dient als Anleitung für die Kompilierung des Codes auf dem STM

1. STM-Files
	Dateien herunterladen von
		https://www.dropbox.com/l/scl/AABtsAyzx1MIZBJeAg0Nz5LGSd3bH9qCfmM

	Dann speichern und entpacken unter z.B. ~/Documents

	Im Repo sind bereits alle Änderungen gemacht


2. Einrichten der ARM-Toolchain
	(Zusatzinformationen: https://gnu-mcu-eclipse.github.io/toolchain/arm/install/)

	Gehe auf https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q2-update

	Herunterladen von gcc-arm-none-eabi-4_8-2014q2-20140609-linux.tar.bz2

	Öffne Konsole:

	$ sudo apt-get -y install lib32ncurses5
	$ mkdir -p ~/opt
	$ cd ~/opt
	$ tar xjf ~/Downloads/gcc-arm-none-eabi-4_8-2014q2-20140609-linux.tar.bz2
	$ chmod -R -w ~/opt/gcc-arm-none-eabi-4_8-2014q2-20140609

	Testen ob die Toolchain läuft:

	$ ~/opt/gcc-arm-none-eabi-4_8-2014q2/bin/arm-none-eabi-gcc --version

	Erwartete Ausgabe:
		arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.4 20140526 (release) [ARM/embedded-4_8-branch revision 211358] ...

3. Ändern der STM-Files

	$ cd ~/Documents/Austausch\ Assystem\ -\ HU/02_lieferung/vehicle_ecu_sw/quellcode/

	Ändern der jeweiligen Dateien

	makefile:
		/home/jenkins/ARM_GCC/2014q2/bin
		->
		~/opt/gcc-arm-none-eabi-4_8-2014q2/bin


	app/rx24fctrl/rx24fctrl.h:21
		#include "stm32f4xx.h"
		->
		#include "brd/startup/stm32f4xx.h"


	app/mavlink/mavlink.h:14
		#include "../protocol/velox/mavlink.h"
		->
		#include "protocol/velox/mavlink.h"


	sys/errorhandler/errorhandler.h:24
		#include "stm32f4xx.h"
		->
		#include "brd/startup/stm32f4xx.h"


	app/latctrl/latctrl.h:21
		#include "stm32f4xx.h"
		->
		#include "brd/startup/stm32f4xx.h"


	per/clocksync.h:23
		#include "stm32f4xx.h"
		#include "stm32f4xx_exti.h"
		#include "stm32f4xx_syscfg.h"
		->
		#include "brd/startup/stm32f4xx.h"
		#include "brd/stm32f4xx_exti.h"
		#include "brd/stm32f4xx_syscfg.h"


	app/odom/src/odom.c:21
		#include "config.h"
		->
		#include "app/config.h"


	app/vehspdctrl/src/vehspdctrl.c:19
		#include "vehspdctrl.h"
		#include "stm.h"
		->
		#include "../vehspdctrl.h"
		#include "app/stm/stm.h"


	app/latctrl/src/latctrl.c:19
		#include "latctrl.h"
		->
		#include "../latctrl.h"


	dev/mpu9150/src/mpu9150.c:30
		#include "mpu9150.h"
		->
		#include "../mpu9150.h"


	dev/hcsr04/hcsr04.h:26
		#include "stm32f4xx.h"
		#include "stm32f4xx_i2c.h"
		->
		#include "brd/startup/stm32f4xx.h"
		#include "brd/stm32f4xx_i2c.h"


	per/i2c2.h:23
		#include "stm32f4xx.h"
		->
		#include "brd/startup/stm32f4xx.h"


	dev/eeprom_25lc080a/src/eeprom_25LC080A.c:19
		#include <stm32f4xx.h>
		->
		#include "brd/startup/stm32f4xx.h"


	dev/eeprom_25lc080a/eeprom_25LC080A.h:24
		#include <stm32f4xx.h>
		->
		#include "brd/startup/stm32f4xx.h"


	sys/matlab/rt_nonfinite.h:34
		#include "app/foc/rtwtypes.h"
		->
		#include "rtwtypes.h"


	Gehe zu http://ecmc.rochester.edu/ecmc/docs/supercollider/scbook/Ch23_Dialects/extensions_c23_dialects/ENIAC/Eniac_Cycling%20Source%20Code/rtwtypes.h
	Speichern unter ~/Documents/Austausch\ Assystem\ -\ HU/02_lieferung/vehicle_ecu_sw/quellcode/sys

	sys/matlab/rtGetNaN.h:34
		#include "app/foc/rtwtypes.h"
		->
		#include "rtwtypes.h"


	sys/matlab/rtGetInf.h:34
		#include "app/foc/rtwtypes.h"
		->
		#include "rtwtypes.h"


	sys/matlab/rt_look.h:33
		#include "app/foc/rtwtypes.h"
		->
		#include "rtwtypes.h"


	cpx/foccomplex/foccomplex.h:52
		#include "curmon.h"
		#include "angmon.h"
		#include "pemon.h"
		->
		/*#include "curmon.h"
		#include "angmon.h"
		#include "pemon.h"*/


	cpx/foccomplex/src/foccomplex.c:21
		#include "app/foc/foc.h"
		#include "per/gpio.h"
		->
		/*#include "app/foc/foc.h"*/
		#include "per/gpio.h"
		#include "per/pwm.h"


	per/src/i2c2.c:20
		#include "i2c2.h"
		->
		#include "../i2c2.h"


	per/src/spi.c:20
		#include <stm32f4xx.h>
		->
		#include "brd/startup/stm32f4xx.h"


	Umbennen von cpx zu cpx2

4. Mögliche Kompilationsfehler:
	- /home/opt/gcc-arm-none-eabi-4_8-2014q2/bin/arm-none-eabi-gcc: Command not found
		Lösung: Instllation der ARM_Toolchain

	- In file included from ... No such file or directory
		Lösung: #includes fehlerhaft

5. TODO:
	- in cpx/foccomplex/foccomplex.h stehen Dateien, welche nicht vorhanden sind
	- in cpx/foccomplex/src/foccomplex stehen Dateien, welche nicht vorhanden sind
	- es kompiliert nur bei Umbenennung von cpx zu cpx2