Development environment of keil4 for s3c2440 bare metal under win7

Publisher:Wanderlust123Latest update time:2020-06-13 Source: eefocusKeywords:win7  keil4  s3c2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

ADS is unstable under Windows 7 and has not been officially updated for a long time. I often use MDK for embedded software development. MDK is simple, easy to use and powerful, so I want to use MDK to develop bare metal S3C2440. I found many blogs of great people on the Internet. When setting up the environment, many strange problems occurred. I wrote this blog to record them and to help colleagues who are new to setting up the environment to avoid some detours.


1. Platform

    1) Operating system: win7 64 bit

    2) KEIL version: 4.74

    3) jlink V9 downloader

    4) Development board: FL2440

    

You can install the keil software and jlink driver by searching on Baidu.


2. New construction projects

2.1. Select New uVision Project under project to create a new project

insert image description here

Set the project path and project name

##2.2, Select the processor chip

insert image description here

Copy the S3C2440.s file to the project folder and add it to the project

insert image description here
insert image description here

2.3. Add a .c file

insert image description here

insert image description here

Add the following code in the .c file


#include

void Delay(int delayTime);

int __main()

{

GPBCON |= 01<<10; //Configure GPIO of LED0

while (1)

{

// Turn on the small light

GPBDAT &= ~(1<<5);

Delay(1000);

//Turn off the light

GPBDAT |= 1<<5;

Delay(1000);

}

}

void Delay(int delayTime)

{

int i,j;


for (i=0; i for (j=0; j<100; j++)

;

return;

}


2.4、Configure S3C2440.s

Open this file and select Configuration wizard in the editing interface to perform configuration. To be on the safe side, check all the buttons.

insert image description here

3. Set up the project

3.1. Click the Options for Target icon

insert image description here

3.2. Set RAM and ROM addresses

insert image description here

3.3. Generate Hex file

insert image description here

3.4. Simulator Settings

insert image description here

The function of Ext_RAM.ini file is to initialize RAM before loading axf debugging file, and it needs to complete the setting of bus clock and other functions. This file is not in Keil4.7, you need to download a copy online and then put it in the newly created project. And you need to change the load command in Ext_RAM.ini file to the path of the axf file of this project.

insert image description here

Then you need to set the following in the J-LINK/J-TRACE Setting:

insert image description here

The default frequency of JTAG Speed ​​is 1MHz, which may cause problems. It is recommended to change it to 800KHz.


3.5、Load Flash burning algorithm

Select J-LINk/J-TRACE ARM and uncheck Update Targetbefore Debugging and Use Debug Driver.

insert image description here

Click Settings of J-LINK/J-TRACE ARM and select the corresponding chip. At the same time, try not to erase the chip or sector and select Do not Erase.

insert image description here

4. Problems encountered

4.1、cannot load driver JL2CM3.dll

insert image description here

Add the eKeil4.7ARMSegger path to the win7 environment variables.

Keywords:win7  keil4  s3c2440 Reference address:Development environment of keil4 for s3c2440 bare metal under win7

Previous article:Basic use of s3c2440 serial port
Next article:Learn S3C2440 bare metal development under Keil from 0 - 1 Using internal RAM

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号