2090 views|1 replies

32

Posts

0

Resources
The OP
 

NUCLEO_G431RB review->File structure & ST-Link online debugging experience [Copy link]

NUCLEO-G431RB Review

  1. Platform construction

I tried MDK514 before and found the same problem as http://bbs.21ic.com/icview-2861476-1-1.html?ordertype=1 , so I downloaded the latest version of MDK528A directly .

Download file: https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-mcu-mpu-packages/stm32cubeg4.html

http://www.keil.com/dd2/pack/# STMicroelectronics STM32G4

  1. File structure analysis

Analyzing its file structure, the top-level directory is as follows. We should focus on the projects folder.

The example programs inside are available for us to use directly

All hardware interface descriptions, that is, the underlying hardware API , are all in this file.

The directory structure of each instance is as follows

From this we can see that relatively complete configurations are provided for the following three platforms: EWARM , MDK-ARM , and SW4STM32 . When testing on other platforms, you need to configure it yourself.

The startup_stm32g4xx.s file is an important file for initializing the entire system. It defines the system's initial SP pointer, PC pointer, and system interrupt entry vector table.

  1. Basic Configuration

Let's take a look at the configuration first, starting with a simpler GPIO example.

Among them, Keil.STM32Gxx_DFP.1.1.0 , I downloaded it directly from the link above, and then selected project->manage->pack installer->import .

Regarding the ST-Link part, this time you can see that the interfaces can be recognized and you can debug and download directly in the Keil interface.

  1. Try out onboard ST-Link debugging

Only a simple GPIO example is opened here, which controls LED2 to flash at a certain frequency.

Set a breakpoint on the line that switches between light and dark, then debug and run, the interface is as follows.

If you adjust it carefully, you can find that the r1 register is related to the state of the light, and the r0 register is related to the timing.



This content is originally created by EEWORLD forum user elike . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

This post is from stm32/stm8

Latest reply

Thank you for sharing, it is very detailed. To avoid detours, just follow the steps.   Details Published on 2019-10-15 14:35
 

1120

Posts

0

Resources
2
 

Thank you for sharing, it is very detailed. To avoid detours, just follow the steps.

This post is from stm32/stm8
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list