Servus beinand,
leider schaffe ich es nicht, mein neu zugelegtes STM32 discovery board
vernünftig zum laufen zu bekommen, und ich verstehe auch nicht so recht
woran es liegt.
So gehe ich vor:
Zunächst erstelle ich unter Ubuntu 10.10, wie in diesem Blog beschrieben
( http://wiki.seabright.co.nz/wiki/HelloSTM32.html ), meine Datei
hello.c.
Anschließend nehme ich das Makefile aus dem Blog, jedoch ohne dem
stm32loader:
1 | # Makefile for building basic STM32 projects
|
2 | #
|
3 | # Michael Hope <michaelh@juju.net.nz>, 2010
|
4 | #
|
5 |
|
6 | # Using the CodeSourcery 2009q3 Lite ARM EABI tools
|
7 | CROSS_COMPILE = arm-none-eabi-
|
8 | CC = $(CROSS_COMPILE)gcc
|
9 | OBJCOPY = $(CROSS_COMPILE)objcopy
|
10 |
|
11 | # Name of the startup file. 'hd' for high density
|
12 | STARTUP = startup_stm32f10x_hd.s
|
13 |
|
14 | CFLAGS = -mcpu=cortex-m3 -mthumb -O -g
|
15 |
|
16 | # List of all binaries to build
|
17 | all: hello.bin
|
18 |
|
19 | # Create a raw binary file from the ELF version
|
20 | hello.bin: hello.elf
|
21 | $(OBJCOPY) -O binary $< $@
|
22 |
|
23 | # Create the ELF version by mixing together the startup file,
|
24 | # application, and linker file
|
25 | hello.elf: $(STARTUP) hello.c
|
26 | $(CC) -o $@ $(CFLAGS) -nostartfiles -Wl,-Tstm32.ld $^
|
27 |
|
28 | ## Program the binary to the board using the builtin serial bootloader
|
29 | #program:
|
30 | # stm32loader.py -p /dev/ttyUSB0 -ewv hello.bin
|
31 | #
|
32 | ## Remove the temporary files
|
33 | #clean:
|
34 | # rm -f *.o *.elf *.bin
|
Das kompilieren klappt ohne Fehlermeldungen.
Danach boote ich Windows und kopiere die Datei hello.bin mittels dem
Programm STM32 ST-Link Utility auf das Board. Hierbei treten auch keine
Fehlermeldungen auf.
Wenn ich mit dem Oszi anschließend die einzelnen Pins anschaue, so sind
fast alle auf 0 (außer PA15, PA13 und PB4).
Habe ich hier einen kompletten Denkfehler, oder überseh ich einfach nur
eine Kleinigkeit?
Viele Grüße