Skip to main content

How to make W7500 Keil Project


(C) COPYRIGHT 2015 WIZnet

  • author : IOP Team

  • version : V1.0.0

  • date : 1-May-2015

  • brief : Description of making a new Keil Project of W7500.

  • develop environment : Windows 7 32/64bits, Keil Version 5.10


Introduction#

This application note is a tutorial for making a KEIL project for W7500 MCU. This document show you how to make a project and a bin file for W7500 step by step in order for you to follow up easily.

STEP 1. Download and install KEIL5!#

keil0

  • Download MDK-ARM v5 : KEIL5
  • Installation instructions, please see the Link : Install

STEP 2. Download W7500 Library!#

keil1

You can download W7500 Library from WIZnet's Github repository : W7500 Library

STEP 3. make workspace! and move the W7500 Library to workspace!#

keil2

In this example, it is D:\workspace\project\Library

STEP 4. Execute KEIL5 and make new project!#

keil3

Click to New uVision Project...

keil4

Select a project save folder and choose project name. In this example, D:\workspace\project\W7500_test\W7500_Test.uvproj

keil5

Choose 'Cortex-M0' because W7500 MCU is based on Cortex-M0

STEP 5. W7500 start up code and system code setting!#

keil7

Return to project. You need to make the same folders like the image which is shown on right side

keil8 direction_leftdown keil9 direction_leftdown keil10 direction_leftdown keil11 direction_leftdown keil12 direction_leftdown keil13

Follow like upper images.

keil14

And in the same way... CMSIS Folder include D:\workspace\project\Libraries\CMSIS\Device\WIZnet\W7500\Source\system_W7500.c file

W7500_Periphs folder includes Peripherals to use.

And User folder has to include main.c and so on.

Let's make main.c

keil15

Click to Add New Item to the Group.

keil16

Select C file and Name it with 'main' and click 'Add'.

keil17

Include w7500x.h header but... you should show red X because you did not path.

STEP 6. setting for include paths#

keil18

Click to Options for Target...

keil19

Select 'Include Paths' in C\C++ tap and click the folder icon and click to ... icon

keil20

keil+

Set 'include path' with

D:\workspace\project\Libraries\CMSIS\Device\WIZnet\W7500\Include D:\workspace\project\Libraries\W7500x_stdPeriph_Driver\inc D:\workspace\project\Libraries\CMSIS\Include

keil21

STEP 7. Memory setting!#

Click "Options for Target..."

keil22-1 direction_down keil22-2

Click "Target" tap and set with the values which are shown in above pictures

keil23

And click "Linker" tap and check [Use Memory Layout from Target Dialog]

STEP 8. Selection of Peripherals to use#

keil18

Click "Options for Target..."

keil24

Click "C/C++" tap and add CORTEX_M0 USE_STDPERIPH_DRIVER in "Define" field.

STEP 9. Setting user program to use with the created bin file#

keil18

Click "Options for Target..."

keil25

Click "User" tap and check "Run #1" in "Run User Programs After Build/Rebuild" section
and write this command [fromelf --bin -o "$L@L.bin" "#L"] in order CMSIS DAP to use the bin file.

STEP 10. Compile the example#

keil26

Let's compile the example code in D:\workspace\project\Projects\Peripheral_Examples\GPIO\Blink_LED This fold consists of main.c, W7500x_conf.h, W7500x_it.c and W7500x_it.h and you should copy these four files to D:\workspace\project\W7500_Test(my project folder)

keil27

And copy W7500x_gpio.c into W7500_Periphs folder in order to use gpio peripheral

keil28

And copy W7500x_it.c into User folder for interrupt handlers

Add "Include Path" for W7500x_conf.h and W7500x_it.h

keil18

Click "Options for Target..."

keil19

Click "Include Paths" in C\C++ tap, "folder icon and ... icon

keil29

Set "include path" with D:\workspace\project\W7500_Test

keil30

Now compile this project!! by pressing F7 or clicking Build icon

keil31

After compile, W7500_Test.bin file will be created. And then WIZwiki-W7500 will upload this bin file on itself via the User program you registered.

If you want to convert this document to the PDF file? Click to [Export to PDF]

ยฉ COPYRIGHT 2015 WIZnet Co.,Ltd.