cancel
Showing results for 
Search instead for 
Did you mean: 

Using Eclipse and GCC, codes compiled, downloaded but does not work

Vu.Andy
Associate III
Posted on December 14, 2016 at 18:32

I was using Eclipse and GCC for the STM32F07x device.  The codes come from the STMCube F0 GPIO examples.   Everything was compiled.  I then use ST-Link utility to download the .hex file.  I verified that the codes downloaded correctly to the uC memory, but the codes do not seem to work. 

Does anybody know where I can start trouble shoot the codes?  Where should I look into first?

Thanks.

12 REPLIES 12
Posted on December 14, 2016 at 18:54

Try something very simple, such as a

http://www.efton.sk/STM32/blinkyf0.zip

, for start.

What is your HW? How arre BOOT0 and NRST connected?

JW

Posted on December 14, 2016 at 19:05

The blinky example I gave is complete standalone, no magic in startup code, no libraries. Modify paths in c.bat, GPIO pin in blinky.c, then run c.bat blinky, then download resulting hex. It's for 'F031 and you should replace the cmsis header for the ''f07x's, but I'd be surprised if there is anything which would not work for such simple example in the 'F07x.

Check also option bits - in some F0 the bootloader could be run by setting some of them.

Posted on December 14, 2016 at 19:54

Keil for F0 should be

https://community.st.com/0D50X00009XkW4oSAF

.

Posted on December 14, 2016 at 18:58

I am actually using the GPIO blinky example from the STM32F0 library.  The HW is STM Discovery board so I think the board is OK, and I was able to work with the board using KEIL uVsion. 

The same blinky example works fine using KEIL, but I am problem using Eclipse/GCC.

I assume the BOOT0 and NRST are configured correctly since the board is working fine using KEIL.

Thanks.

Posted on December 14, 2016 at 19:22

Let me take a look at your example.  The thought of having to change the cmsis makes me think your example for the F031 device may not work with my Discovery F07X device. 

Thanks.

Posted on December 14, 2016 at 19:40

The thought of having to change the cmsis makes me think your example for the F031 device may not work with my Discovery F07X device. 

Well, there's enough compatibility within a family to have such a simple

example workable across the whole family, but if you want to be absolutely

sure, just copy your device's header from

\Drivers\CMSIS\Device\ST\STM32F0xx\Include\ and

then change the ♯ include in blinky.c.

JW

Posted on December 14, 2016 at 19:48

I guess if GCC may be too difficult an environment then we will probably make do without it and stay with using KEIL.  Since most of our codes will be within the limits using the KEIL free version so it may not be a big problem for us.

I thought it's simple enough to port the codes to GCC but all the little nuances of GCC makes it a bit challenging .... maybe more than needed.

Anup Kumar Das
ST Employee
Posted on December 15, 2016 at 10:52

If you want to use 'Eclipse and GCC' then you can try 'System Workbench for STM32'. This is a free STM32 integrated development environment. Can download it from

http://www.openstm32.org/HomePage

. This tool will allow you to build download and debug stm32 code using GCC.
Posted on December 15, 2016 at 16:28

Thanks.  Let me give it a try.