|
|
Home | Projects | Contact
|
|
STM32F103
Binutils:
- Download http://ftp.gnu.org/gnu/binutils/binutils-2.20.tar.bz2
- Unzip in binutils-2.20
- Create a directory binutils-arm
- From binutils-arm run: ../binutils-2.20/configure --target=arm-elf --disable-nls --prefix=directory_where_you_want_binutils_installed
- Build using: make all install
FPC:
- Requires release(or trunk) version of FPC - Get it here: http://www.freepascal.org/download.var
- Get source FPC - svn trunk version(http://www.freepascal.org/develop.var)
- Build using: make clean buildbase installbase CROSSINSTALL=1 CROSSOPT="-XParm-elf-" OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m PREFIX=directory_where_you_want_fpc_installed
"-XParm-elf-" indicates that it should use binutils tools with prefix "arm-elf-". For example: arm-elf-as
Compiling:
To compile a project use
fpc -Parm -Tembedded -Cparmv7m -Wpstm32f103re -XParm-elf- test.pas
Example code:
Here's a test project using a small part of the ST fw lib, ported to pascal
test.pas
st32f103fw.pas
|