Manual Build MDK-ARM Project

<< Click to Display Table of Contents >>

Navigation:  Tips & Tricks > Compilers > MDK-ARM >

Manual Build MDK-ARM Project

Previous pageReturn to chapter overviewNext page

1. Prepare the source code.

manualbuild_preparesrccode

 

2. Open MDK-ARM and create a new Project.

createanewmdkproj

3. Create New Project Window opens, name our project, then click Save.

saveasmdkproj

4.  Select target MCU then click OK.

mdkselectmcu

5. Do NOT copy startup file if source code is generated with Waijung.

mdknostartupcode

6. Add source files (*.c and *.s) to the project.

mdkaddsourcefiles

6.1 Add *.c source files

mdkadd_c_sourcefiles

6.2 Add *.s source files

mdkadd_s_sourcefiles

7. Confirm that all source files are added.

mdkallsourcefilesadded

8. Configure Target Build Options.

mdktargetoption1

9. Configure Build Output Options.

mdkbuildoutputoptions

10. Configure C/C++ Options.

mdkbuildccppoptions

11. Configure Linker Option.

You have  2 choices as shown below either:

Use Waijung generated scatter (*.sct) file
Use MDK-ARM GUI settings

Linker script controls memory management and linking process and is recommended for advanced users only. If you are not sure what to do follow Use Waijung generated scatter (*.sct) file method below.

11.1 Use Waijung generated scatter (*.sct) file

mdkbuildlinkeroptions

11.2 Use MDK-ARM GUI settings

mdkbuildlinkeroptions3

12. Select debugging method.

mdkbuilddebugoptions

mdkbuilddebugoptions2

13. Configure Build Utility Option.

mdkbuildutilityoptions

mdkbuildutilityoptions2

mdkbuildutilityoptions3

mdkbuildutilityoptions4

14. Build the target

mdkbuildtarget1

15. Start the debugging process

mdkbuildtarget2

16. Running the program. You should see the MCU doing tasks that it programmed to do.

mdkdebugcode