Page 1 of 3

[FINALLY] SPC5Studio and STM32

Posted: Wed Feb 20, 2013 7:53 pm
by Giovanni
Hi,

It took a while to complete this but finally the SPC5Studio components for STM32F4 are ready and we can start actually using this new tool. Sorry for the delay but I wanted all the settings exported to the visual interface, I hope it will be worth all the time spent.

Required steps:

1) Install SPC5Studio 1.0.0.
The tool is available here: http://www.st.com/web/catalog/tools/FM1 ... 9/PF255702 enjoy the new ST website while you are there.
During installation it will ask if you want to activate the compiler license, don't do it, the license only lasts 30 days (very useful...), you will not need it after the following steps.

2) Remove the "stable" ChibiOS components from SPC5Studio.
From Help->About SPC5 Studio->Installation Details->Installed Software, uninstall the ChibiOS components.

3) Add the unstable repositories to SPC5Studio.
From Help->Install New Software-Available Software Sites disable the ChibiOS stable repository (don't remove it) and add the following Repositories:
- http://www.chibios.org/eclipse/chibistudio (name it "ChibiStudio Update Site").
- http://www.chibios.org/eclipse/unstable (name it "ChibiOS/RT Update Site (unstable)").
Make sure the sites are enabled and close the dialog.

3) Install the ChibiStudio components into SPC5Studio.
From Help->Install New Software select "ChibiStudio Update Site" and install the Compiler and the Tools proposed by that site. This will install the ARM compiler and the ChibiOS plugins. Restart when prompted.

4) Install the unstable ChibiOS components.
From Help->Install New Software, select "ChibiOS/RT Update Site (unstable)" and install all the offered components. This installs ChibiOS itself as visual components. Restart when prompted.

5) Import the attached demo into the workspace (see following post, thanks Jon).

6) Hopefully everything worked. Enjoy and ask questions here :)

Starting from next version the installation will be easier because all the sites and components will be pre-installed.

Giovanni

Re: [FINALLY] SPC5Studio and STM32

Posted: Thu Feb 21, 2013 2:46 am
by vibrolax
SPC5Studio abd Chibios elements installed as instructed.
It took me a half hour to figure out how to import the test application STM32F4xx Test Application.zip so it would build

I finally figured out I had to File -> Import -> Existing projects into workspace -> Select archive file
Then it built properly on the first try.
I can't wait to download and debug it, but that's all the time I have for today.
I've been building from the command line and with my own configuration of Eclipse Juno / ARM toolchain from Launchpad / gdb / Atollic's gdbserver for several months.
I think there's a fair chance I will like SPC5 Studio better after I digest the wizards and configuration tools.

Jon


Code: Select all

20:32:33 **** Build of configuration Default for project STM32F4xx Test Application ****
make -j2 all
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m4 -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/ -DSTM32F4xxyG -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I./components -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.kernel_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.kernel.port.gcc.stm32f4xx_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.external.cmsis_3.1.0.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.hal_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.hal.platform.stm32f4xx_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.various.shell_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.various.chprintf_2.5.2.201302201859/component/lib/include -IC:/SPC5Studio/eclipse/plugins/org.chibios.spc5.components.kernel.testsuite_2.5.2.201302201859/component/lib/include -I./components/chibios_rt_portable_kernel_component/cfg -I./components/chibios_rt_portable_hal_component/cfg -I./components/chibios_rt_stm32f4xx_hal_platform_component/cfg -I./components/chibios_rt_stm32f4xx_board_component/cfg main.c -o main.o

mkdir -p build/obj
mkdir -p build/lst
Compiling components.c
Compiling crt0.c
Compiling chsys.c
Compiling chdebug.c
Compiling chlists.c
Compiling chvt.c
Compiling chschd.c
Compiling chthreads.c
Compiling chdynamic.c
Compiling chregistry.c
Compiling chsem.c
Compiling chmtx.c
Compiling chcond.c
Compiling chevents.c
Compiling chmsg.c
Compiling chmboxes.c
Compiling chqueues.c
Compiling chmemcore.c
Compiling chheap.c
Compiling chmempools.c
Compiling nvic.c
Compiling chcore.c
Compiling chcore_v7m.c
Compiling vectors.c
Compiling hal.c
Compiling adc.c
Compiling can.c
Compiling ext.c
Compiling gpt.c
Compiling i2c.c
Compiling icu.c
Compiling mac.c
Compiling mmc_spi.c
Compiling mmcsd.c
Compiling pal.c
Compiling pwm.c
Compiling rtc.c
Compiling sdc.c
Compiling serial.c
Compiling serial_usb.c
Compiling spi.c
Compiling tm.c
Compiling uart.c
Compiling usb.c
Compiling stm32_dma.c
Compiling hal_lld.c
Compiling adc_lld.c
Compiling ext_lld_isr.c
Compiling can_lld.c
Compiling ext_lld.c
Compiling gpt_lld.c
Compiling icu_lld.c
Compiling mac_lld.c
Compiling pwm_lld.c
Compiling sdc_lld.c
Compiling pal_lld.c
Compiling i2c_lld.c
Compiling usb_lld.c
Compiling rtc_lld.c
Compiling spi_lld.c
Compiling serial_lld.c
Compiling uart_lld.c
Compiling shell.c
Compiling chprintf.c
Compiling test.c
Compiling testthd.c
Compiling testsem.c
Compiling testmtx.c
Compiling testmsg.c
Compiling testmbox.c
Compiling testevt.c
Compiling testheap.c
Compiling testpools.c
Compiling testdyn.c
Compiling testqueues.c
Compiling testbmk.c
Compiling board.c
Compiling main.c
Linking build/out.elf
Creating build/out.hex
Creating build/out.bin
Creating build/out.dmp
Done

20:32:50 Build Finished (took 17s.204ms)

Re: [FINALLY] SPC5Studio and STM32

Posted: Thu Feb 21, 2013 9:30 am
by Giovanni
Hi,

Thanks for the note, I overlooked that.

I am glad it worked for you at the first attempt. The configuration tool is the best part :) but except for that there is everything you could expect from an Eclipse environment.

I hope to make a package for OpenOCD too and, if I find the time, also create a specific GUI for it within eclipse.

Giovanni

Re: [FINALLY] SPC5Studio and STM32

Posted: Thu Feb 21, 2013 1:52 pm
by vibrolax
Giovanni,

A pre-configured OpenOCD package would be a nice cherry on top of the cake. Are you building OpenOCD from source? I got Freddy Chopin's 0.6.2 build to talk to my board (STM32F4Discovery) a month or so ago, but didn't have enough motivation to integrate it with the Eclipse Indigo I was was using at the time.

Thanks for the fantastic effort so far.
Jon

It works!

Posted: Thu Feb 21, 2013 9:57 pm
by DEHiCKA
I've succefully downloaded and configured SPC5Studio this morning on Win7 x64.
OpenOCD taken from ChibiStudio v3 works well with SPC5Studio. I've only changed output name to "ch" in the makefile and the arm-none-eabi-gdb command doesn't work without path to it in the debug configuration for some reason. With this changes test app uploaded and running nice on F4Discovery.
Looks like a great tool, Giovanni!


Dennis.

Re: [FINALLY] SPC5Studio and STM32

Posted: Fri Feb 22, 2013 8:48 am
by Giovanni
Hi Dennis,

I need to do something to make creating debug configurations easier, it is a major problem for all people approaching Eclipse, may be some kind of wizard.

Giovanni

Re: [FINALLY] SPC5Studio and STM32

Posted: Sat Feb 23, 2013 6:21 pm
by vibrolax
Dennis,

Can you provide a brief description of how you installed the OpenOCD feature from ChibiStudio 3 into SPC5Studio?

Jon

Re: [FINALLY] SPC5Studio and STM32

Posted: Wed Feb 27, 2013 1:41 pm
by DEHiCKA
Hi Jon,

I've copied tools folder including openocd from my ChibiStudio install to SPC5Studio.
Then created a new debug config and STLinkV2 ext. tool in SPC5Studio and repeated all the debug config and ext. tool settings from ChibiStudio.
Except GDB Comand setting now with fullpath: ${eclipse_home}\plugins\org.chibios.tools.spc5.tools.gnuarm_4.7.3.201302122034\gnuarm\bin\arm-none-eabi-gdb
and artifact name in the makefile changed to ch: PROJECT = ch

The drawback is, If the gnuarm plugin version changes I'll need to change a path to it accordingly. Maybe there is more clever way to do it, but I'm a noob in eclipse.

Dennis.

Re: [FINALLY] SPC5Studio and STM32

Posted: Wed Feb 27, 2013 2:03 pm
by Giovanni
Hi,

There should no need to specify the path to arm-none-eabi-gdb.exe because its path is enforced in the PATH variable by SPC5Studio (note that the tools installed in SPC5Studio as plugins always have precedence over the external PATH variable).

Just specify arm-none-eabi-gdb without a path in the debug configuration.

Giovanni

Re: [FINALLY] SPC5Studio and STM32

Posted: Wed Feb 27, 2013 2:07 pm
by vibrolax
Dennis,

Thank you. I downloaded ChibiStudio_Preview3.7z a few days ago and saw the OpenOCD files. I didn't know if it was necessary to install ChibiStudio to transplant the debugger bits into SPC5Studio. It might not be necessary, but I can see that it makes it easier to manually set up the debug configuration settings. I will install ChibiStudio and give it a try.

Thank you also, Giovanni. I surmise you are working to integrate OpenOCD into SPC5Studio into its install/update packages.

Jon