Tutorial: Create a Project with uVision
Last updated
Last updated
Project > New 𝝁Vision Project
Create this tutorial project under the folder ..\..\repos\EC\tutorial\
Name the project as TU_CreateProject.
Check you have a new folder named as ..\..\repos\EC\tutorial\TU_CreateProject\
Do not use 한글경로 (띄어쓰기) for Project Directory path
Target_1 (Right Click) > Options for Target > Device tab
Device > search for STM32F411RETx
If you use other board, STM32F411 etc, choose the appropriate device.
Select CMSIS>CORE , Device>Setup
This will use necessary library to start the MCU and GPIO drivers.
Check if the following startup codes are included under Device folder
‘startup_stm32f411xe.s’, ‘system_stm32f411xx.c’
Project> Options for Target (Alt+F7)
Output Tab > check on Create HEX File :
This will create HEX file that contains the machine instruction codes
C/C++ Tab> Version of C and C++ should be <default>
Linker Tab> Use Memory Layout from Target Dialog checked
This will use the memory(register) layout of the specific target board
Debug tab> Use: ST-Link Debugger > Settings
You must connect MCU (internal ST-Link) to PC for this setting.
Use: ST-LInk Debugger
Debug Adapter> Unit: ST-LINK/V2-1
Debug> Connect: under Reset
This will configure USB link to MCU hardware. It will use ST-Link debugger embedded on the target board to debug the program. You will need to connect the target board to your PC for debugging
Project Tab> Target1> Source Group1 (Right Click) : Add New item to Group
Name the source file as TU_CreateProject_Example_main.c
경로, 폴더명에 한글 경로 사용하면 안됨!!
특히, Window User 이름이 한글이면 문제가 발생
Use sample source codes for test.
Use the same file of
TU_CreateProject_Example_main.c.
Just change the source codes
Build the program of Example 2
Press F7 and build the target and check if there is any error message
If the MCU is connected to PC, flash the output program file
Flash>Download (F8)
For Example 2:
Check if the LED_2 of MCU (Nucleo-F411RE) board is turned on when the blue button (B2) is pressed
Instead of starting from a blank project, use example codes and tutorial codes provided by ARM and STM webpage.