cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO32+STM32L011K4+MXCUBE Debug Issues

antonio239955_stm1
Associate II
Posted on September 25, 2017 at 12:41

Hi guys!

I'm a completely newbie to the STM32 and to make some experiments I've bought a nucleo 32 board based on the STM32L011K4 microcontroller.

Then I've downloaded and installed the Atollic TRUEStudio, the STCubeMx and the STM32L0 libraries.

Then I've generated a simple project just to see the increment of a variable into the main loop.

The things I've done to generate the project are just the choice of the corresponding board and the setting of the TrueStudio as used toolchain.

Once made, compiled and downloaded the code I see that the debugger doesn't start at the first instruction of the main function but it jumps to the hal initialization where it gets lost.

Is there any other setting I need to do in the MXCube.

It is not enough to choose the board and the developement tool to get a simple working main loop?

I don't need to use any other peripheral.

Is there anybody willing to give me some advice.

Thank You very much

Antonio
1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee
Posted on September 27, 2017 at 12:41

Hello

Pessina.Antonio

,

You may find firmware examples in the STM32CubeL0 package using the

STM32L011K4-Nucleo

that can help you in your project: STM32Cube_FW_L0_V1.0\Projects\STM32L011K4-Nucleo\Examples

All examples in the package integrate the IDEs: EWARM, MDK, SW4STM You can select the one suitable for you.

Otherwise, I recommend you to select the

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-ides/sw4stmhtml

free toolchain as it isa free multi-OS software development environment based on Eclipse.

You may start from the template project in the STM32CubeL0 package, review the structure of the projects provided in the Templates for supported tool chains,and then add your own modifications (new functions, new files)...

You have also the demonstration under STM32Cube_FW_L0_V1.0\Projects\STM32L011K4-Nucleo\Demonstrations.

I recommend, also, that you refer tothe user Manual UM1718 'STM32CubeMx for STM32 configuration and initialization C code generation' for more details about CubeMx (in the section: 4.8 Project Settings window) and the generated files options allows defining theperipheral initialization.

If you still have problems,you can post your code or .ioc file in the community, it will be easier for user forum to help/answer to you.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

6 REPLIES 6
Imen.D
ST Employee
Posted on September 27, 2017 at 12:41

Hello

Pessina.Antonio

,

You may find firmware examples in the STM32CubeL0 package using the

STM32L011K4-Nucleo

that can help you in your project: STM32Cube_FW_L0_V1.0\Projects\STM32L011K4-Nucleo\Examples

All examples in the package integrate the IDEs: EWARM, MDK, SW4STM You can select the one suitable for you.

Otherwise, I recommend you to select the

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-ides/sw4stmhtml

free toolchain as it isa free multi-OS software development environment based on Eclipse.

You may start from the template project in the STM32CubeL0 package, review the structure of the projects provided in the Templates for supported tool chains,and then add your own modifications (new functions, new files)...

You have also the demonstration under STM32Cube_FW_L0_V1.0\Projects\STM32L011K4-Nucleo\Demonstrations.

I recommend, also, that you refer tothe user Manual UM1718 'STM32CubeMx for STM32 configuration and initialization C code generation' for more details about CubeMx (in the section: 4.8 Project Settings window) and the generated files options allows defining theperipheral initialization.

If you still have problems,you can post your code or .ioc file in the community, it will be easier for user forum to help/answer to you.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
antonio239955_stm1
Associate II
Posted on October 03, 2017 at 13:57

Hello Imen,

thank you very much for your advices.

I would like to use TrueSTUDIO and send you the zipfile of my project, but I don't find any command to insert it in this message.

Have a nice day

Ciao

Antonio 

Posted on October 03, 2017 at 14:06

Hi,

When 

you reply to the post, please 

click on ''Use advanced editor''

link at the top right of the editor window

, then you can add the attachment.

0690X00000608SlQAI.png

Kind Regards,

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on October 10, 2017 at 10:36

Sorry but there's no way to attach files

Antonio

Posted on October 10, 2017 at 12:02

Use the Thread View, you should be able to reply and add an attachment or edit your original post to ado one to that.

See bottom left corner below the edit box.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 10, 2017 at 14:32

Thank you Clive,

Here you can find the zip file of a very simple True STUDIO projectcreated with the STM32CubeMX.

My target board is a Nucleo32 (STM32L011K4 based).

I would like to get a simple board initialization and the increment of a variable into the main loop.

When I launch the debugger, the program doesn't start at main, and locks into the GPIO initialization.

I've followed (I hope) the STM32CubeMX User Manual and her's the project.

Is there anything I have to do in the STM32CUBE settings.

Am I missing something?

Sorry, but I'm getting slightly insane

Thank You

Antonio

________________

Attachments :

test.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyNt&d=%2Fa%2F0X0000000b6s%2Fuc7v2hVUWjxLZ7X6clxfBYyvM7GXLEFoAV7oq6WAYgQ&asPdf=false