build notes (success finally)
been slow on this project, brand new to stm32. But I finally got it to build (and diff shows the output matches the released stm32_sine.bin.
ubuntu 14,
expanded
https://launchpadlibrarian.net/177524816/gcc-arm-none-eabi-4_8-2014q2-20140609-linux.tar.bz2 to a private directory
gcc-arm cross compiler, CHECK
Added the bin dir therein to the path
followed:
https://github.com/libopencm3/libopencm3-examples
ran make on the top level directory,
libopencm3 headers and objects, CHECK
grabbed the original zip with the flash/etc utilities:
http://johanneshuebner.com/quickcms/index.html?en_downloads,14.html
expanded it into my arm tree
got sources, CHECK
scratched head for a long time. finally realized that the .cbp files were for a C/C++ ide called codeblocks, more digging,
settled on
http://hivelocity.dl.sourceforge.ne...codeblocks-13.12-1_amd64.debian.stable.tar.xz
brought up codeblocks, tweaked the default compiler to point to my private
arm-none-eabi-gcc and added arm-none-eabi- to the front of the other tools
opened the project sinus.cbp
viewing source in IDE, CHECK
hit build, saw include errors
Modded the CFLAGS and CPPFLAGS lines in Makefile (added -I for libopencm3)
CFLAGS = -Os -Wall -Wextra -Iinclude -I/var/arm-eabi/proj/libopencm3-examples/libopencm3/include/ -fno-common -fno-builtin \
-mcpu=cortex-m3 -mthumb -std=gnu99 -ffunction-sections -fdata-sections
CPPFLAGS = -Os -Wall -Wextra -Iinclude -I. -I/var/arm-eabi/proj/libopencm3-examples/libopencm3/include/ -fno-common \
-ffunction-sections -fdata-sections -fno-builtin -fno-rtti -fno-exceptions -fno-unwind-tables -mcpu=cortex-m3 -mthumb
hit buid, saw linker problems, added -L flag to a libopen ld file directory:
LDFLAGS = -L$(TOOLCHAIN_DIR)/lib -L/var/arm-eabi/proj/libopencm3-examples/libopencm3/lib/ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections,-Map,linker.map
Hit Build, SUCCESS!
ran diff, no differences between original bin and newly compiled bin, CHECK
TODO: flash
scratched head some more, wondering how programmer connects.
opened the bootloader project in codeblocks firmware_loader.cbp
Saw UART3 referenced.
reviewed:
https://www.olimex.com/Products/ARM/ST/STM32-H103/resources/STM32-H103.pdf page 10.
hooked up the pl2303mdl to the EXT2 port on the olimex (useful for upgrades even if you don't build)
gussing this should work:
pl2303mdl pin, STM32-H103 EXT2 pin
GND, 6 GND
RX, 14 PB10/UART3.TX
TX, 15 P11/UART3.RX
VCC, 23 +5V USB
Maybe not the ideal setup, but if it works. I plug in the pl2303mdl and the olimex starts blinking anyway... will try actual flashing later.
Edit, wound up using sudo to flash for now. some various flashes, and the green light is back to steady fast flash, so apparent success

sudo ./updater /var/arm-eabi/proj/tumanako-inverter-fw-motorControl/src/sine/stm32_sine.bin /dev/ttyUSB0