Some (beginners) problems with OpenSTM32
Hello,
I'm new to STM32, and I have some problems:
I'm working with Linux (KUbuntu)
When I create a Project with CubeMX and finaly import it, everything seems to be fine until I try to create and include my own header-file in the main.c created by CubeMX.
According by the view, it seems to be in the same directory than the main.c, but it isn't and it cannont be found by the Compiler.
For example, if my project is called "oled, I can find the main.c in "oled/Src", and my newly created "oled.h" is found in "oled/SW4STM32/oled/Application/User".
What the hell went wrong?
My second Problem:
I'm trying to use an ST-Link v2.
It is working with my maplemini if I use it manualy, but in SW4 I always get the following errors, if I try to connect to my board:
02:33:33 **** Programing project oled on chip ****
/home/harry/.eclipse/org.eclipse.platform_4.5.2_1473617060_linux_gtk_x86_64/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.8.0.201603291120/tools/openocd/bin/openocd -f oled.cfg -s /home/harry/workspace/ARM/oled/SW4STM32/oled -s /opt/eclipse/../../home/harry/.eclipse/org.eclipse.platform_4.5.2_1473617060_linux_gtk_x86_64/plugins/fr.ac6.mcu.debug_1.8.0.201603291114/resources/openocd/scripts -c "program Debug/oled.elf verify exit"
Open On-Chip Debugger 0.10.0-dev-00265-g12ff60f (2016-03-11-12:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
srst_only separate srst_nogate srst_open_drain connect_assert_srst
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.208900
Error: init mode failed (unable to connect to the target)
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'
- OpenOCD init failed **
Why can't I change anything? - wrong place?
Harry